Add a warning for opcode inversion when not arptables_jf.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-01-05 13:14:32 -08:00
parent 38aa7f3857
commit 3f24416f37

View File

@ -164,6 +164,7 @@ sub process_arprule() {
if ( $opcode ne '-' ) {
my $invert = ( $opcode =~ s/^!// ) ? '! ' : '';
warning_message q(arptables versions through 0.3.4 ignore '!' after '--opcode') if $invert && ! $arptablesjf;
fatal_error "Invalid ARP OPCODE ($opcode)" unless $opcode =~ /^\d$/ && $opcode;
$rule .= $arptablesjf ? " --arpop ${invert}$map[$opcode] " : "--opcode ${invert}$opcode ";
}