Date: Wed, 8 Aug 2018 17:32:03 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337469 - head/sys/netpfil/ipfw/pmod Message-ID: <201808081732.w78HW3r7002184@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Wed Aug 8 17:32:02 2018 New Revision: 337469 URL: https://svnweb.freebsd.org/changeset/base/337469 Log: Use host byte order when comparing mss values. This fixes tcp-setmss action on little endian machines. PR: 225536 Submitted by: John Zielinski Modified: head/sys/netpfil/ipfw/pmod/tcpmod.c Modified: head/sys/netpfil/ipfw/pmod/tcpmod.c ============================================================================== --- head/sys/netpfil/ipfw/pmod/tcpmod.c Wed Aug 8 17:26:51 2018 (r337468) +++ head/sys/netpfil/ipfw/pmod/tcpmod.c Wed Aug 8 17:32:02 2018 (r337469) @@ -98,7 +98,7 @@ tcpmod_setmss(struct mbuf **mp, struct tcphdr *tcp, in ret = 0; /* report success */ bcopy(cp + 2, &oldmss, sizeof(oldmss)); /* Do not update lower MSS value */ - if (oldmss <= mss) + if (ntohs(oldmss) <= ntohs(mss)) break; bcopy(&mss, cp + 2, sizeof(mss)); /* Update checksum if it is not delayed. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808081732.w78HW3r7002184>