History

net: ipv4: report multicast group user count

RTM_GETMULTICAST has been part of the rtnetlink ABI for a long time and already reports IPv4 multicast group membership through IFA_MULTICAST and IFA_CACHEINFO. It does not report how many consumers hold each membership, so userspace still has to parse /proc/net/igmp to get the Users column. Add IFA_MC_USERS as a u32 attribute carrying ip_mc_list::users in RTM_GETMULTICAST replies and entry-lifecycle notifications. This gives iproute2 enough information to migrate the IPv4 part of "ip maddr show" from procfs parsing to rtnetlink.

Yuyang Huang committed 4 months ago

Commit 7cb81981 parent 2ed8d5c3 files · +7 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/if_addr.h+1−0
@@ -36,6 +36,7 @@ enum { · 35 unmodified lines
36 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */36 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */
37 IFA_TARGET_NETNSID,37 IFA_TARGET_NETNSID,
38 IFA_PROTO, /* u8, address protocol */38 IFA_PROTO, /* u8, address protocol */
39 IFA_MC_USERS, /* u32, multicast group users */
39 __IFA_MAX,40 __IFA_MAX,
40};41};
41 42