diff options
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 |