summaryrefslogtreecommitdiff
path: root/scripts/vyatta-dhcpv6-client.pl
diff options
context:
space:
mode:
authorkouak <kouak@kouak.org>2015-03-18 00:39:14 +0100
committerkouak <kouak@kouak.org>2015-03-18 00:46:04 +0100
commit7eeb5555a90b0592521ab7ceaf87b201868b5406 (patch)
tree4899cc02dc9ea06121ce475be1a395c70b5686c9 /scripts/vyatta-dhcpv6-client.pl
parentc5e9e3caf9a67ed7e8a9c4ff09d2840a3b6115b4 (diff)
downloadvyatta-cfg-system-7eeb5555a90b0592521ab7ceaf87b201868b5406.tar.gz
vyatta-cfg-system-7eeb5555a90b0592521ab7ceaf87b201868b5406.zip
Add dhcpv6 client-id option (#519)
Diffstat (limited to 'scripts/vyatta-dhcpv6-client.pl')
-rwxr-xr-xscripts/vyatta-dhcpv6-client.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/vyatta-dhcpv6-client.pl b/scripts/vyatta-dhcpv6-client.pl
index 45318aef..384d4d62 100755
--- a/scripts/vyatta-dhcpv6-client.pl
+++ b/scripts/vyatta-dhcpv6-client.pl
@@ -49,6 +49,18 @@ sub gen_conf_file {
print $FD_WR "# Generated on $date by $user\n";
print $FD_WR "#\n";
print $FD_WR "interface \"$ifname\" {\n";
+
+ my $intf = new Vyatta::Interface($ifname)
+ or die "Can't find interface $ifname\n";
+ my $level = $intf->path() . ' dhcpv6-options';
+
+ my $config = new Vyatta::Config;
+ $config->setLevel($level);
+
+ if ($config->exists('duid')) {
+ my $duid = $config->returnValue('duid');
+ print $FD_WR " send dhcp6.client-id $duid;\n";
+ }
# my $hostname = hostname;
# print $FD_WR " send host-name \"$hostname\";\n";
# print $FD_WR " send dhcp6.oro 1, 2, 7, 12, 13, 23, 24, 39;\n";