summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_gif.c
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2014-07-24 10:42:47 +0000
committerhrs <hrs@FreeBSD.org>2014-07-24 10:42:47 +0000
commit45044bb8e3af7094f5036d5559be6db94d636f8e (patch)
tree1fe9acc72d07037492cc3a3a18ab707ed499893e /sys/netinet6/in6_gif.c
parentb50b5e1d490cac7c939a304ba97393bcc321a997 (diff)
downloadFreeBSD-src-45044bb8e3af7094f5036d5559be6db94d636f8e.zip
FreeBSD-src-45044bb8e3af7094f5036d5559be6db94d636f8e.tar.gz
Fix EtherIP. TOS field must be initialized when the inner protocol is
PF_LINK, and multicast/broadcast flag should always be dropped because the outer protocol uses unicast even when the inner address is not for unicast. It had been broken since r236951 when gif_output() started to use IFQ_HANDOFF().
Diffstat (limited to 'sys/netinet6/in6_gif.c')
-rw-r--r--sys/netinet6/in6_gif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index 53188f1..28fa823 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -176,6 +176,7 @@ in6_gif_output(struct ifnet *ifp,
return ENOBUFS;
bcopy(&eiphdr, mtod(m, struct etherip_header *),
sizeof(struct etherip_header));
+ itos = 0;
break;
default:
@@ -266,6 +267,7 @@ in6_gif_output(struct ifnet *ifp,
#endif
}
+ m->m_flags &= ~(M_BCAST|M_MCAST);
#ifdef IPV6_MINMTU
/*
* force fragmentation to minimum MTU, to avoid path MTU discovery.
OpenPOWER on IntegriCloud