Hi Luka,

On 18 Jan 2012, at 22:04, Luka Perkov <open...@lukaperkov.net> wrote:

> Hi Lee,
> 
> On Wed, Jan 18, 2012 at 01:22:10PM +0000, lee.es...@nowonline.co.uk wrote:
>> The attached patch adds a "notify" script to the dsl_cpe_control app
>> to bring the relevant pppoa interface up (or down) whenever there is
>> a line status change.
>> 
>> As far as I can tell the existing hotplug mechanism doesn't work for
>> non-br2684 based systems as there is no nas0 interface created, and
>> hence no hotplug event ... so the ppp link stays down until you
>> manually start it, people may be surviving by having an erroneous
>> bridge configured (which seems to be the default), but clearly this
>> isn't the right behaviour.
>> 
>> The patch largely replicates the code from the atm hotplug script
>> (with the addition of support for the link going down.)
> 
> I did not test your patch yet but I think that regardles of the proto we 
> should
> do ifup/ifdown. For example I use dhcp...
> 

I'm not sure I understand what you mean?  If this script didn't look for pppoa 
interfaces then it would try to bring up any 'down' interfaces when the DSL 
line came up, and more worryingly it would take every interface down when the 
link went down.

My understanding is that you either use a br2684 bridge (for pppoe based DSL 
providers) or pppoa for native pppoa DSL providers (although I've no experience 
of the bridge option so I am making some assumptions.)

In the bridge case the ppp link comes up as part of the hotplug mechanism, but 
for pppoa you need to trigger it as per the patch. So I'm not sure why you 
would look at non pppoa interfaces? In fact the code is mostly copied from the 
hotplug atm script to ensure the behaviour is as similar as possible.

> +       if [ "$DSL_INTERFACE_STATUS" = "UP" ]; then
> +               if [ "$proto" = "pppoa" ] && [ "$up" != 1 ] && [ "$auto" = 1 
> ]; then
> +                       found=1
> +                       ( sleep 1; ifup "$ifc" ) &
> +               fi
> +       else
> +               if [ "$proto" = "pppoa" ] && [ "$up" = 1 ] && [ "$auto" = 1 
> ]; then
> +                       found=1
> +                       ( sleep 1; ifdown "$ifc" ) &
> +               fi
> +       fi
> +done
> 
> This is the part of the patch I'm refering to. Please send your patches inline
> in the future.

Oops, apologies ... will do.

> 
> Regards,
> Luka

Regards,

Lee.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to