summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-09-06 19:21:23 +0200
committerDaniil Baturin <daniil@baturin.org>2019-09-06 19:22:13 +0200
commit502910cb7ac371bfd0d28d5f1e3c9bec0f2d332c (patch)
tree7e8fb0822d1dad77e1230b8667ebafa9ce6bb73a
parent4216f490a14328b99d309b86f1c643410e7140ea (diff)
downloadvyatta-cfg-system-502910cb7ac371bfd0d28d5f1e3c9bec0f2d332c.tar.gz
vyatta-cfg-system-502910cb7ac371bfd0d28d5f1e3c9bec0f2d332c.zip
T1616: fix DHCPv6 script behaviour in op mode.
-rwxr-xr-xscripts/vyatta-dhcpv6-client.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/vyatta-dhcpv6-client.pl b/scripts/vyatta-dhcpv6-client.pl
index 64c6840d..b78d40b5 100755
--- a/scripts/vyatta-dhcpv6-client.pl
+++ b/scripts/vyatta-dhcpv6-client.pl
@@ -57,8 +57,14 @@ sub gen_conf_file {
my $config = new Vyatta::Config;
$config->setLevel($level);
- if ($config->exists('duid')) {
- my $duid = $config->returnValue('duid');
+ my $duid = '';
+ if($config->inSession()) {
+ $duid = $config->returnValue('duid');
+ } else {
+ $duid = $config->returnEffectiveValue('duid');
+ }
+
+ if($duid) {
print $FD_WR " send dhcp6.client-id $duid;\n";
}
# my $hostname = hostname;