diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-07-07 19:45:27 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-07-07 19:45:27 +0000 |
commit | b756f9eae9671430bfec8135b79f239232b06b43 (patch) | |
tree | e1ebd17de75f25868247ab37eda3f61dc3b88362 /sys | |
parent | ef72cbe7ddb03fa28d4cf270ca4e294442a0eef9 (diff) |
Keep mbuf header field ph_mss during loopback TCP with LRO/TSO.
When M_TCP_TSO is preserved, also keep ph_mss. In lo(4) this logic
was missing. This may be relevant only for weird pf configs that
forward from loopback.
OK mvs@ jan@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index fd54cc813f3..27570bef2f2 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.705 2023/07/07 08:05:02 bluhm Exp $ */ +/* $OpenBSD: if.c,v 1.706 2023/07/07 19:45:26 bluhm Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -782,6 +782,7 @@ int if_input_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af) { int keepflags, keepcksum; + uint16_t keepmss; #if NBPFILTER > 0 /* @@ -807,9 +808,11 @@ if_input_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af) keepcksum = m->m_pkthdr.csum_flags & (M_IPV4_CSUM_OUT | M_TCP_CSUM_OUT | M_UDP_CSUM_OUT | M_ICMP_CSUM_OUT | M_TCP_TSO); + keepmss = m->m_pkthdr.ph_mss; m_resethdr(m); m->m_flags |= M_LOOP | keepflags; m->m_pkthdr.csum_flags = keepcksum; + m->m_pkthdr.ph_mss = keepmss; m->m_pkthdr.ph_ifidx = ifp->if_index; m->m_pkthdr.ph_rtableid = ifp->if_rdomain; |