chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: message_open_container - don't take a 'size' argument
[elogind.git]
/
src
/
network
/
networkd-route.c
diff --git
a/src/network/networkd-route.c
b/src/network/networkd-route.c
index 488d3f5013719bac0be8a34fe11a2a73778eb099..098539ed19c8a147f15481689fa2a958edf6c5ea 100644
(file)
--- a/
src/network/networkd-route.c
+++ b/
src/network/networkd-route.c
@@
-47,6
+47,8
@@
int route_new_static(Network *network, unsigned section, Route **ret) {
if (!route)
return -ENOMEM;
if (!route)
return -ENOMEM;
+ route->family = AF_UNSPEC;
+
route->network = network;
LIST_PREPEND(static_routes, network->static_routes, route);
route->network = network;
LIST_PREPEND(static_routes, network->static_routes, route);
@@
-69,6
+71,8
@@
int route_new_dynamic(Route **ret) {
if (!route)
return -ENOMEM;
if (!route)
return -ENOMEM;
+ route->family = AF_UNSPEC;
+
*ret = route;
route = NULL;
*ret = route;
route = NULL;
@@
-92,7
+96,7
@@
void route_free(Route *route) {
int route_configure(Route *route, Link *link,
sd_rtnl_message_handler_t callback) {
int route_configure(Route *route, Link *link,
sd_rtnl_message_handler_t callback) {
- _cleanup_
sd_
rtnl_message_unref_ sd_rtnl_message *req = NULL;
+ _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
int r;
assert(link);
int r;
assert(link);
@@
-101,7
+105,7
@@
int route_configure(Route *route, Link *link,
assert(link->ifindex > 0);
assert(route->family == AF_INET || route->family == AF_INET6);
assert(link->ifindex > 0);
assert(route->family == AF_INET || route->family == AF_INET6);
- r = sd_rtnl_message_
route_new
(RTM_NEWROUTE, route->family, &req);
+ r = sd_rtnl_message_
new_route
(RTM_NEWROUTE, route->family, &req);
if (r < 0) {
log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r));
return r;
if (r < 0) {
log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r));
return r;