diff options
Diffstat (limited to 'src/network/networkd-route.c')
-rw-r--r-- | src/network/networkd-route.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 1c8302ffaa..66b165f661 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -26,7 +26,7 @@ #include "networkd.h" #include "networkd-route.h" -int route_new(Route **ret, unsigned char rtm_protocol) { +int route_new(Route **ret) { _cleanup_route_free_ Route *route = NULL; route = new0(Route, 1); @@ -35,7 +35,7 @@ int route_new(Route **ret, unsigned char rtm_protocol) { route->family = AF_UNSPEC; route->scope = RT_SCOPE_UNIVERSE; - route->protocol = rtm_protocol; + route->protocol = RTPROT_UNSPEC; *ret = route; route = NULL; @@ -58,10 +58,11 @@ int route_new_static(Network *network, unsigned section, Route **ret) { } } - r = route_new(&route, RTPROT_STATIC); + r = route_new(&route); if (r < 0) return r; + route->protocol = RTPROT_STATIC; route->network = network; LIST_PREPEND(routes, network->static_routes, route); |