diff options
author | Vincent Gross <vgross@cvs.openbsd.org> | 2016-05-04 13:22:52 +0000 |
---|---|---|
committer | Vincent Gross <vgross@cvs.openbsd.org> | 2016-05-04 13:22:52 +0000 |
commit | e68f5b69366930e3f289b0d36579e5c5f0fa57f7 (patch) | |
tree | dc660d70e18243ca912f2dac82edeffeac3b5d60 /sys | |
parent | b5c4e02ff65e4de71cbda9a87ba55aeafdf6da2f (diff) |
Preserve DiffServ value when fragmenting an ipv4 packet.
Ok phessler@, henning@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_output.c | 5 |
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; |