diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-23 18:21:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 18:21:00 +0200 |
commit | 28fea36732cb832c399aac5288280d9cbe1047d9 (patch) | |
tree | 000064d953e23f89c441fa2bad1e4361aa4bcf12 | |
parent | 7c53215635d57607bed214c120a1833b7c9dc196 (diff) | |
parent | e3cbaeab86532cab4702a6fb67928970a7330b05 (diff) | |
download | systemd-28fea36732cb832c399aac5288280d9cbe1047d9.tar.gz |
Merge pull request #12977 from yuwata/network-route-type-local-12975
network: do not touch kernel-created multicast route
-rw-r--r-- | src/network/networkd-link.c | 9 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 8ca4583034..17829fca9f 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2416,6 +2416,15 @@ static int link_drop_foreign_config(Link *link) { if (route->protocol == RTPROT_KERNEL) continue; + /* do not touch multicast route added by kernel */ + /* FIXME: Why the kernel adds this route with protocol RTPROT_BOOT??? We need to investigate that. + * https://tools.ietf.org/html/rfc4862#section-5.4 may explain why. */ + if (route->protocol == RTPROT_BOOT && + route->family == AF_INET6 && + route->dst_prefixlen == 8 && + in_addr_equal(AF_INET6, &route->dst, &(union in_addr_union) { .in6 = {{{ 0xff,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }}} })) + continue; + if (route->protocol == RTPROT_STATIC && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC)) continue; diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index d73895aeab..458b39de7a 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -2163,6 +2163,12 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, '192.168.0.16/24') + # for issue #6088 + print('### ip -6 route list table all dev bridge99') + output = check_output('ip -6 route list table all dev bridge99') + print(output) + self.assertRegex(output, 'ff00::/8 table local metric 256 pref medium') + self.assertEqual(call('ip link del test1'), 0) time.sleep(3) @@ -2179,6 +2185,11 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities): self.assertNotRegex(output, '192.168.0.15/24') self.assertNotRegex(output, '192.168.0.16/24') + print('### ip -6 route list table all dev bridge99') + output = check_output('ip -6 route list table all dev bridge99') + print(output) + self.assertRegex(output, 'ff00::/8 table local metric 256 (?:linkdown |)pref medium') + def test_bridge_ignore_carrier_loss(self): copy_unit_to_networkd_unit_path('11-dummy.netdev', '12-dummy.netdev', '26-bridge.netdev', '26-bridge-slave-interface-1.network', '26-bridge-slave-interface-2.network', |