summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw2.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2003-07-12 05:54:17 +0000
committerluigi <luigi@FreeBSD.org>2003-07-12 05:54:17 +0000
commitde6860a1a2a16554cbdbbf4285266f30aa1e9318 (patch)
tree0e385ef318a4c080501777a24e8b7491eca536a1 /sys/netinet/ip_fw2.c
parentd67caeb89db630bf5035e1e435148797619e110b (diff)
downloadFreeBSD-src-de6860a1a2a16554cbdbbf4285266f30aa1e9318.zip
FreeBSD-src-de6860a1a2a16554cbdbbf4285266f30aa1e9318.tar.gz
Implement comments embedded into ipfw2 instructions.
Since we already had 'O_NOP' instructions which always match, all I needed to do is allow the NOP command to have arbitrary length (i.e. move its label in a different part of the switch() which validates instructions). The kernel must know nothing about comments, everything else is done in userland (which will be described in the upcoming ipfw2.c commit).
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r--sys/netinet/ip_fw2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 1a1fdd4..fd30c5c 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -2389,7 +2389,6 @@ check_ipfw_struct(struct ip_fw *rule, int size)
}
DEB(printf("ipfw: opcode %d\n", cmd->opcode);)
switch (cmd->opcode) {
- case O_NOP:
case O_PROBE_STATE:
case O_KEEP_STATE:
case O_PROTO:
@@ -2462,6 +2461,7 @@ check_ipfw_struct(struct ip_fw *rule, int size)
goto bad_size;
break;
+ case O_NOP:
case O_IPID:
case O_IPTTL:
case O_IPLEN:
OpenPOWER on IntegriCloud