diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-08-11 16:05:01 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-09-13 13:31:27 +0200 |
commit | bea088b6afe84d06552880778dc791cad97d4aec (patch) | |
tree | ec759cf1cf5d6ab3aa08ea3a809cb8ffed231a0f /src/config.c | |
parent | f66103ef4e100b4c3d375553cb916cb924cc40e5 (diff) |
ndp: detect ifindex changes via interface netlink events
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c index fd8f32e..e79f9ce 100644 --- a/src/config.c +++ b/src/config.c @@ -440,10 +440,11 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr if (!iface->ifname) goto err; - } - if ((iface->ifindex = if_nametoindex(iface->ifname)) <= 0) - goto err; + if (!iface->ifindex && + (iface->ifindex = if_nametoindex(iface->ifname)) <= 0) + goto err; + } if (get_addrs) { ssize_t len = odhcpd_get_interface_addresses(iface->ifindex, |