Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expired IPv6 router causes an infinite loop #21339

Closed
ghost opened this issue Dec 12, 2019 · 0 comments · Fixed by #21340
Closed

Expired IPv6 router causes an infinite loop #21339

ghost opened this issue Dec 12, 2019 · 0 comments · Fixed by #21340
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@ghost
Copy link

ghost commented Dec 12, 2019

An expired IPv6 router causes an infinite loop where iface_router_run_timer() repeatedly scheduled a work item with negative delay.

Environment: Zephyr v2.0.0 on native_posix, SDK 0.10.3. This bug also manifests itself on newer versions (current master 3765e46) and on ARM Cortex-M hardware.

Steps to reproduce on v2.0.0:

  • Use samples/net/eth_native_posix
  • Remove CONFIG_NET_CONFIG_* from prj.conf to get SLAAC
  • Run net-setup.sh from net-tools
  • Start radvd with a config like this:
interface zeth
{
    AdvSendAdvert on;
    MinRtrAdvInterval 3;
    MaxRtrAdvInterval 4;
    AdvDefaultLifetime 7;

    prefix 2001:db8::/64
    {
        AdvValidLifetime infinity;
        AdvPreferredLifetime infinity;
    };
};
  • Start eth_native_posix sample and wait until it gets a prefix
  • Stop radvd from working with ctrl-z (not ctrl-c)
  • Wait for the router to time out (7 seconds)
  • Observe iface_router_expired and iface_router_run_timer getting called repeatedly (you might have added a printk there)

On master this problem still exists, but the infinite loop doesn't happen until the router re-appears. I'm not exactly sure why.

@ghost ghost added the bug The issue is a bug, or the PR is fixing a bug label Dec 12, 2019
@ghost ghost changed the title Expired IPv6 router causes an infinite Expired IPv6 router causes an infinite loop Dec 12, 2019
@jukkar jukkar added area: Networking priority: low Low impact/importance bug labels Dec 13, 2019
@jukkar jukkar assigned ghost Dec 13, 2019
jukkar pushed a commit that referenced this issue Dec 13, 2019
An expired IPv6 router would cause an infinite loop where
iface_router_run_timer() repeatedly scheduled a work item. In some
conditions it would schedule with negative delay, in other conditions
the infinite loop wouldn't happen until a router was added again.

Get rid of the router from active_router_timers when it is removed.

Fixes #21339

Signed-off-by: Jonas Norling <jonas.norling@greeneggs.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant