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

FS#2464 - netifd: changing metric, ip4table or defaultroute flushes babeld's routes from the main table #8382

Closed
openwrt-bot opened this issue Aug 25, 2019 · 0 comments
Labels

Comments

@openwrt-bot
Copy link

mikma:

Tested device: Virtual x86_64
Software versions:
openwrt 18.06.4
netifd 2019-01-31-a2aba5c7-2.1

Reproduce:

  • Use babeld as dynamic routing daemon.
  • Verify that the main table contains routes inserted by babeld.
  • Change one of metric, ip4table and defaultroute on a interface which have babeld's routes in the main table.
  • Run /etc/init.d/network reload
  • The routes inserted by babeld for the above interface are now gone, which was unexpected.

It seems to be caused by the following section in interface.c:

UPDATE(metric, reload_ip);
UPDATE(proto_ip.no_defaultroute, reload_ip);
UPDATE(ip4table, reload_ip);
UPDATE(ip6table, reload_ip);
...
if (reload_ip) {
bool config_ip_enabled = if_old->config_ip.enabled;
bool proto_ip_enabled = if_old->proto_ip.enabled;

            interface_ip_set_enabled(&if_old->config_ip, false);
            interface_ip_set_enabled(&if_old->proto_ip, false);
            interface_ip_set_enabled(&if_old->proto_ip, proto_ip_enabled);
            interface_ip_set_enabled(&if_old->config_ip, config_ip_enabled);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant