Date: Sun, 7 Jul 2013 11:15:55 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r252923 - stable/9/sys/netinet Message-ID: <201307071115.r67BFtC8058709@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Sun Jul 7 11:15:54 2013 New Revision: 252923 URL: http://svnweb.freebsd.org/changeset/base/252923 Log: MFC r238455: Use case for selecting the address family (as in other places). Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 7 11:10:15 2013 (r252922) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 7 11:15:54 2013 (r252923) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307071115.r67BFtC8058709>