mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-18 15:02:59 +02:00
general-functions.pl: Replace lots of broken network code.
The state of some code especially in general-functions.pl is in such a bad shape and faulty. This is a first step that replaces some of the network functions with those who have been tested and work for undefined inputs. The old functions have been left in place as stubs and must be removed at some time.
This commit is contained in:
@@ -291,6 +291,7 @@ sub buildrules {
|
||||
|
||||
foreach my $src (@sources) {
|
||||
# Skip invalid source.
|
||||
next unless (defined $src);
|
||||
next unless ($src);
|
||||
|
||||
# Sanitize source.
|
||||
@@ -301,6 +302,7 @@ sub buildrules {
|
||||
|
||||
foreach my $dst (@destinations) {
|
||||
# Skip invalid rules.
|
||||
next unless (defined $dst);
|
||||
next if (!$dst || ($dst eq "none"));
|
||||
|
||||
# Sanitize destination.
|
||||
|
||||
Reference in New Issue
Block a user