summaryrefslogtreecommitdiff
path: root/scripts/vyatta-interfaces.pl
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2010-05-26 16:11:36 -0700
committerBob Gilligan <gilligan@vyatta.com>2010-05-26 16:11:36 -0700
commit74105f39b3646c12c0dfed647c7fd9922cdd864e (patch)
treea5e63ce37d25d4bdb12cf0c5aa5f7dfa40014d61 /scripts/vyatta-interfaces.pl
parentfcc3a7c4d5465022a9f7092fc5d335a44e4211e4 (diff)
downloadvyatta-cfg-system-74105f39b3646c12c0dfed647c7fd9922cdd864e.tar.gz
vyatta-cfg-system-74105f39b3646c12c0dfed647c7fd9922cdd864e.zip
Move DHCPv6 client configuration to this package and restructre parameters.
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-xscripts/vyatta-interfaces.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 90d8dfc7..42ffc7d8 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -356,6 +356,13 @@ sub is_valid_addr_set {
exit 0;
}
+ if ($addr_net eq "dhcpv6") {
+ die "Error: can't use dhcpv6 client on loopback interface\n"
+ if ($intf eq "lo");
+
+ exit 0;
+ }
+
my ($addr, $net);
if ($addr_net =~ m/^([0-9a-fA-F\.\:]+)\/(\d+)$/) {
$addr = $1;
@@ -423,7 +430,7 @@ sub is_valid_addr_commit {
$dhcp = 1;
} else {
my $version = is_ip_v4_or_v6($addr);
- if ($version == 4) {
+ if (defined($version) && $version == 4) {
$static_v4 = 1;
}
}