proto-shell: retry setup if the proto handler script quits without changing the state...
[project/netifd.git] / system-linux.c
index 9ff1532..a6734a4 100644 (file)
@@ -374,7 +374,6 @@ static int system_get_neigh6reachabletime(struct device *dev, char *buf, const s
 static int cb_rtnl_event(struct nl_msg *msg, void *arg)
 {
        struct nlmsghdr *nh = nlmsg_hdr(msg);
-       struct ifinfomsg *ifi = NLMSG_DATA(nh);
        struct nlattr *nla[__IFLA_MAX];
        int link_state = 0;
        char buf[10];
@@ -382,7 +381,7 @@ static int cb_rtnl_event(struct nl_msg *msg, void *arg)
        if (nh->nlmsg_type != RTM_NEWLINK)
                goto out;
 
-       nlmsg_parse(nh, sizeof(*ifi), nla, __IFLA_MAX - 1, NULL);
+       nlmsg_parse(nh, sizeof(struct ifinfomsg), nla, __IFLA_MAX - 1, NULL);
        if (!nla[IFLA_IFNAME])
                goto out;
 
@@ -799,7 +798,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
                bridge->ifname, cfg->igmp_snoop ? "1" : "0");
 
        system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
-               bridge->ifname, cfg->igmp_snoop ? "1" : "0");
+               bridge->ifname, cfg->multicast_querier ? "1" : "0");
 
        args[0] = BRCTL_SET_BRIDGE_PRIORITY;
        args[1] = cfg->priority;
@@ -1093,9 +1092,6 @@ system_if_apply_settings(struct device *dev, struct device_settings *s, unsigned
 {
        struct ifreq ifr;
 
-       if (!apply_mask)
-               return;
-
        memset(&ifr, 0, sizeof(ifr));
        strncpy(ifr.ifr_name, dev->ifname, sizeof(ifr.ifr_name));
        if (s->flags & DEV_OPT_MTU & apply_mask) {