network: do not assume the highest priority when Priority= is unspecified
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Aug 2021 05:03:19 +0000 (14:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Aug 2021 06:57:45 +0000 (15:57 +0900)
commitc4f7a347566b8926382029593b4d9957fef2564c
treed890a176e3e61f894efa1d1eaab6bf9ee1797f14
parentf6e40037a0c6f027fd30e141092dd4982cc56050
network: do not assume the highest priority when Priority= is unspecified

Previously, when Priority= is unspecified, networkd configured the rule with
the highest (=0) priority. This commit makes networkd distinguish the case
the setting is unspecified and one explicitly specified as Priority=0.

Note.
1) If the priority is unspecified on configure, then kernel dynamically picks
   a priority for the rule.
2) The new behavior is consistent with 'ip rule' command.

Replaces #15606.
man/systemd.network.xml
src/network/networkd-routing-policy-rule.c
src/network/networkd-routing-policy-rule.h
test/test-network/systemd-networkd-tests.py