svn commit: r238455 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat Jul 14 20:08:04 UTC 2012
Author: tuexen
Date: Sat Jul 14 20:08:03 2012
New Revision: 238455
URL: http://svn.freebsd.org/changeset/base/238455
Log:
Use case for selecting the address family (as in other places).
MFC after: 3 days
Modified:
head/sys/netinet/sctp_pcb.c
Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c Sat Jul 14 19:44:39 2012 (r238454)
+++ head/sys/netinet/sctp_pcb.c Sat Jul 14 20:08:03 2012 (r238455)
@@ -1203,11 +1203,18 @@ sctp_findassociation_ep_addr(struct sctp
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) {
More information about the svn-src-head
mailing list