Fix a typo with TSO logic in ip6_output(). Of course compare ph_mss
authorbluhm <bluhm@openbsd.org>
Tue, 13 Jun 2023 19:34:12 +0000 (19:34 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 13 Jun 2023 19:34:12 +0000 (19:34 +0000)
with if_mtu and not the packet checksum flags.  ph_mss contains the
size of the copped packets.
OK jan@

sys/netinet6/ip6_output.c

index 05c1189..f2fa351 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ip6_output.c,v 1.277 2023/05/22 16:08:34 bluhm Exp $  */
+/*     $OpenBSD: ip6_output.c,v 1.278 2023/06/13 19:34:12 bluhm Exp $  */
 /*     $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $    */
 
 /*
@@ -688,7 +688,7 @@ reroute:
                dontfrag = 0;
        if (dontfrag &&                                 /* case 2-b */
            (ISSET(m->m_pkthdr.csum_flags, M_TCP_TSO) ?
-           m->m_pkthdr.csum_flags : tlen) > ifp->if_mtu) {
+           m->m_pkthdr.ph_mss : tlen) > ifp->if_mtu) {
 #ifdef IPSEC
                if (ip_mtudisc)
                        ipsec_adjust_mtu(m, mtu);