Thread (2 messages) 2 messages, 1 author, 3d ago

Re: [PATCH net] net: ipv4: do not send ICMP Redirect when peer allocation fails

From: Eric Dumazet <edumazet@google.com>
Date: 2026-07-23 12:43:34

On Thu, Jul 23, 2026 at 2:06 PM Eric Dumazet [off-list ref] wrote:
When inet_getpeer_v4() fails to allocate a peer entry under memory pressure
or tree size caps, ip_rt_send_redirect() previously fell back to sending an
un-rate-limited ICMP Redirect.

Because ICMP Redirect is not part of the global rate limit mask (sysctl_icmp_ratemask),
sending ICMP Redirects when peer == NULL creates an un-rate-limited ICMP packet storm.

Fix this by failing closed in ip_rt_send_redirect() when peer == NULL.

Fixes: a853c609504e ("inetpeer: do not get a refcount in inet_getpeer()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/route.c | 2 --
 1 file changed, 2 deletions(-)
I think I sent this patch too soon, I will send a V2 tomorrow.
--
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help