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

[v247] backport routing policy rule fix #96

Merged
merged 15 commits into from Mar 12, 2021
Merged

[v247] backport routing policy rule fix #96

merged 15 commits into from Mar 12, 2021

Conversation

zhangyoufu
Copy link
Contributor

@zhangyoufu zhangyoufu commented Mar 12, 2021

This PR backports systemd/systemd#17960, systemd/systemd#17477 and systemd/systemd#18109.

For people relying on policy routing, losing network connections after networkctl reload is a disaster. This issue affects the upcoming Ubuntu 21.04 (hirsute), Debian 11 (bullseye) and Debian 10 (buster-backports). Hope get this merged into v247-stable ASAP.

Fixes systemd/systemd#18107
Close #93

As routing policy rules are managed by Manager.

[#17960,1/4] cherry-picked from 18f2ee3
…ot support FRA_PROTOCOL

Otherwise, each configured rule is treated as foreign.

[#17477,2/5] cherry-picked from 569eeb0
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.

[#17477,4/5] cherry-picked from 0b81225
We already handle foreign routing policy rules correctly by the previous
commit. So, the serialization/deserialization of rules are not necessary
anymore.

[#17477,5/5] cherry-picked from a9d240f
[#18109,1/7] cherry-picked from 3141c81
By the previous commit, the checks are not necessary any more.

[#18109,3/7] cherry-picked from 57fe5a4
routing_policy_rule_get() in link_set_routing_policy_rules() does not
work when [RoutingPolicyRule] section does not have From= or To=.

[#18109,4/7] cherry-picked from c1934a8
…reload or reconfigure

[#18109,7/7] cherry-picked from 49ff3f3
@keszybz keszybz merged commit bd24b5d into systemd:v247-stable Mar 12, 2021
@zhangyoufu zhangyoufu deleted the v247-backport-routing-policy-rule-fix branch March 12, 2021 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants