svn commit: r337902 - stable/11/sys/netpfil/ipfw/pmod

Andrey V. Elsukov ae at FreeBSD.org
Thu Aug 16 09:42:10 UTC 2018


Author: ae
Date: Thu Aug 16 09:42:09 2018
New Revision: 337902
URL: https://svnweb.freebsd.org/changeset/base/337902

Log:
  MFC r337469:
    Use host byte order when comparing mss values.
  
    This fixes tcp-setmss action on little endian machines.
  
    PR:		225536
    Submitted by:	John Zielinski

Modified:
  stable/11/sys/netpfil/ipfw/pmod/tcpmod.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netpfil/ipfw/pmod/tcpmod.c
==============================================================================
--- stable/11/sys/netpfil/ipfw/pmod/tcpmod.c	Thu Aug 16 09:36:59 2018	(r337901)
+++ stable/11/sys/netpfil/ipfw/pmod/tcpmod.c	Thu Aug 16 09:42:09 2018	(r337902)
@@ -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. */


More information about the svn-src-all mailing list