Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 2010 16:52:26 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204713 - head/sys/netinet/ipfw
Message-ID:  <201003041652.o24GqQNk031557@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Thu Mar  4 16:52:26 2010
New Revision: 204713
URL: http://svn.freebsd.org/changeset/base/204713

Log:
  improve compatibility with RELENG_7.2

Modified:
  head/sys/netinet/ipfw/ip_fw_sockopt.c

Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_sockopt.c	Thu Mar  4 16:08:51 2010	(r204712)
+++ head/sys/netinet/ipfw/ip_fw_sockopt.c	Thu Mar  4 16:52:26 2010	(r204713)
@@ -1212,6 +1212,13 @@ convert_rule_to_7(struct ip_fw *rule)
 		ccmdlen = F_LEN(ccmd);
 
 		bcopy(ccmd, dst, F_LEN(ccmd)*sizeof(uint32_t));
+
+		if (dst->opcode > O_NAT)
+			/* O_REASS doesn't exists in 7.2 version, so
+			 * decrement opcode if it is after O_REASS
+			 */
+			dst->opcode--;
+
 		if (ccmdlen > ll) {
 			printf("ipfw: opcode %d size truncated\n",
 				ccmd->opcode);
@@ -1246,6 +1253,13 @@ convert_rule_to_8(struct ip_fw *rule)
 		ccmdlen = F_LEN(ccmd);
 		
 		bcopy(ccmd, dst, F_LEN(ccmd)*sizeof(uint32_t));
+
+		if (dst->opcode > O_NAT)
+			/* O_REASS doesn't exists in 7.2 version, so
+			 * increment opcode if it is after O_REASS
+			 */
+			dst->opcode++;
+
 		if (ccmdlen > ll) {
 			printf("ipfw: opcode %d size truncated\n",
 			    ccmd->opcode);



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