lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADXeF1HSL5pSHdvPgf7YmONdtZUe0Uv1nMiutmoNzKYu2Zh=jQ@mail.gmail.com>
Date: Tue, 12 Nov 2024 23:06:27 +0900
From: Yuyang Huang <yuyanghuang@...gle.com>
To: nicolas.dichtel@...nd.com
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	David Ahern <dsahern@...nel.org>, roopa@...ulusnetworks.com, jiri@...nulli.us, 
	stephen@...workplumber.org, netdev@...r.kernel.org, 
	Maciej Żenczykowski <maze@...gle.com>, 
	Lorenzo Colitti <lorenzo@...gle.com>, Patrick Ruddy <pruddy@...tta.att-mail.com>
Subject: Re: [PATCH net-next] netlink: add igmp join/leave notifications

> These names are misleading, they are very generic, but in fact, specialized to igmp.
> Are there plans to add more notifications later?
> What about ipv6?

I plan to add MLD support as well. The
RTM_NEWMULTICAST/RTM_DELMULTICAST can be used for monitoring both IPv4
and IPv6 multicast addresses. As it was brought up now, I will send a
v2 patch later to include the MLD change.

>The RTM_GETMULTICAST works only for with IPv6 and the NEW/DEL will work for IPv4

I plan to make igmp.c support RTM_GETMULTICAST as well, maybe in a
different patch series. In this case, it can be used to dump both IPv4
and IPv6 multicast addresses. After adding RTM_GETMULTICAST support
for IPv4, I'll migrate 'ip maddr' to use netlink instead of parsing
procfs to dump IPv4/v6 multicast addresses.

Thanks,
Yuyang

On Tue, Nov 12, 2024 at 10:45 PM Nicolas Dichtel
<nicolas.dichtel@...nd.com> wrote:
>
> Le 10/11/2024 à 09:19, Yuyang Huang a écrit :
> > This change introduces netlink notifications for multicast address
> > changes, enabling components like the Android Packet Filter to implement
> > IGMP offload solutions.
> >
> > The following features are included:
> > * Addition and deletion of multicast addresses are reported using
> >   RTM_NEWMULTICAST and RTM_DELMULTICAST messages with AF_INET.
> > * A new notification group, RTNLGRP_IPV4_MCADDR, is introduced for
> >   receiving these events.
> >
> > This enhancement allows user-space components to efficiently track
> > multicast group memberships and program hardware offload filters
> > accordingly.
> >
> > Cc: Maciej Żenczykowski <maze@...gle.com>
> > Cc: Lorenzo Colitti <lorenzo@...gle.com>
> > Co-developed-by: Patrick Ruddy <pruddy@...tta.att-mail.com>
> > Signed-off-by: Patrick Ruddy <pruddy@...tta.att-mail.com>
> > Link: https://lore.kernel.org/r/20180906091056.21109-1-pruddy@vyatta.att-mail.com
> > Signed-off-by: Yuyang Huang <yuyanghuang@...gle.com>
> > ---
> >  include/uapi/linux/rtnetlink.h |  6 ++++
> >  net/ipv4/igmp.c                | 58 ++++++++++++++++++++++++++++++++++
> >  2 files changed, 64 insertions(+)
> >
> > diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
> > index 3b687d20c9ed..354a923f129d 100644
> > --- a/include/uapi/linux/rtnetlink.h
> > +++ b/include/uapi/linux/rtnetlink.h
> > @@ -93,6 +93,10 @@ enum {
> >       RTM_NEWPREFIX   = 52,
> >  #define RTM_NEWPREFIX        RTM_NEWPREFIX
> >
> > +     RTM_NEWMULTICAST,
> > +#define RTM_NEWMULTICAST RTM_NEWMULTICAST
> > +     RTM_DELMULTICAST,
> > +#define RTM_DELMULTICAST RTM_DELMULTICAST
> These names are misleading, they are very generic, but in fact, specialized to igmp.
>
> Are there plans to add more notifications later?
> What about ipv6?
>
> >       RTM_GETMULTICAST = 58,>  #define RTM_GETMULTICAST RTM_GETMULTICAST
> The RTM_GETMULTICAST works only for with IPv6 and the NEW/DEL will work for IPv4
> only.
>
> Regards,
> Nicolas
>
> >
> > @@ -774,6 +778,8 @@ enum rtnetlink_groups {
> >  #define RTNLGRP_TUNNEL               RTNLGRP_TUNNEL
> >       RTNLGRP_STATS,
> >  #define RTNLGRP_STATS                RTNLGRP_STATS
> > +     RTNLGRP_IPV4_MCADDR,
> > +#define RTNLGRP_IPV4_MCADDR  RTNLGRP_IPV4_MCADDR
> >       __RTNLGRP_MAX
> >  };
> >  #define RTNLGRP_MAX  (__RTNLGRP_MAX - 1)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ