mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-21 10:18:58 +02:00
Use mac_match() for all MAC matches
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8469 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
41633b4fac
commit
9adb6d57f5
@ -1427,10 +1427,7 @@ sub match_source_net( $;$ ) {
|
|||||||
validate_range $addr1, $addr2;
|
validate_range $addr1, $addr2;
|
||||||
iprange_match . "${invert}--src-range $net ";
|
iprange_match . "${invert}--src-range $net ";
|
||||||
} elsif ( $net =~ /^(!?)~(.*)$/ ) {
|
} elsif ( $net =~ /^(!?)~(.*)$/ ) {
|
||||||
( $net = $2 ) =~ tr/-/:/;
|
mac_match $net;
|
||||||
my $invert = $1 ? '! ' : '';
|
|
||||||
fatal_error "MAC address cannot be used in this context" if $restriction >= OUTPUT_RESTRICT;
|
|
||||||
"-m mac --mac-source ${invert}$net ";
|
|
||||||
} elsif ( $net =~ /^(!?)\+/ ) {
|
} elsif ( $net =~ /^(!?)\+/ ) {
|
||||||
require_capability( 'IPSET_MATCH' , 'ipset names in Shorewall configuration files' , '' );
|
require_capability( 'IPSET_MATCH' , 'ipset names in Shorewall configuration files' , '' );
|
||||||
join( '', '-m set ', $1 ? '! ' : '', get_set_flags( $net, 'src' ) );
|
join( '', '-m set ', $1 ? '! ' : '', get_set_flags( $net, 'src' ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user