diff options
author | bz <bz@FreeBSD.org> | 2008-12-17 12:52:34 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-12-17 12:52:34 +0000 |
commit | ea0d9d2e9af995a203d1871d5aded293a98f5d68 (patch) | |
tree | 062997817526e8ebb92f0a727bd3ebf774556ea8 /sys/netinet6 | |
parent | baed8aaae54e47b5ef994a307febc994595b0e50 (diff) | |
download | FreeBSD-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/netinet6')
-rw-r--r-- | sys/netinet6/icmp6.c | 2 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 42144e5..ac1d10b 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1148,7 +1148,7 @@ icmp6_mtudisc_update(struct ip6ctlparam *ip6cp, int validated) mtu = IPV6_MMTU - 8; bzero(&inc, sizeof(inc)); - inc.inc_flags = 1; /* IPv6 */ + inc.inc_flags |= INC_ISIPV6; inc.inc6_faddr = *dst; if (in6_setscope(&inc.inc6_faddr, m->m_pkthdr.rcvif, NULL)) return; diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index d871363..347406d 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1320,7 +1320,7 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro, struct in_conninfo inc; bzero(&inc, sizeof(inc)); - inc.inc_flags = 1; /* IPv6 */ + inc.inc_flags |= INC_ISIPV6; inc.inc6_faddr = *dst; if (ifp == NULL) |