Re: [PATCH net] ipv4: igmp: report IFA_TARGET_NETNSID in multicast address dumps

From: Wenbo Sun

Date: Thu Nov 12 2026 - 01:34:16 EST


Hi Hangbin,

Thanks for the review and the helpful suggestion.

On Thu, Nov 12, 2026 at 08:47:13AM +0800, Hangbin Liu wrote:
> On Wed, Nov 11, 2026 at 04:22:22PM +0800, Wenbo Sun wrote:
> > Commit eb4e17a1d915 ("netlink: support dumping IPv4 multicast addresses")
> > extended RTM_GETMULTICAST to support dumping IPv4 multicast addresses.
> > While inet_valid_dump_ifaddr_req() accepts IFA_TARGET_NETNSID in dump
> > requests and dumps addresses from the target network namespace,
> > inet_fill_ifmcaddr() never puts IFA_TARGET_NETNSID in the netlink
> > replies.
> ...
> > Fixes: eb4e17a1d915 ("netlink: support dumping IPv4 multicast addresses")
>
> I don't think this should be fix. Maybe consider this as a new feature and
> target to net-next?

You're right. While eb4e17a1d915 reused inet_valid_dump_ifaddr_req()
for dump requests, inet_fill_ifmcaddr() never emitted IFA_TARGET_NETNSID
from the start, so this is not a regression. Adding IFA_TARGET_NETNSID to
IPv4 RTM_GETMULTICAST dump replies (alongside setting fillargs.netnsid = -1
in inet_ifmcaddr_notify() to preserve the preallocated skb size) is better
framed as a consistency/feature alignment with inet_fill_ifaddr(),
inet6_fill_ifmcaddr(), and dev_mc_fill_addr().

I will drop the Fixes tag, soften the commit message accordingly, and
repost this as [PATCH net-next v2] in a new thread once the 24-hour
resubmission interval has elapsed.

Thanks,
Wenbo