diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-09 23:43:52 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-21 03:24:23 +0200 |
commit | ed9e361a8a798f9fee353b5c7e0e23308e0d329f (patch) | |
tree | 7364a91ea53be278359af58c8b002d8c3e3d0cd9 /src/network/networkd-ipv4ll.c | |
parent | adda1ed94a04742ddacdc76dfa311816e1ed9f68 (diff) |
networkd: route - simplify route_new()
Diffstat (limited to 'src/network/networkd-ipv4ll.c')
-rw-r--r-- | src/network/networkd-ipv4ll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c index 26397b273f..2fdb77ef6c 100644 --- a/src/network/networkd-ipv4ll.c +++ b/src/network/networkd-ipv4ll.c @@ -55,7 +55,7 @@ static int ipv4ll_address_lost(Link *link) { address_remove(address, link, &link_address_remove_handler); - r = route_new(&route, RTPROT_UNSPEC); + r = route_new(&route); if (r < 0) { log_link_error_errno(link, r, "Could not allocate route: %m"); return r; @@ -149,12 +149,13 @@ static int ipv4ll_address_claimed(sd_ipv4ll *ll, Link *link) { link->ipv4ll_address = false; - r = route_new(&route, RTPROT_STATIC); + r = route_new(&route); if (r < 0) return r; route->family = AF_INET; route->scope = RT_SCOPE_LINK; + route->protocol = RTPROT_STATIC; route->metrics = IPV4LL_ROUTE_METRIC; r = route_configure(route, link, ipv4ll_route_handler); |