diff options
author | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2022-11-11 15:27:38 +0100 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2022-11-14 18:28:25 +0100 |
commit | 82009e21d28b5f3d61b9e1e3cebbf2dd94e8f32a (patch) | |
tree | b0fde018c6ddcdee748d5b646d9be4089a5a4047 | |
parent | 5d851a3c9dd24c80b03590e2c2943e8dc960fd2c (diff) | |
download | NetworkManager-82009e21d28b5f3d61b9e1e3cebbf2dd94e8f32a.tar.gz |
core: set routing rule protocol properly
When creating NMPlatformRoutingRule from NMIPRouteRule object, the
protocol is being set to RTPROT_UNSPEC. According to linux kernel
documentation FRA_PROTOCOL indicates the originator of the rule.
In this case the route rule is coming from a connection and therefore
the originator of the rule is the user. The correct value is
RTPROT_STATIC which means the rule is installed by the administrator.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1457
Fixes: 3f9347745b30 ('core: add handling of IP routing rules to NMDevice')
-rw-r--r-- | src/core/NetworkManagerUtils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/NetworkManagerUtils.c b/src/core/NetworkManagerUtils.c index 9a1bb72966..9acf329635 100644 --- a/src/core/NetworkManagerUtils.c +++ b/src/core/NetworkManagerUtils.c @@ -978,6 +978,7 @@ nm_ip_routing_rule_to_platform(const NMIPRoutingRule *rule, NMPlatformRoutingRul .start = uid_range_start, .end = uid_range_end, }, + .protocol = RTPROT_STATIC, }; nm_ip_routing_rule_get_xifname_bin(rule, TRUE, out_pl->iifname); |