summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-12-17 12:52:34 +0000
committerbz <bz@FreeBSD.org>2008-12-17 12:52:34 +0000
commitea0d9d2e9af995a203d1871d5aded293a98f5d68 (patch)
tree062997817526e8ebb92f0a727bd3ebf774556ea8 /sys/netinet/tcp_usrreq.c
parentbaed8aaae54e47b5ef994a307febc994595b0e50 (diff)
downloadFreeBSD-src-ea0d9d2e9af995a203d1871d5aded293a98f5d68.zip
FreeBSD-src-ea0d9d2e9af995a203d1871d5aded293a98f5d68.tar.gz
Use inc_flags instead of the inc_isipv6 alias which so far
had been the only flag with random usage patterns. Switch inc_flags to be used as a real bit field by using INC_ISIPV6 with bitops to check for the 'isipv6' condition. While here fix a place or two where in case of v4 inc_flags were not properly initialized before.[1] Found by: rwatson during review [1] Discussed with: rwatson Reviewed by: rwatson MFC after: 4 weeks
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 52ed34b..f6dcae1 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -519,7 +519,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
}
inp->inp_vflag &= ~INP_IPV4;
inp->inp_vflag |= INP_IPV6;
- inp->inp_inc.inc_isipv6 = 1;
+ inp->inp_inc.inc_flags |= INC_ISIPV6;
if (prison_remote_ip6(td->td_ucred, &sin6p->sin6_addr) != 0) {
error = EINVAL;
goto out;
OpenPOWER on IntegriCloud