fix ifname in network state for pppoe and pptp, add a workaround for isps sending...
[openwrt/openwrt.git] / package / ppp / files / pppoe.sh
index 86bddddf59d33bfa119a842c0c349ec6b345c3cc..ba6a8768daec33884591fe964c41c216ea9460c5 100644 (file)
@@ -12,6 +12,11 @@ setup_interface_pppoe() {
                /sbin/insmod $module 2>&- >&-
        done
 
+       # make sure the network state references the correct ifname
+       scan_ppp "$config"
+       config_get ifname "$config" ifname
+       uci set "/var/state/network.$config.ifname=$ifname"
+
        config_get mtu "$cfg" mtu
        mtu=${mtu:-1492}
        start_pppd "$config" \