From dcdb4371ca97ecfaabf614fb5bcc04dd81df34c8 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Wed, 17 Dec 2008 12:52:34 +0000 Subject: 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 --- sys/netinet/tcp_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netinet/tcp_usrreq.c') diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 52ed34b17bf5..f6dcae1a20b0 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; -- cgit v1.2.3