diff options
| author | Stephen Worley <sworley@nvidia.com> | 2021-04-28 15:39:51 -0400 | 
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2023-02-13 18:12:05 -0500 | 
| commit | 313c1c8e951d04bde30d9a78ce72158aee2f6439 (patch) | |
| tree | 99cc01cf233afdfecff945ab2824a0f430173c6e /zebra/kernel_netlink.c | |
| parent | bf7087f6436114dfd6f8ea35726f54187c52ef79 (diff) | |
zebra: subscribe to bridge vlan netlink messages
Add code to subscribe toe bridge vlan messaging code
and appropriate debug output for it.
Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/kernel_netlink.c')
| -rw-r--r-- | zebra/kernel_netlink.c | 15 | 
1 files changed, 14 insertions, 1 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 0c45350700..45fb24a210 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -1767,7 +1767,7 @@ void kernel_init(struct zebra_ns *zns)  {  	uint32_t groups, dplane_groups, ext_groups;  #if defined SOL_NETLINK -	int one, ret; +	int one, ret, grp;  #endif  	/* @@ -1778,6 +1778,11 @@ void kernel_init(struct zebra_ns *zns)  	 * keeping track of all the different values would  	 * lead to confusion, so we need to convert the  	 * RTNLGRP_XXX to a bit position for ourself +	 * +	 * +	 * NOTE: If the bit is >= 32, you must use setsockopt(). Those +	 * groups are added further below after SOL_NETLINK is verified to +	 * exist.  	 */  	groups = RTMGRP_LINK                   |  			RTMGRP_IPV4_ROUTE              | @@ -1857,6 +1862,14 @@ void kernel_init(struct zebra_ns *zns)  	 * sure that we want to pull into our build system.  	 */  #if defined SOL_NETLINK + +	/* +	 * setsockopt multicast group subscriptions that don't fit in nl_groups +	 */ +	grp = RTNLGRP_BRVLAN; +	ret = setsockopt(zns->netlink.sock, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, +			 &grp, sizeof(grp)); +  	/*  	 * Let's tell the kernel that we want to receive extended  	 * ACKS over our command socket(s)  | 
