diff mbox

[OpenWrt-Devel] Loss of connectivity on ADSL reset

Message ID 4D2DC961-2FDD-4A13-8ABF-9CBA5FDBC2A5@coote.org
State Changes Requested
Delegated to: John Crispin
Headers show

Commit Message

Tim Coote Jan. 23, 2017, 2:16 p.m. UTC
> On 12 Jan 2017, at 21:24, Hans Dedecker <hans.dedecker@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:
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?

regards

Tim Coote

Comments

Tim Coote March 8, 2017, 4:05 p.m. UTC | #1
> On 23 Jan 2017, at 14:16, Tim Coote <tim+ietf.org@coote.org> wrote:
> [snip]
> 
> 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.

No reaction to the github issue that I raised (http://bit.ly/2mlSpOU). I suppose that I’ve not got a grip on how to get agreement that there is an issue and that it needs to be fixed. 

Any suggestions - I’d like to get back on trunk?

Tim
diff mbox

Patch

--- 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);
                        return;
                }