diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 1999-12-15 07:08:01 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 1999-12-15 07:08:01 +0000 |
commit | ab822740b30eed312f5eca401d6bea66bab4b997 (patch) | |
tree | 09b57ee6db9cce57e09cf54b69f1200dad319af9 /sys/netinet6/icmp6.c | |
parent | f5355192bdcc9b6c2df0183084e9014bc661693f (diff) |
do not overwrite traffic class portion when filling in IPv6 version field.
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r-- | sys/netinet6/icmp6.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 7bee3516f95..7e3c6b2a123 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.2 1999/12/10 10:04:27 angelos Exp $ */ +/* $OpenBSD: icmp6.c,v 1.3 1999/12/15 07:08:00 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1261,7 +1261,8 @@ icmp6_reflect(m, off) ip6->ip6_src = *src; ip6->ip6_flow = 0; - ip6->ip6_vfc = IPV6_VERSION; + ip6->ip6_vfc &= ~IPV6_VERSION_MASK; + ip6->ip6_vfc |= IPV6_VERSION; ip6->ip6_nxt = IPPROTO_ICMPV6; if (m->m_pkthdr.rcvif) { /* XXX: This may not be the outgoing interface */ @@ -1580,7 +1581,8 @@ icmp6_redirect_output(m0, rt) /* ip6 */ ip6 = mtod(m, struct ip6_hdr *); ip6->ip6_flow = 0; - ip6->ip6_vfc = IPV6_VERSION; + ip6->ip6_vfc &= ~IPV6_VERSION_MASK; + ip6->ip6_vfc |= IPV6_VERSION; /* ip6->ip6_plen will be set later */ ip6->ip6_nxt = IPPROTO_ICMPV6; ip6->ip6_hlim = 255; |