| @@ -272,6 +272,7 @@ bool br_vlan_global_opts_can_enter_range(const struct net_bridge_vlan *v_curr, · 271 unmodified lines |
| 272 | 272 | bool br_vlan_global_opts_fill(struct sk_buff *skb, u16 vid, u16 vid_range, |
| 273 | 273 | const struct net_bridge_vlan *v_opts) |
| 274 | 274 | { |
| 275 | + u64 clockval __maybe_unused; |
| 275 | 276 | struct nlattr *nest; |
| 276 | 277 | |
| 277 | 278 | nest = nla_nest_start(skb, BRIDGE_VLANDB_GLOBAL_OPTIONS); |
| @@ -296,6 +297,11 @@ bool br_vlan_global_opts_fill(struct sk_buff *skb, u16 vid, u16 vid_range, · 18 unmodified lines |
| 296 | 297 | v_opts->br_mcast_ctx.multicast_startup_query_count)) |
| 297 | 298 | goto out_err; |
| 298 | 299 | |
| 300 | + clockval = jiffies_to_clock_t(v_opts->br_mcast_ctx.multicast_last_member_interval); |
| 301 | + if (nla_put_u64_64bit(skb, BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL, |
| 302 | + clockval, BRIDGE_VLANDB_GOPTS_PAD)) |
| 303 | + goto out_err; |
| 304 | + |
| 299 | 305 | #if IS_ENABLED(CONFIG_IPV6) |
| 300 | 306 | if (nla_put_u8(skb, BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION, |
| 301 | 307 | v_opts->br_mcast_ctx.multicast_mld_version)) |
| @@ -323,6 +329,7 @@ static size_t rtnl_vlan_global_opts_nlmsg_size(void) · 21 unmodified lines |
| 323 | 329 | + nla_total_size(sizeof(u8)) /* BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION */ |
| 324 | 330 | + nla_total_size(sizeof(u32)) /* BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT */ |
| 325 | 331 | + nla_total_size(sizeof(u32)) /* BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT */ |
| 332 | + + nla_total_size(sizeof(u64)) /* BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL */ |
| 326 | 333 | #endif |
| 327 | 334 | + nla_total_size(sizeof(u16)); /* BRIDGE_VLANDB_GOPTS_RANGE */ |
| 328 | 335 | } |
| @@ -411,6 +418,13 @@ static int br_vlan_process_global_one_opts(const struct net_bridge *br, · 82 unmodified lines |
| 411 | 418 | v->br_mcast_ctx.multicast_startup_query_count = cnt; |
| 412 | 419 | *changed = true; |
| 413 | 420 | } |
| 421 | + if (tb[BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL]) { |
| 422 | + u64 val; |
| 423 | + |
| 424 | + val = nla_get_u64(tb[BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL]); |
| 425 | + v->br_mcast_ctx.multicast_last_member_interval = clock_t_to_jiffies(val); |
| 426 | + *changed = true; |
| 427 | + } |
| 414 | 428 | #if IS_ENABLED(CONFIG_IPV6) |
| 415 | 429 | if (tb[BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION]) { |
| 416 | 430 | u8 ver; |
| @@ -435,6 +449,7 @@ static const struct nla_policy br_vlan_db_gpol[BRIDGE_VLANDB_GOPTS_MAX + 1] = { · 18 unmodified lines |
| 435 | 449 | [BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION] = { .type = NLA_U8 }, |
| 436 | 450 | [BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT] = { .type = NLA_U32 }, |
| 437 | 451 | [BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT] = { .type = NLA_U32 }, |
| 452 | + [BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL] = { .type = NLA_U64 }, |
| 438 | 453 | }; |
| 439 | 454 | |
| 440 | 455 | int br_vlan_rtm_process_global_options(struct net_device *dev, |