1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

networkd: Fix route properties.

We are not able to add multiple properties.

wlp3s0.network:
[Match]
Name=wlp3s0

[Route]
Gateway=10.68.5.26
Metric=10

 sudo ./systemd-networkd
Failed to parse file '/usr/lib/systemd/network/wlp3s0.network': File
exists
Could not load configuration files: File exists

This patch fixes it.
This commit is contained in:
Susant Sahani 2016-04-25 12:37:10 +05:30
parent 4f4d6ee4be
commit cacc1dbf17

View File

@ -68,15 +68,15 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
route->protocol = RTPROT_STATIC;
if (section) {
route->section = section;
r = hashmap_put(network->routes_by_section, UINT_TO_PTR(route->section), route);
if (r < 0)
return r;
route->section = section;
}
LIST_PREPEND(routes, network->static_routes, route);
route->network = network;
LIST_PREPEND(routes, network->static_routes, route);
*ret = route;
route = NULL;