summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvgross <vgross@openbsd.org>2016-05-04 13:22:51 +0000
committervgross <vgross@openbsd.org>2016-05-04 13:22:51 +0000
commit3293c414bd8ecd440b336d5834c955027a336a5c (patch)
tree98e6c988053b9cfc62313420263e0d01c25f4e6f
parentIdentityAgent for specifying specific agent sockets; ok djm@ (diff)
downloadwireguard-openbsd-3293c414bd8ecd440b336d5834c955027a336a5c.tar.xz
wireguard-openbsd-3293c414bd8ecd440b336d5834c955027a336a5c.zip
Preserve DiffServ value when fragmenting an ipv4 packet.
Ok phessler@, henning@
-rw-r--r--sys/netinet/ip_output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index d0b15f8a93a..17cdf846eea 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.321 2016/04/29 11:40:27 bluhm Exp $ */
+/* $OpenBSD: ip_output.c,v 1.322 2016/05/04 13:22:51 vgross Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -678,9 +678,10 @@ ip_fragment(struct mbuf *m, struct ifnet *ifp, u_long mtu)
m->m_data += max_linkhdr;
mhip = mtod(m, struct ip *);
*mhip = *ip;
- /* we must inherit MCAST and BCAST flags and routing table */
+ /* we must inherit MCAST/BCAST flags, routing table and prio */
m->m_flags |= m0->m_flags & (M_MCAST|M_BCAST);
m->m_pkthdr.ph_rtableid = m0->m_pkthdr.ph_rtableid;
+ m->m_pkthdr.pf.prio = m0->m_pkthdr.pf.prio;
if (hlen > sizeof (struct ip)) {
mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip);
mhip->ip_hl = mhlen >> 2;