hello,
from my tests using wide-dhcp6 client over a ipv6 enabled pppoe link it seems 
the /etc/init.d/dhcp6c script will attempt to generate duid using "pppoe-wan" 
which ofcourse does not have a hw addr.

with trunk r30004 (and using netifd) it seems "config_get wan ifname" will 
always return pppoe-wan instead of eth1 but calling "uci get 
network.wan.ifname" will get the correct ifname..

what would be a better approach for all of us, users and devs, submitting a bug 
about the openwrt scripts behavior or a small patch for wide-dhcp ?

something like:

Index: dhcp6c.init 
=================================================================== 
--- dhcp6c.init (revision 30004) 
+++ dhcp6c.init (working copy) 
@@ -24,6 +24,12 @@ 
}

dhcp6c_write_duid() { 
+ 
+ if [ "$client_device" == "pppoe-wan" ]; then 
+ local client_device="`uci get network.$client_interface.ifname`" 
+ fi 
+ 
+ 
local mac="${1:-$(ifconfig "$client_device" | sed -ne 's/[[:space:]]*$//; 
s/.*HWaddr //p')}" 
local pat="[0-9A-F][0-9A-F]"
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to