summaryrefslogtreecommitdiff
path: root/include/net/if_inet6.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2021-08-04 16:43:52 -0500
committerDavid S. Miller <davem@davemloft.net>2021-08-05 11:46:42 +0100
commite11c0e258c1a87e478a7a44e7c3d9e8ea4b8438c (patch)
tree711ee3c08fa6db66a966da272f1dfa469e12170d /include/net/if_inet6.h
parente6a1f7e0b0fe5997b896b793c70d12fc5ed06cdd (diff)
net/ipv6/mcast: Use struct_size() helper
Replace IP6_SFLSIZE() with struct_size() helper in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/if_inet6.h')
-rw-r--r--include/net/if_inet6.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 71bb4cc4d05d..42235c178b06 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -82,9 +82,6 @@ struct ip6_sf_socklist {
struct in6_addr sl_addr[];
};
-#define IP6_SFLSIZE(count) (sizeof(struct ip6_sf_socklist) + \
- (count) * sizeof(struct in6_addr))
-
#define IP6_SFBLOCK 10 /* allocate this many at once */
struct ipv6_mc_socklist {