]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/bridge/br_netlink.c
ipv4: Fix table id reference in fib_sync_down_addr
[mirror_ubuntu-bionic-kernel.git] / net / bridge / br_netlink.c
index 015f465c514b28564c9e91eec40dc041b765fe25..e21a741e1e72a000ea5e06e5574f7c58b565d0fe 100644 (file)
@@ -1236,19 +1236,19 @@ static int br_changelink(struct net_device *brdev, struct nlattr *tb[],
        if (data[IFLA_BR_NF_CALL_IPTABLES]) {
                u8 val = nla_get_u8(data[IFLA_BR_NF_CALL_IPTABLES]);
 
-               br->nf_call_iptables = val ? true : false;
+               br_opt_toggle(br, BROPT_NF_CALL_IPTABLES, !!val);
        }
 
        if (data[IFLA_BR_NF_CALL_IP6TABLES]) {
                u8 val = nla_get_u8(data[IFLA_BR_NF_CALL_IP6TABLES]);
 
-               br->nf_call_ip6tables = val ? true : false;
+               br_opt_toggle(br, BROPT_NF_CALL_IP6TABLES, !!val);
        }
 
        if (data[IFLA_BR_NF_CALL_ARPTABLES]) {
                u8 val = nla_get_u8(data[IFLA_BR_NF_CALL_ARPTABLES]);
 
-               br->nf_call_arptables = val ? true : false;
+               br_opt_toggle(br, BROPT_NF_CALL_ARPTABLES, !!val);
        }
 #endif
 
@@ -1381,7 +1381,8 @@ static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev)
 #ifdef CONFIG_BRIDGE_VLAN_FILTERING
        if (nla_put_be16(skb, IFLA_BR_VLAN_PROTOCOL, br->vlan_proto) ||
            nla_put_u16(skb, IFLA_BR_VLAN_DEFAULT_PVID, br->default_pvid) ||
-           nla_put_u8(skb, IFLA_BR_VLAN_STATS_ENABLED, br->vlan_stats_enabled))
+           nla_put_u8(skb, IFLA_BR_VLAN_STATS_ENABLED,
+                      br_opt_get(br, BROPT_VLAN_STATS_ENABLED)))
                return -EMSGSIZE;
 #endif
 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
@@ -1434,11 +1435,11 @@ static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev)
 #endif
 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
        if (nla_put_u8(skb, IFLA_BR_NF_CALL_IPTABLES,
-                      br->nf_call_iptables ? 1 : 0) ||
+                      br_opt_get(br, BROPT_NF_CALL_IPTABLES) ? 1 : 0) ||
            nla_put_u8(skb, IFLA_BR_NF_CALL_IP6TABLES,
-                      br->nf_call_ip6tables ? 1 : 0) ||
+                      br_opt_get(br, BROPT_NF_CALL_IP6TABLES) ? 1 : 0) ||
            nla_put_u8(skb, IFLA_BR_NF_CALL_ARPTABLES,
-                      br->nf_call_arptables ? 1 : 0))
+                      br_opt_get(br, BROPT_NF_CALL_ARPTABLES) ? 1 : 0))
                return -EMSGSIZE;
 #endif