network: remove routing policy rule from foreign rule database when it is removed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 22 Feb 2019 04:27:44 +0000 (13:27 +0900)
committerMichael Biebl <biebl@debian.org>
Fri, 29 Jan 2021 14:16:06 +0000 (14:16 +0000)
commitd8ebf74b0f083c1d2b6a7f90c7011193a14cea8d
tree258b7d4f0e0ff0210a476c234b51d81328b95e1a
parente276bd70d25e99047f2fabbddf9ad442e221d6ee
network: remove routing policy rule from foreign rule database when it is removed

Previously, When the first link configures rules, it removes all saved
rules, which were configured by networkd previously, in the foreign rule
database, but the rules themselves are still in the database.
Thus, when the second or later link configures rules, it errnously
treats the rules already exist.
This is the root of issue #11280.

This removes rules from the foreign database when they are removed.

Fixes #11280.

(cherry picked from commit 92cd00b9749141907a1110044cc7d1f01caff545)

Gbp-Pq: Name network-remove-routing-policy-rule-from-foreign-rule-data.patch
src/network/networkd-routing-policy-rule.c