svn commit: r337469 - head/sys/netpfil/ipfw/pmod
Andrey V. Elsukov
ae at FreeBSD.org
Wed Aug 8 17:32:03 UTC 2018
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. */
More information about the svn-src-all
mailing list