summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-manager.c6
-rw-r--r--src/network/networkd-route.c6
-rw-r--r--src/network/networkd-route.h1
3 files changed, 2 insertions, 11 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 5dcd4df536..9174dcc7f4 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -457,11 +457,9 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, vo
break;
case RTM_DELROUTE:
-
- if (route)
- route_drop(route);
-
+ route_free(route);
break;
+
default:
assert_not_reached("Received invalid RTNL message type");
}
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 43f37266d8..ab4a94f41a 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -324,12 +324,6 @@ int route_update(Route *route,
return 0;
}
-void route_drop(Route *route) {
- assert(route);
-
- route_free(route);
-}
-
int route_remove(Route *route, Link *link,
sd_netlink_message_handler_t callback) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h
index 84d74992c9..39de8363ed 100644
--- a/src/network/networkd-route.h
+++ b/src/network/networkd-route.h
@@ -61,7 +61,6 @@ int route_get(Link *link, int family, union in_addr_union *dst, unsigned char ds
int route_add(Link *link, int family, union in_addr_union *dst, unsigned char dst_prefixlen, unsigned char tos, uint32_t priority, unsigned char table, Route **ret);
int route_add_foreign(Link *link, int family, union in_addr_union *dst, unsigned char dst_prefixlen, unsigned char tos, uint32_t priority, unsigned char table, Route **ret);
int route_update(Route *route, union in_addr_union *src, unsigned char src_prefixlen, union in_addr_union *gw, union in_addr_union *prefsrc, unsigned char scope, unsigned char protocol);
-void route_drop(Route *route);
int route_expire_handler(sd_event_source *s, uint64_t usec, void *userdata);