]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
network: drop unnecessary routing policy rules
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Oct 2020 11:27:23 +0000 (20:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Dec 2020 07:13:54 +0000 (16:13 +0900)
commit0b81225e5791f660506f7db0ab88078cf296b771
tree16d313ba70e8a91b54334b9b164eba87730ff2be
parente737dce5445ac2359f4f260aa462056b02d68d54
network: drop unnecessary routing policy rules

networkd already drop foreign address, routes, and nexthops on startup,
except those created by kernel. However, previously, routing policy
rules were not. The logic of serialization/deserialization of rules only
works for rules created by previous invocation of networkd, and does not
work for one created by other tools like `ip rule`.

This makes networkd drop foreign routing policy rules except created by
kernel on startup. Also, remove rules created by networkd when the
corresponding links are dropped or networkd is stopping.
src/network/networkd-link.c
src/network/networkd-routing-policy-rule.c
src/network/networkd-routing-policy-rule.h