Star64_linux/net
Jesper Dangaard Brouer 849a44de91 net: don't global ICMP rate limit packets originating from loopback
Florian Weimer seems to have a glibc test-case which requires that
loopback interfaces does not get ICMP ratelimited.  This was broken by
commit c0303efeab ("net: reduce cycles spend on ICMP replies that
gets rate limited").

An ICMP response will usually be routed back-out the same incoming
interface.  Thus, take advantage of this and skip global ICMP
ratelimit when the incoming device is loopback.  In the unlikely event
that the outgoing it not loopback, due to strange routing policy
rules, ICMP rate limiting still works via peer ratelimiting via
icmpv4_xrlim_allow().  Thus, we should still comply with RFC1812
(section 4.3.2.8 "Rate Limiting").

This seems to fix the reproducer given by Florian.  While still
avoiding to perform expensive and unneeded outgoing route lookup for
rate limited packets (in the non-loopback case).

Fixes: c0303efeab ("net: reduce cycles spend on ICMP replies that gets rate limited")
Reported-by: Florian Weimer <fweimer@redhat.com>
Reported-by: "H.J. Lu" <hjl.tools@gmail.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-14 15:33:58 -04:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv Here are two batman-adv bugfixes: 2017-06-13 13:46:01 -04:00
bluetooth
bpf
bridge
caif caif: Add sockaddr length check before accessing sa_family in connect handler 2017-06-13 16:16:11 -04:00
can can: af_can: namespace support: fix lockdep splat: properly initialize spin_lock 2017-06-09 11:39:23 +02:00
ceph
core net: rps: fix uninitialized symbol warning 2017-06-13 11:31:22 -04:00
dcb
dccp
decnet decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb 2017-06-08 10:51:22 -04:00
dns_resolver
dsa
ethernet
hsr hsr: fix incorrect warning 2017-06-12 15:21:20 -04:00
ieee802154
ife
ipv4 net: don't global ICMP rate limit packets originating from loopback 2017-06-14 15:33:58 -04:00
ipv6 net: don't global ICMP rate limit packets originating from loopback 2017-06-14 15:33:58 -04:00
ipx
irda
iucv
kcm
key
l2tp l2tp: cast l2tp traffic counter to unsigned 2017-06-10 16:14:27 -04:00
l3mdev
lapb
llc
mac80211 Some fixes: 2017-06-13 13:34:13 -04:00
mac802154
mpls
ncsi
netfilter
netlabel
netlink
netrom
nfc
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net/act_pedit: fix an error code 2017-06-14 15:24:18 -04:00
sctp sctp: disable BH in sctp_for_each_endpoint 2017-06-10 16:18:10 -04:00
smc
strparser
sunrpc
switchdev
tipc net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse 2017-06-10 18:20:38 -04:00
unix af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers 2017-06-09 10:10:24 -04:00
vmw_vsock
wimax
wireless
x25
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c