diff options
author | Yuyang Huang <yuyanghuang@google.com> | 2024-12-21 13:00:07 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-12-23 21:26:43 +0300 |
commit | aa4ad7c3f283fa94b80cf84605661700aa39d708 (patch) | |
tree | 20dc0f538998486cdd628220b9d40fdb174db946 /net/ipv6/addrconf.c | |
parent | f288c7a1ba268a9ed58a7971142a98a1e41a3c73 (diff) | |
download | linux-aa4ad7c3f283fa94b80cf84605661700aa39d708.tar.xz |
netlink: correct nlmsg size for multicast notifications
Corrected the netlink message size calculation for multicast group
join/leave notifications. The previous calculation did not account for
the inclusion of both IPv4/IPv6 addresses and ifa_cacheinfo in the
payload. This fix ensures that the allocated message size is
sufficient to hold all necessary information.
This patch also includes the following improvements:
* Uses GFP_KERNEL instead of GFP_ATOMIC when holding the RTNL mutex.
* Uses nla_total_size(sizeof(struct in6_addr)) instead of
nla_total_size(16).
* Removes unnecessary EXPORT_SYMBOL().
Fixes: 2c2b61d2138f ("netlink: add IGMP/MLD join/leave notifications")
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Yuyang Huang <yuyanghuang@google.com>
Link: https://patch.msgid.link/20241221100007.1910089-1-yuyanghuang@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 2e2684886953..4da409bc4577 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -5239,7 +5239,6 @@ int inet6_fill_ifmcaddr(struct sk_buff *skb, nlmsg_end(skb, nlh); return 0; } -EXPORT_SYMBOL(inet6_fill_ifmcaddr); static int inet6_fill_ifacaddr(struct sk_buff *skb, const struct ifacaddr6 *ifaca, |