mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-12 18:54:25 +01:00
Avoid dereference of null variable
This commit is contained in:
parent
ba8ad6346a
commit
6987cd15c5
@ -1734,7 +1734,7 @@ sub match_source_dev( $ ) {
|
||||
my $interface = shift;
|
||||
return '' if $interface eq '+';
|
||||
my $interfaceref = known_interface( $interface );
|
||||
my $physical = $interfaceref->{physical};
|
||||
my $physical = $interfaceref ? $interfaceref->{physical} : $interface;
|
||||
if ( $interfaceref && $interfaceref->{options}{port} ) {
|
||||
"-i $interfaceref->{bridge} -m physdev --physdev-in $physical ";
|
||||
} else {
|
||||
@ -1749,7 +1749,7 @@ sub match_dest_dev( $ ) {
|
||||
my $interface = shift;
|
||||
return '' if $interface eq '+';
|
||||
my $interfaceref = known_interface( $interface );
|
||||
my $physical = $interfaceref->{physical};
|
||||
my $physical = $interfaceref ? $interfaceref->{physical} : $interface;
|
||||
if ( $interfaceref && $interfaceref->{options}{port} ) {
|
||||
if ( $capabilities{PHYSDEV_BRIDGE} ) {
|
||||
"-o $interfaceref->{bridge} -m physdev --physdev-is-bridged --physdev-out $physical ";
|
||||
|
Loading…
Reference in New Issue
Block a user