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).
This commit is contained in:
parent
480d3dd2ea
commit
72e02d4dac
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user