diff options
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index a7384eea..5a17be04 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -466,7 +466,8 @@ sub is_valid_addr_commit { if (defined($bond)); my $dhcp = grep { /^dhcp$/ } @addrs; - my $static_v4 = grep { is_ip_v4_or_v6($_) == 4 } @addrs; + my $static_v4 = grep { my $v = is_ip_v4_or_v6($_); + defined($v) && $v == 4 } @addrs; die "Can't configure static IPv4 address and DHCP on the same interface.\n" if ($static_v4 && $dhcp); |