Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2014 11:15:12 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272609 - head/sys/netpfil/ipfw
Message-ID:  <201410061115.s96BFCmj017308@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Mon Oct  6 11:15:11 2014
New Revision: 272609
URL: https://svnweb.freebsd.org/changeset/base/272609

Log:
  Fix O_TCPOPTS processing.
  
  Obtained from:	luigi

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw2.c	Mon Oct  6 11:05:56 2014	(r272608)
+++ head/sys/netpfil/ipfw/ip_fw2.c	Mon Oct  6 11:15:11 2014	(r272609)
@@ -1722,9 +1722,13 @@ do {								\
 				break;
 
 			case O_TCPOPTS:
-				PULLUP_LEN(hlen, ulp, (TCP(ulp)->th_off << 2));
-				match = (proto == IPPROTO_TCP && offset == 0 &&
-				    tcpopts_match(TCP(ulp), cmd));
+				if (proto == IPPROTO_TCP && ulp != NULL) {
+					PULLUP_LEN(hlen, ulp,
+					    (TCP(ulp)->th_off << 2));
+					match = (proto == IPPROTO_TCP &&
+					    offset == 0 &&
+					    tcpopts_match(TCP(ulp), cmd));
+				}
 				break;
 
 			case O_TCPSEQ:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410061115.s96BFCmj017308>