In bridge messages (family = AF_BRIDGE), the commands are the same, but the
contents are different, and this can confuse netifd into thinking that devices
are down, while they are actually up.
Signed-off-by: Felix Fietkau <[email protected]>
if (nh->nlmsg_type != RTM_NEWLINK && nh->nlmsg_type != RTM_DELLINK)
return 0;
if (nh->nlmsg_type != RTM_NEWLINK && nh->nlmsg_type != RTM_DELLINK)
return 0;
+ if (ifi->ifi_family != AF_UNSPEC)
+ return 0;
+
nlmsg_parse(nh, sizeof(struct ifinfomsg), nla, __IFLA_MAX - 1, NULL);
if (!nla[IFLA_IFNAME])
return 0;
nlmsg_parse(nh, sizeof(struct ifinfomsg), nla, __IFLA_MAX - 1, NULL);
if (!nla[IFLA_IFNAME])
return 0;