Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2-next v2 0/1] ipmaddr: read link-layer multicast addresses via netlink
@ 2026-12-01  3:04 Yuyang Huang
  2026-12-01  3:04 ` [PATCH iproute2-next v2 1/1] " Yuyang Huang
  0 siblings, 1 reply; 2+ messages in thread
From: Yuyang Huang @ 2026-12-01  3:04 UTC (permalink / raw)
  To: Yuyang Huang; +Cc: David Ahern, netdev

"ip maddr show" gets the IPv4 and IPv6 multicast addresses from
RTM_GETMULTICAST dumps, but it still parses /proc/net/dev_mcast for the
link-layer addresses. The kernel now also supports RTM_GETMULTICAST
dumps with ifa_family AF_PACKET, which report the device multicast list
with every column of /proc/net/dev_mcast. This patch uses this dump. The
output does not change. Older kernels reject the AF_PACKET dump with
EOPNOTSUPP, and "ip maddr" then reads /proc/net/dev_mcast as before.

The kernel side is the net-next series "rtnetlink: dump link-layer
multicast addresses":
https://patch.msgid.link/20261012011707.3378-1-sigefriedhyy@gmail.com

Testing:
- net-next kernel in vng: "ip maddr show" output is byte-identical to
  the current code for plain, -0/-4/-6, -o, -j, dev and -n <netns>, and
  /proc/net/dev_mcast is not read. This includes a multi-part dump with
  2000 entries on one device.
- 7.1 kernel without AF_PACKET support: falls back to
  /proc/net/dev_mcast, with the same output.

Changes in v2:
- Rebased on current iproute2-next.
- Dropped the "uapi: update if_addr.h" patch. IFA_F_GLOBAL is now in
  iproute2-next.

v1: https://lore.kernel.org/netdev/20261108012949.3943642-1-yuyanghuang@google.com/

Yuyang Huang (1):
  ipmaddr: read link-layer multicast addresses via netlink

 ip/ipmaddr.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
2.56.1.839.g22a8290db9-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-01  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  3:04 [PATCH iproute2-next v2 0/1] ipmaddr: read link-layer multicast addresses via netlink Yuyang Huang
2026-12-01  3:04 ` [PATCH iproute2-next v2 1/1] " Yuyang Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox