linux/net/ipv6
Eric Dumazet 542744f265 udp: fix behavior of wrong checksums
[ Upstream commit beb39db59d ]

We have two problems in UDP stack related to bogus checksums :

1) We return -EAGAIN to application even if receive queue is not empty.
   This breaks applications using edge trigger epoll()

2) Under UDP flood, we can loop forever without yielding to other
   processes, potentially hanging the host, especially on non SMP.

This patch is an attempt to make things better.

We might in the future add extra support for rt applications
wanting to better control time spent doing a recv() in a hostile
environment. For example we could validate checksums before queuing
packets in socket receive queue.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-22 17:01:18 -07:00
..
netfilter netfilter: Can't fail and free after table replacement 2014-05-31 13:20:28 -07:00
Kconfig ip6_vti: Fix build when NET_IP_TUNNEL is not set. 2014-02-20 14:29:49 +01:00
Makefile ipv6: Add support for IPsec virtual tunnel interfaces 2013-10-10 12:00:01 +02:00
addrconf.c ipv6: fix rtnl locking in setsockopt for anycast and multicast 2014-10-15 08:36:41 +02:00
addrconf_core.c ipv6: move in6_dev_finish_destroy() into core kernel 2013-08-31 22:30:00 -04:00
addrlabel.c ipv6: fix null pointer dereference in __ip6addrlbl_add 2013-09-04 14:14:53 -04:00
af_inet6.c ipv6: add flowlabel_consistency sysctl 2014-01-19 17:12:31 -08:00
ah6.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
anycast.c ipv6: restore the behavior of ipv6_sock_ac_drop() 2014-10-15 08:36:41 +02:00
datagram.c ip: zero sockaddr returned on error queue 2015-02-26 17:50:10 -08:00
esp6.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
exthdrs.c ipv6/exthdrs: accept tlv which includes only padding 2013-09-11 15:52:27 -04:00
exthdrs_core.c ipv6: ipv6_find_hdr restore prev functionality 2014-02-27 18:27:26 -05:00
exthdrs_offload.c ipv6: Fix exthdrs offload registration. 2014-03-06 16:35:55 -05:00
fib6_rules.c ipv6: fix backtracking for throw routes 2015-03-26 15:06:51 +01:00
icmp.c ipv6: some ipv6 statistic counters failed to disable bh 2014-04-14 06:50:03 -07:00
inet6_connection_sock.c net: Remove FLOWI_FLAG_CAN_SLEEP 2013-12-06 07:24:39 +01:00
inet6_hashtables.c inet: convert inet_ehash_secret and ipv6_hash_secret to net_get_random_once 2013-10-19 19:45:35 -04:00
ip6_checksum.c ipv6: move csum_ipv6_magic() and udp6_csum_init() into static library 2013-01-08 17:56:10 -08:00
ip6_fib.c ipv6: replacing a rt6_info needs to purge possible propagated rt6_infos too 2015-02-26 17:50:11 -08:00
ip6_flowlabel.c ipv6: add flowlabel_consistency sysctl 2014-01-19 17:12:31 -08:00
ip6_gre.c ipv6: gre: fix wrong skb->protocol in WCCP 2014-12-16 09:34:27 -08:00
ip6_icmp.c ipv6: Kill ipv6 dependency of icmpv6_send(). 2013-04-29 13:54:36 -04:00
ip6_input.c net: Fix memory leak if TPROXY used with TCP early demux 2014-01-27 16:22:11 -08:00
ip6_offload.c ipv6: gro: fix CHECKSUM_COMPLETE support 2014-05-31 13:20:39 -07:00
ip6_offload.h ipv6: Pull IPv6 GSO registration out of the module 2012-11-15 17:39:24 -05:00
ip6_output.c ipv6: protect skb->sk accesses from recursive dereference inside the stack 2015-04-29 10:31:46 +02:00
ip6_tunnel.c ip6_tunnel: Use ip6_tnl_dev_init as the ndo_init function. 2014-11-21 09:22:59 -08:00
ip6_vti.c ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic 2014-12-16 09:34:27 -08:00
ip6mr.c ip6mr: fix mfc notification flags 2014-03-20 16:24:28 -04:00
ipcomp6.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
ipv6_sockglue.c ipv6: make IPV6_RECVPKTINFO work for ipv4 datagrams 2014-01-19 19:53:18 -08:00
mcast.c ipv6: fix rtnl locking in setsockopt for anycast and multicast 2014-10-15 08:36:41 +02:00
mip6.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
ndisc.c ipv6: Don't reduce hop limit for an interface 2015-04-29 10:31:46 +02:00
netfilter.c netfilter: Fix potential use after free in ip6_route_me_harder() 2014-06-11 11:54:14 -07:00
output_core.c drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets 2014-11-14 08:59:44 -08:00
ping.c net: ping: Return EAFNOSUPPORT when appropriate. 2015-03-18 13:31:23 +01:00
proc.c net: add SNMP counters tracking incoming ECN bits 2013-08-08 22:24:59 -07:00
protocol.c net: remove outdated comment for ipv4 and ipv6 protocol handler 2013-11-28 18:47:51 -05:00
raw.c ipv6: protect protocols not handling ipv4 from v4 connection/bind attempts 2014-01-21 16:59:19 -08:00
reassembly.c ipv6: split inet6_hash_frag for netfilter and initialize secrets with net_get_random_once 2013-10-23 17:01:40 -04:00
route.c ipv6: fix ipv6_cow_metrics for non DST_HOST case 2015-03-18 13:31:21 +01:00
sit.c sit: Use ipip6_tunnel_init as the ndo_init function. 2014-11-21 09:22:59 -08:00
syncookies.c net: Remove FLOWI_FLAG_CAN_SLEEP 2013-12-06 07:24:39 +01:00
sysctl_net_ipv6.c ipv6: add flowlabel_consistency sysctl 2014-01-19 17:12:31 -08:00
tcp_ipv6.c tcp/ipv6: fix flow label setting in TIME_WAIT state 2015-06-22 17:01:16 -07:00
tcpv6_offload.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-28 08:06:01 -07:00
tunnel6.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
udp.c udp: fix behavior of wrong checksums 2015-06-22 17:01:18 -07:00
udp_impl.h net: ipv4/ipv6: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
udp_offload.c ipv6: reuse ip6_frag_id from ip6_ufo_append_data 2014-02-22 00:28:21 -05:00
udplite.c ipv6: do not clear pinet6 field 2013-05-11 16:26:38 -07:00
xfrm6_input.c netfilter: ipv6: use NFPROTO values for NF_HOOK invocation 2010-03-25 16:00:49 +01:00
xfrm6_mode_beet.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm6_mode_ro.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
xfrm6_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm6_mode_tunnel.c ipv6: Add a receive path hook for vti6 in xfrm6_mode_tunnel. 2013-10-09 13:16:36 +02:00
xfrm6_output.c xfrm: revert ipv4 mtu determination to dst_mtu 2013-08-26 12:40:53 +02:00
xfrm6_policy.c xfrm: Fix null pointer dereference when decoding sessions 2013-11-01 07:08:46 +01:00
xfrm6_state.c xfrm: make local error reporting more robust 2013-08-14 13:07:12 +02:00
xfrm6_tunnel.c ipv4/ipv6: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00