network/routing-policy-rule: do not save rule to Manager before it is configured
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 19 Aug 2024 19:02:46 +0000 (04:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 20 Aug 2024 12:02:30 +0000 (21:02 +0900)
commit65f5f581568448d6098358b704cae10a656d09f0
tree7672bdfa2ac9021b899a250d36547237ffee3330
parent4f8b153d903fd4a6e8d7d3e49113582d70d1525a
network/routing-policy-rule: do not save rule to Manager before it is configured

Otherwise, if we fail to configure the rule, then the manager will keep
nonexistent rule forever. So, let's first copy the rule and put it on
Request, then on success generate a new copy based on the netlink
notification and store it to Manager.

This is the same as 0a0c2672dbd22dc85d660e5baa7e1bef701beb88, but for
routing policy rule.
src/network/networkd-routing-policy-rule.c