mirror of
https://repo.or.cz/socat.git
synced 2025-07-14 15:23:24 +00:00
Fixed IP-SENDTO with option pf with protocol name
This commit is contained in:
parent
50b6301bda
commit
0cfe39a413
7 changed files with 75 additions and 15 deletions
12
xio-ip.c
12
xio-ip.c
|
@ -132,15 +132,17 @@ int xioinit_ip(
|
|||
char ipv)
|
||||
{
|
||||
if (*pf == PF_UNSPEC) {
|
||||
#if WITH_IP4 && WITH_IP6
|
||||
switch (ipv) {
|
||||
case '0': *pf = PF_UNSPEC; break;
|
||||
#if WITH_IP4
|
||||
case '4': *pf = PF_INET; break;
|
||||
#endif
|
||||
#if WITH_IP6
|
||||
case '6': *pf = PF_INET6; break;
|
||||
#endif
|
||||
default: break; /* includes \0 */
|
||||
}
|
||||
#elif WITH_IP6
|
||||
*pf = PF_INET6;
|
||||
#else
|
||||
*pf = PF_INET;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue