summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-03-18 15:43:41 +0500
committerDaniil Baturin <daniil@baturin.org>2015-03-18 15:43:41 +0500
commita34187acb9a18514d87948e7cd1c74ecc0f522be (patch)
tree4899cc02dc9ea06121ce475be1a395c70b5686c9
parentc5e9e3caf9a67ed7e8a9c4ff09d2840a3b6115b4 (diff)
parent7eeb5555a90b0592521ab7ceaf87b201868b5406 (diff)
downloadvyatta-cfg-system-a34187acb9a18514d87948e7cd1c74ecc0f522be.tar.gz
vyatta-cfg-system-a34187acb9a18514d87948e7cd1c74ecc0f522be.zip
Merge pull request #47 from kouak/bug519
Bug #519: Add dhcpv6 client-id option
-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