- my @data = split(/\s+/, $line);
- my $expected_elements = $need_iface ? 8 : 7;
-
- die "wrong number of rule elements\n" if scalar(@data) > $expected_elements;
-
- if ($need_iface) {
- ($type, $action, $iface, $source, $dest, $proto, $dport, $sport) = @data
- } else {
- ($type, $action, $source, $dest, $proto, $dport, $sport) = @data;
- }
-
- die "incomplete rule\n" if ! ($type && $action);
-
- my $macro;
-
- $type = lc($type);