]> git.ipfire.org Git - thirdparty/systemd.git/commit
network: introduce link_should_mark_config() 36414/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 17 Feb 2025 17:11:17 +0000 (02:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Feb 2025 14:13:51 +0000 (23:13 +0900)
commit81f637630c3a9c0f6f0dc036917023d519511ac5
tree0b9317008c126b7a05e2994afe4697532443e2bb
parent1cac0676dafb45c64940c36d7d75ce1e04eb831c
network: introduce link_should_mark_config()

This split-out common logic from link_drop_routes() and friends.

This is mostly a refactoring, and not change behavior in most cases.
But slightly change behavior for how foreign nexthops and routing
policy rules are managed.

E.g. when KeepConfiguration=static, previously all foreign nexthops and
routing policy rules were kept, but now only foreign nexthops and rules
with RTPROT_STATIC are kept and others are dropped.

Similary, when KeepConfiguration=dynamic, previously all foreign nexthops
and rules were removed, but now foreign configs with a dynamic protocol
e.g. RTPROT_DHCP are kept, and still configs with RTPROT_STATIC are
dropped.

Currently, we do not set/get/manage protocol for neighbor entries.
Hence, the logic of managing foreign neighbor entries is unchanged.
src/network/networkd-neighbor.c
src/network/networkd-nexthop.c
src/network/networkd-route.c
src/network/networkd-routing-policy-rule.c
src/network/networkd-util.c
src/network/networkd-util.h