]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipv6: icmp: icmpv6_xrlim_allow() optimization if net.ipv6.icmp.ratelimit is zero
authorEric Dumazet <edumazet@google.com>
Mon, 16 Feb 2026 14:28:32 +0000 (14:28 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Feb 2026 00:46:37 +0000 (16:46 -0800)
commit9395b1bb1f14ae3fa1e4e2f7988f029cb1c009ed
tree09e7f57da5b7dff3303ebaa33babb4baff8a2efe
parentd8d9ef29886733428470655f2f99bc7493589fcb
ipv6: icmp: icmpv6_xrlim_allow() optimization if net.ipv6.icmp.ratelimit is zero

If net.ipv6.icmp.ratelimit is zero we do not have to call
inet_getpeer_v6() and inet_peer_xrlim_allow().

Both can be very expensive under DDOS.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260216142832.3834174-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/icmp.c