summaryrefslogtreecommitdiff
path: root/src/network/networkd-route.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-04-29 02:42:42 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-04-29 09:11:36 +0900
commit8a9ce525d1d5830c074451dd2b62865958ac7308 (patch)
tree8d8162001b46cf105e59bebb9b3e178d44244df9 /src/network/networkd-route.h
parentc3fa1257da36522563c568524ba2a5113b1d90e9 (diff)
downloadsystemd-8a9ce525d1d5830c074451dd2b62865958ac7308.tar.gz
network: do not remove reject type routes more than once
Usually, removing non-existing addresses, routes, and etc, are safe. However, when multiple interfaces lost their carriers simultaneously, then manager_drop_routes() and manager_drop_nexthop() are called multiple times. If a route with a blackhole nexthop is removed in that process, the later removal requests of the route fail with -EINVAL, rathar than -ESRCH, as the corresponding nexthop does not exist anymore. So, let's not remove routes which managed by Manager more than once.
Diffstat (limited to 'src/network/networkd-route.h')
-rw-r--r--src/network/networkd-route.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h
index 331f1f9ea2..ddb433817a 100644
--- a/src/network/networkd-route.h
+++ b/src/network/networkd-route.h
@@ -52,6 +52,7 @@ typedef struct Route {
bool protocol_set:1;
bool pref_set:1;
bool gateway_from_dhcp_or_ra:1;
+ bool removing:1;
union in_addr_union gw;
union in_addr_union dst;