dhcpv4: detect noarp interfaces
[project/odhcpd.git] / src / netlink.c
index 63a0f8bd1f411ca579f8463612625bea662e03ad..4a352a65e4aaab16b5db14b6518998aa26594f6c 100644 (file)
@@ -308,7 +308,12 @@ static int handle_rtm_link(struct nlmsghdr *hdr)
        ifname = nla_get_string(nla[IFLA_IFNAME]);
 
        avl_for_each_element(&interfaces, iface, avl) {
-               if (strcmp(iface->ifname, ifname) || iface->ifindex == ifi->ifi_index)
+               if (strcmp(iface->ifname, ifname))
+                       continue;
+
+               iface->ifflags = ifi->ifi_flags;
+
+               if (iface->ifindex == ifi->ifi_index)
                        continue;
 
                iface->ifindex = ifi->ifi_index;