From ea0d9d2e9af995a203d1871d5aded293a98f5d68 Mon Sep 17 00:00:00 2001 From: bz 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/netinet6/icmp6.c | 2 +- sys/netinet6/ip6_output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet6') 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) -- cgit v1.1