diff options
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r-- | net/bridge/br_netlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index c331e28c7880..65429b99a2a3 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -27,6 +27,7 @@ static inline size_t br_port_info_size(void) | |||
27 | + nla_total_size(4) /* IFLA_BRPORT_COST */ | 27 | + nla_total_size(4) /* IFLA_BRPORT_COST */ |
28 | + nla_total_size(1) /* IFLA_BRPORT_MODE */ | 28 | + nla_total_size(1) /* IFLA_BRPORT_MODE */ |
29 | + nla_total_size(1) /* IFLA_BRPORT_GUARD */ | 29 | + nla_total_size(1) /* IFLA_BRPORT_GUARD */ |
30 | + nla_total_size(1) /* IFLA_BRPORT_PROTECT */ | ||
30 | + 0; | 31 | + 0; |
31 | } | 32 | } |
32 | 33 | ||
@@ -51,7 +52,8 @@ static int br_port_fill_attrs(struct sk_buff *skb, | |||
51 | nla_put_u16(skb, IFLA_BRPORT_PRIORITY, p->priority) || | 52 | nla_put_u16(skb, IFLA_BRPORT_PRIORITY, p->priority) || |
52 | nla_put_u32(skb, IFLA_BRPORT_COST, p->path_cost) || | 53 | nla_put_u32(skb, IFLA_BRPORT_COST, p->path_cost) || |
53 | nla_put_u8(skb, IFLA_BRPORT_MODE, mode) || | 54 | nla_put_u8(skb, IFLA_BRPORT_MODE, mode) || |
54 | nla_put_u8(skb, IFLA_BRPORT_GUARD, !!(p->flags & BR_BPDU_GUARD))) | 55 | nla_put_u8(skb, IFLA_BRPORT_GUARD, !!(p->flags & BR_BPDU_GUARD)) || |
56 | nla_put_u8(skb, IFLA_BRPORT_PROTECT, !!(p->flags & BR_ROOT_BLOCK))) | ||
55 | return -EMSGSIZE; | 57 | return -EMSGSIZE; |
56 | 58 | ||
57 | return 0; | 59 | return 0; |
@@ -165,6 +167,7 @@ static const struct nla_policy ifla_brport_policy[IFLA_BRPORT_MAX + 1] = { | |||
165 | [IFLA_BRPORT_PRIORITY] = { .type = NLA_U16 }, | 167 | [IFLA_BRPORT_PRIORITY] = { .type = NLA_U16 }, |
166 | [IFLA_BRPORT_MODE] = { .type = NLA_U8 }, | 168 | [IFLA_BRPORT_MODE] = { .type = NLA_U8 }, |
167 | [IFLA_BRPORT_GUARD] = { .type = NLA_U8 }, | 169 | [IFLA_BRPORT_GUARD] = { .type = NLA_U8 }, |
170 | [IFLA_BRPORT_PROTECT] = { .type = NLA_U8 }, | ||
168 | }; | 171 | }; |
169 | 172 | ||
170 | /* Change the state of the port and notify spanning tree */ | 173 | /* Change the state of the port and notify spanning tree */ |