With current openwrt base-files provided network configuration scripts, DSL 
modem for PPPoE WAN must be connected to a separate Ethernet port (WAN port). 
While this is probably the most intuitive, most common way of connecting a 
router to a DSL modem, I can't see why it couldn't be possible to connect it 
over the same Ethernet segment that my LAN is running on.

This patch slightly modifies two configuration scripts, allowing for PPPoE 
WAN over LAN port (eth0.0, br-lan, etc.) setup working correctly for me.

Created and tested against openwrt svn revision 20230.

Signed-off-by: Janusz Krzysztofik <[email protected]>
---

NB, applying this patch should allow for closing ticket #6796.

Thanks,
Janusz

--- trunk/package/base-files/files/lib/network/config.sh.orig   2010-03-15 
13:37:25.000000000 +0100
+++ trunk/package/base-files/files/lib/network/config.sh        2010-03-15 
13:48:28.000000000 +0100
@@ -95,9 +95,9 @@ prepare_interface() {
                config_get proto "$config" proto
 
                # make sure the interface is removed from any existing bridge 
and deconfigured,
-               # (deconfigured only if the interface is not set to proto=none)
+               # (deconfigured only if the interface is not set to proto=none 
nor proto=pppoe)
                unbridge "$iface"
-               [ "$proto" = none ] || ifconfig "$iface" 0.0.0.0
+               [ "$proto" = none ] || [ "$proto" = pppoe ] || ifconfig 
"$iface" 0.0.0.0
 
                # Change interface MAC address if requested
                [ -n "$vifmac" ] && {
--- trunk/package/base-files/files/sbin/ifdown.orig     2010-03-11 
23:45:33.000000000 +0100
+++ trunk/package/base-files/files/sbin/ifdown  2010-03-15 13:47:09.000000000 
+0100
@@ -54,7 +54,7 @@ rm -f /var/run/${ifname}.pid /var/run/pp
 config_get ifname "$cfg" ifname
 config_get device "$cfg" device
 
-[ ."$device" != ."$ifname" ] || device=
+[ ."$device" != ."$ifname" ] && [ "$proto" != pppoe ] || device=
 for dev in $ifname $device; do
        ifconfig "$dev" 0.0.0.0 down >/dev/null 2>/dev/null
 done
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to