kernel-hacking-2024-linux-s.../net/ipv4
Julian Anastasov ed6e4ef836 netfilter: Fix ip_route_me_harder triggering ip_rt_bug
Avoid creating input routes with ip_route_me_harder.
It does not work for locally generated packets. Instead,
restrict sockets to provide valid saddr for output route (or
unicast saddr for transparent proxy). For other traffic
allow saddr to be unicast or local but if callers forget
to check saddr type use 0 for the output route.

	The resulting handling should be:

- REJECT TCP:
	- in INPUT we can provide addr_type = RTN_LOCAL but
	better allow rejecting traffic delivered with
	local route (no IP address => use RTN_UNSPEC to
	allow also RTN_UNICAST).
	- FORWARD: RTN_UNSPEC => allow RTN_LOCAL/RTN_UNICAST
	saddr, add fix to ignore RTN_BROADCAST and RTN_MULTICAST
	- OUTPUT: RTN_UNSPEC

- NAT, mangle, ip_queue, nf_ip_reroute: RTN_UNSPEC in LOCAL_OUT

- IPVS:
	- use RTN_LOCAL in LOCAL_OUT and FORWARD after SNAT
	to restrict saddr to be local

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 05:47:32 -07:00
..
netfilter netfilter: Fix ip_route_me_harder triggering ip_rt_bug 2011-06-29 05:47:32 -07:00
af_inet.c net: rfs: enable RFS before first data packet is received 2011-06-17 15:27:31 -04:00
ah4.c
arp.c
cipso_ipv4.c
datagram.c
devinet.c net: fix two lockdep splats 2011-05-10 15:03:01 -07:00
esp4.c
fib_frontend.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c Add appropriate <linux/prefetch.h> include for prefetch users 2011-05-22 21:41:57 -07:00
gre.c
icmp.c ipv4: Pass explicit destination address to rt_bind_peer(). 2011-05-18 18:42:43 -04:00
igmp.c igmp: call ip_mc_clear_src() only when we have no users of ip_mc_list 2011-05-24 13:26:12 -04:00
inet_connection_sock.c seqlock: Get rid of SEQLOCK_UNLOCKED 2011-05-24 15:22:17 +02:00
inet_diag.c inet_diag: fix inet_diag_bc_audit() 2011-06-17 16:25:39 -04:00
inet_fragment.c
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c inetpeer: fix race in unused_list manipulations 2011-05-27 13:39:11 -04:00
ip_forward.c ipv4: Fix 'iph' use before set. 2011-05-12 23:03:46 -04:00
ip_fragment.c ipv4: Don't use enums as bitmasks in ip_fragment.c 2011-05-17 17:28:02 -04:00
ip_gre.c
ip_input.c
ip_options.c ip_options_compile: properly handle unaligned pointer 2011-05-31 15:11:02 -07:00
ip_output.c ipv4: Fix IPsec slowpath fragmentation problem 2011-06-27 20:34:26 -07:00
ip_sockglue.c
ipcomp.c
ipconfig.c ipconfig wait for carrier 2011-05-19 17:13:04 -04:00
ipip.c
ipmr.c
Kconfig
Makefile net: ipv4: add IPPROTO_ICMP socket kind 2011-05-13 16:08:13 -04:00
netfilter.c netfilter: Fix ip_route_me_harder triggering ip_rt_bug 2011-06-29 05:47:32 -07:00
ping.c ipv4, ping: Remove duplicate icmp.h include 2011-06-20 13:04:38 -07:00
proc.c
protocol.c
raw.c net: convert %p usage to %pK 2011-05-24 01:13:12 -04:00
route.c ipv4: fix multicast losses 2011-06-18 11:59:18 -07:00
syncookies.c
sysctl_net_ipv4.c net: ping: fix build failure 2011-05-17 14:16:58 -04:00
tcp.c
tcp_bic.c
tcp_cong.c
tcp_cubic.c tcp_cubic: limit delayed_ack ratio to prevent divide error 2011-05-08 15:51:57 -07:00
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c
tcp_ipv4.c net: rfs: enable RFS before first data packet is received 2011-06-17 15:27:31 -04:00
tcp_lp.c
tcp_minisocks.c
tcp_output.c inet: Pass flowi to ->queue_xmit(). 2011-05-08 15:28:28 -07:00
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet 2011-06-21 22:34:27 -07:00
udp_impl.h
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c xfrm: Assign the inner mode output function to the dst entry 2011-05-10 15:03:34 -07:00
xfrm4_policy.c ipv4: xfrm: Eliminate ->rt_src reference in policy code. 2011-05-10 13:32:48 -07:00
xfrm4_state.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6 2011-05-11 14:26:58 -04:00
xfrm4_tunnel.c