summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkouak <kouak@kouak.org>2015-03-18 00:39:14 +0100
committerDaniil Baturin <daniil@baturin.org>2017-09-14 14:02:48 +0200
commit1c2c0e9270d10f00d0b18ebf45a7a23a6b763531 (patch)
treeb982b64f50a75248b0f1438fef6da073a9e159b9
parent0e52d7cc7cf0b4bead4b7e250f514e1501ed627e (diff)
downloadvyatta-cfg-system-1c2c0e9270d10f00d0b18ebf45a7a23a6b763531.tar.gz
vyatta-cfg-system-1c2c0e9270d10f00d0b18ebf45a7a23a6b763531.zip
Add dhcpv6 client-id option (#519)
-rwxr-xr-xscripts/vyatta-dhcpv6-client.pl12
-rw-r--r--templates/interfaces/ethernet/node.tag/dhcpv6-options/duid/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/dhcpv6-options/duid/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/duid/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/dhcpv6-options/duid/node.def2
5 files changed, 20 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";
diff --git a/templates/interfaces/ethernet/node.tag/dhcpv6-options/duid/node.def b/templates/interfaces/ethernet/node.tag/dhcpv6-options/duid/node.def
new file mode 100644
index 00000000..218f2ee4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/dhcpv6-options/duid/node.def
@@ -0,0 +1,2 @@
+type:txt
+help: DHCPv6 DUID to be sent by dhcpv6 client
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/dhcpv6-options/duid/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/dhcpv6-options/duid/node.def
new file mode 100644
index 00000000..218f2ee4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/dhcpv6-options/duid/node.def
@@ -0,0 +1,2 @@
+type:txt
+help: DHCPv6 DUID to be sent by dhcpv6 client
diff --git a/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/duid/node.def b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/duid/node.def
new file mode 100644
index 00000000..218f2ee4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/vif-s/node.tag/vif-c/node.tag/dhcpv6-options/duid/node.def
@@ -0,0 +1,2 @@
+type:txt
+help: DHCPv6 DUID to be sent by dhcpv6 client
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/dhcpv6-options/duid/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/dhcpv6-options/duid/node.def
new file mode 100644
index 00000000..218f2ee4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/dhcpv6-options/duid/node.def
@@ -0,0 +1,2 @@
+type:txt
+help: DHCPv6 DUID to be sent by dhcpv6 client