summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-04 16:52:26 +0000
committerluigi <luigi@FreeBSD.org>2010-03-04 16:52:26 +0000
commite983b27b49c31eacb1450f8e1df5c27ad1d6b669 (patch)
tree9ce6bce4146cd5074f26bcba36b547190e56367c /sys/netinet
parent302fda42a4e4f9f151c2e3fc0972e1e30ce861c3 (diff)
downloadFreeBSD-src-e983b27b49c31eacb1450f8e1df5c27ad1d6b669.zip
FreeBSD-src-e983b27b49c31eacb1450f8e1df5c27ad1d6b669.tar.gz
improve compatibility with RELENG_7.2
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ipfw/ip_fw_sockopt.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netinet/ipfw/ip_fw_sockopt.c b/sys/netinet/ipfw/ip_fw_sockopt.c
index f61c126..9d67dc0 100644
--- a/sys/netinet/ipfw/ip_fw_sockopt.c
+++ b/sys/netinet/ipfw/ip_fw_sockopt.c
@@ -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);
OpenPOWER on IntegriCloud