[OpenWrt-Devel] Loss of connectivity on ADSL reset

Tim Coote tim+ietf.org at coote.org
Mon Jan 23 09:16:43 EST 2017

> On 12 Jan 2017, at 21:24, Hans Dedecker <hans.dedecker at telenet.be> wrote:
> On Thursday, 12 January 2017 10:24:45 CET Tim Coote wrote:
>> config interface 'e0'
>> 	option ifname 'eth0'
>> 	option proto 'pppoe'
>> 	option username ‘<login username>'
>> 	option password ‘<login password>'
>> config interface 'e0ext'
>> 	option ifname 'pppoe-e0'
> You need to configure the ifname as an aliased interface of interface e0; eg 
> option ifname @e0
> Hans

The advice worked. Thanks. However, when I updated trunk, I found that ipv6 refreshes weren’t happening. I created an Issue on github, but I’m not sure that was the best approach.

I can see the ppp interface issuing a renew message for its prefix, and getting a response from the ISP. However, after the update, IPv6 addresses become deprecated after an hour, rather than being renewed after 30 mins.

Using git bisect, and a very small hack, I believe that I’ve identified the commits that broke using ipv6 over pppoe with hnet, but I’m also sure that I don’t understand the design anything like well enough to confirm that I’ve found a real issue with the code (as opposed to how I’ve set it up), or a reasonable fix.

On openwrt:
# first bad commit: [0b394dd2f5133466ac0920d3ab4ca7f66c42ac98] netifd: bump to 2016-12-09

That bump included quite a few changes, so I had to bisect that too:
# first bad commit: [b8ef742bd04ebef324ae11aee56c6e1d2cb7e0ad] interface: Fix triggering of interface update event

The relevant change seems to be:
--- a/interface.c
+++ b/interface.c
@@ -693,7 +693,8 @@ interface_proto_event_cb(struct interface_proto_state *state, enum interface_pro
        switch (ev) {
        case IFPEV_UP:
                if (iface->state != IFS_SETUP) {
-                       interface_event(iface, IFEV_UPDATE);
+                       if (iface->state == IFS_UP && iface->updated)
+                               interface_event(iface, IFEV_UPDATE);

Putting in some logging, I found that there seem to be no calls with iface->updated for any interface with any value other than 0 (within a 30-60 minute test window).

If I remove the test on iface->updated in the first inserted line, updates do seem to propagate and the ipv6 addresses on other interfaces get updated valid_lft and preferred_lft values get reset to 2 and 1 hours respectively after 30 mins.

I have no idea what the impact of calling interface_event is for interface updates on other interfaces, but since that was the previous behaviour, presumably there’s some issue with doing that.

Is there anything that I can do to help with this?


Tim Coote
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list