summaryrefslogtreecommitdiff
path: root/src/network/networkd-route.h
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2017-02-15 10:00:35 +0530
committerSusant Sahani <susant@redhat.com>2017-02-16 10:31:42 +0530
commitf4859fc74c06bf5040e96ef68ddf7102f43cc7db (patch)
treee827c6ba57a292e1c77b3e4e07f585152e948dc6 /src/network/networkd-route.h
parent28b1a3eac252d471de4fbb6f317353af30d68878 (diff)
networkd: fix drop-in conf directory configs overwriting each other
Now we track the sections for example [Address] via line number. Which was fine till we din't had dropins dir. If we have multiple sections which have the ideantical line number in diffrent files we are overwriting these since line number is the key. This patch fixes this by taking filename and line number as key. This fixes [Address] and [Route] section overwriting. fixes: #5141
Diffstat (limited to 'src/network/networkd-route.h')
-rw-r--r--src/network/networkd-route.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h
index 02f0b27675..4ebfa0f0bd 100644
--- a/src/network/networkd-route.h
+++ b/src/network/networkd-route.h
@@ -20,12 +20,13 @@
***/
typedef struct Route Route;
+typedef struct NetworkConfigSection NetworkConfigSection;
#include "networkd-network.h"
struct Route {
Network *network;
- unsigned section;
+ NetworkConfigSection *section;
Link *link;
@@ -52,7 +53,7 @@ struct Route {
LIST_FIELDS(Route, routes);
};
-int route_new_static(Network *network, unsigned section, Route **ret);
+int route_new_static(Network *network, const char *filename, unsigned section_line, Route **ret);
int route_new(Route **ret);
void route_free(Route *route);
int route_configure(Route *route, Link *link, sd_netlink_message_handler_t callback);