diff options
| author | Eric Dumazet <edumazet@google.com> | 2024-08-29 17:46:41 +0300 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 15:20:21 +0300 |
| commit | b0da61015db22ebd64d876b57e4cb1c50ed1b64a (patch) | |
| tree | 140258c340daed5de1cc2ea675c4086d07c67102 /include/net | |
| parent | e0987b6c3b34d0998ab90851f9af4bdb0444c381 (diff) | |
| download | linux-b0da61015db22ebd64d876b57e4cb1c50ed1b64a.tar.xz | |
icmp: icmp_msgs_per_sec and icmp_msgs_burst sysctls become per netns
[ Upstream commit f17bf505ff89595df5147755e51441632a5dc563 ]
Previous patch made ICMP rate limits per netns, it makes sense
to allow each netns to change the associated sysctl.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240829144641.3880376-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 034bbd806298 ("icmp: prevent possible overflow in icmp_global_allow()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ip.h | 3 | ||||
| -rw-r--r-- | include/net/netns/ipv4.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index a8e70ba54da4..bacdb4fecc89 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -793,9 +793,6 @@ static inline void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb) bool icmp_global_allow(struct net *net); void icmp_global_consume(struct net *net); -extern int sysctl_icmp_msgs_per_sec; -extern int sysctl_icmp_msgs_burst; - #ifdef CONFIG_PROC_FS int ip_misc_proc_init(void); #endif diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 8d32df274910..40a3a7e2e607 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -84,6 +84,8 @@ struct netns_ipv4 { u8 sysctl_icmp_errors_use_inbound_ifaddr; int sysctl_icmp_ratelimit; int sysctl_icmp_ratemask; + int sysctl_icmp_msgs_per_sec; + int sysctl_icmp_msgs_burst; atomic_t icmp_global_credit; u32 icmp_global_stamp; u32 ip_rt_min_pmtu; |
