mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 16:54:10 +01:00
Validate MAC addresses
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8466 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
5052246e9c
commit
c805d895b7
@ -1194,6 +1194,8 @@ sub mac_match( $ ) {
|
||||
$mac =~ s/^!// if my $invert = ( $1 ? '! ' : '');
|
||||
$mac =~ tr/-/:/;
|
||||
|
||||
fatal_error "Invalid MAC address ($mac)" unless $mac =~ /^([0-9a-fA-f]{2}:){5}[0-9a-fA-f]{2}$/;
|
||||
|
||||
"--match mac --mac-source ${invert}$mac ";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user