Use case for selecting the address family (as in other places).
MFC after: 3 days
This commit is contained in:
parent
01b851db7f
commit
7f0c39adad
@ -1203,11 +1203,18 @@ sctp_findassociation_ep_addr(struct sctp_inpcb **inp_p, struct sockaddr *remote,
|
||||
uint16_t rport;
|
||||
|
||||
inp = *inp_p;
|
||||
if (remote->sa_family == AF_INET) {
|
||||
switch (remote->sa_family) {
|
||||
#ifdef INET
|
||||
case AF_INET:
|
||||
rport = (((struct sockaddr_in *)remote)->sin_port);
|
||||
} else if (remote->sa_family == AF_INET6) {
|
||||
break;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
rport = (((struct sockaddr_in6 *)remote)->sin6_port);
|
||||
} else {
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return (NULL);
|
||||
}
|
||||
if (locked_tcb) {
|
||||
|
Loading…
Reference in New Issue
Block a user