From: Yuyang Huang <yuyanghuang@google.com>
To: Yuyang Huang <yuyanghuang@google.com>
Cc: David Ahern <dsahern@kernel.org>, netdev@vger.kernel.org
Subject: [PATCH iproute2-next 0/2] ipmaddr: read link-layer multicast addresses via netlink
Date: Sun, 8 Nov 2026 10:29:47 +0900 [thread overview]
Message-ID: <20261108012949.3943642-1-yuyanghuang@google.com> (raw)
"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. Patch 2 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.
Patch 1 adds IFA_F_GLOBAL to include/uapi/linux/if_addr.h. It is only
there so that the series builds, and it should not be merged: the uapi
headers are synced into iproute2-next regularly, and the next sync
brings in IFA_F_GLOBAL.
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.
Yuyang Huang (2):
uapi: update if_addr.h
ipmaddr: read link-layer multicast addresses via netlink
include/uapi/linux/if_addr.h | 1 +
ip/ipmaddr.c | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.56.0.455.g6c5a503b38-goog
next reply other threads:[~2026-11-08 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 1:29 Yuyang Huang [this message]
2026-11-08 1:29 ` [PATCH iproute2-next 1/2] uapi: update if_addr.h Yuyang Huang
2026-11-08 1:29 ` [PATCH iproute2-next 2/2] ipmaddr: read link-layer multicast addresses via netlink Yuyang Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261108012949.3943642-1-yuyanghuang@google.com \
--to=yuyanghuang@google.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox