X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnetwork%2Fnetworkd-route.c;h=acfe3f023f1dfd2a15f1df406acb535158a28232;hb=037c26d0aeb750ca9c8d605884ea1db7baecfea8;hp=0cb7239ca04182945015d28aa4192383529e697a;hpb=5c1d3fc93d91384bbac29adf01074fa4375317ea;p=elogind.git diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 0cb7239ca..acfe3f023 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -26,7 +26,7 @@ #include "utf8.h" #include "util.h" #include "conf-parser.h" -#include "net-util.h" +#include "network-internal.h" int route_new_static(Network *network, unsigned section, Route **ret) { _cleanup_route_free_ Route *route = NULL; @@ -52,7 +52,7 @@ int route_new_static(Network *network, unsigned section, Route **ret) { route->network = network; - LIST_PREPEND(static_routes, network->static_routes, route); + LIST_PREPEND(routes, network->static_routes, route); if (section) { route->section = section; @@ -86,7 +86,7 @@ void route_free(Route *route) { return; if (route->network) { - LIST_REMOVE(static_routes, route->network->static_routes, route); + LIST_REMOVE(routes, route->network->static_routes, route); if (route->section) hashmap_remove(route->network->routes_by_section, @@ -164,6 +164,8 @@ int route_drop(Route *route, Link *link, return r; } + link_ref(link); + return 0; } @@ -235,6 +237,8 @@ int route_configure(Route *route, Link *link, return r; } + link_ref(link); + return 0; }