mirror of
https://repo.or.cz/socat.git
synced 2025-07-11 22:23:24 +00:00
Again fixes a few disable problems
This commit is contained in:
parent
6a53c955d3
commit
34b09a44ee
3 changed files with 8 additions and 0 deletions
|
@ -390,18 +390,22 @@ int _xioopen_ipapp_connect(struct single *sfd,
|
|||
} else if (needbind && bindport) {
|
||||
/* Bind by sourceport option */
|
||||
switch ((*themp)->ai_family) {
|
||||
#if WITH_IP4
|
||||
case PF_INET:
|
||||
bindaddr.ip4.sin_family = (*themp)->ai_family;
|
||||
bindaddr.ip4.sin_port = htons(bindport);
|
||||
bindaddrp = &bindaddr;
|
||||
bindlen = sizeof(bindaddr.ip4);
|
||||
break;
|
||||
#endif
|
||||
#if WITH_IP6
|
||||
case PF_INET6:
|
||||
bindaddr.ip6.sin6_family = (*themp)->ai_family;
|
||||
bindaddr.ip6.sin6_port = htons(bindport);
|
||||
bindaddrp = &bindaddr;
|
||||
bindlen = sizeof(bindaddr.ip6);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue