mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-14 19:54:06 +01:00
Another error check for hosts files and loopback zones.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
446f764d19
commit
eaf1d0e5c2
@ -1899,7 +1899,11 @@ sub process_host( ) {
|
||||
$hosts = $2;
|
||||
|
||||
fatal_error "Unknown interface ($interface)" unless ($interfaceref = $interfaces{$interface}) && $interfaceref->{root};
|
||||
fatal_error "Loopback zones may only be associated with the loopback interface (lo)" if $type == LOOPBACK && $interfaceref->{name} ne 'lo';
|
||||
if ( $interfaceref->{name} eq 'lo' ) {
|
||||
fatal_error "Only a loopback zone may be associated with the loopback interface (lo)" if $type != LOOPBACK;
|
||||
} else {
|
||||
fatal_error "Loopback zones may only be associated with the loopback interface (lo)" if $type == LOOPBACK;
|
||||
}
|
||||
} else {
|
||||
fatal_error "Invalid HOST(S) column contents: $hosts"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user