linux/net/ipv4
Eric Dumazet fc75fc8339 ipv4: dont create routes on down devices
In ip_route_output_slow(), instead of allowing a route to be created on
a not UPed device, report -ENETUNREACH immediately.

# ip tunnel add mode ipip remote 10.16.0.164 local
10.16.0.72 dev eth0
# (Note : tunl1 is down)
# ping -I tunl1 10.1.2.3
PING 10.1.2.3 (10.1.2.3) from 192.168.18.5 tunl1: 56(84) bytes of data.
(nothing)
# ./a.out tunl1
# ip tunnel del tunl1
Message from syslogd@shelby at Dec 22 10:12:08 ...
  kernel: unregister_netdevice: waiting for tunl1 to become free.
Usage count = 3

After patch:
# ping -I tunl1 10.1.2.3
connect: Network is unreachable

Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-25 20:05:31 -08:00
..
netfilter ipv4: netfilter: ip_tables: fix information leak to userland 2010-11-03 08:45:06 +01:00
af_inet.c
ah4.c
arp.c neigh: Protect neigh->ha[] with a seqlock 2010-10-11 12:54:04 -07:00
cipso_ipv4.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
datagram.c
devinet.c inet: RCU changes in inetdev_by_index() 2010-10-19 03:50:48 -07:00
esp4.c
fib_frontend.c Revert "ipv4: Allow configuring subnets as local addresses" 2010-12-23 12:03:57 -08:00
fib_hash.c fib: Fix fib zone and its hash leak on namespace stop 2010-10-28 10:27:03 -07:00
fib_lookup.h fib: fib_result_assign() should not change fib refcounts 2010-11-04 12:05:32 -07:00
fib_rules.c fib: RCU conversion of fib_lookup() 2010-10-05 20:39:38 -07:00
fib_semantics.c fib: introduce fib_alias_accessed() helper 2010-10-21 03:09:41 -07:00
fib_trie.c net: allow GFP_HIGHMEM in __vmalloc() 2010-11-21 10:04:04 -08:00
gre.c tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
icmp.c xfrm: update flowi saddr in icmp_send if unset 2010-11-16 11:43:39 -08:00
igmp.c inet: fix ip_mc_drop_socket() 2010-11-09 08:26:42 -08:00
inet_connection_sock.c
inet_diag.c inet_diag: Make sure we actually run the same bytecode we audited. 2010-11-04 12:26:34 -07:00
inet_fragment.c
inet_hashtables.c inet: Fix __inet_inherit_port() to correctly increment bsockets and num_owners 2010-11-28 18:18:44 -08:00
inet_lro.c
inet_timewait_sock.c
inetpeer.c inetpeer: __rcu annotations 2010-10-27 11:37:33 -07:00
ip_forward.c
ip_fragment.c
ip_gre.c ip_gre: fix fallback tunnel setup 2010-10-30 16:21:28 -07:00
ip_input.c
ip_options.c
ip_output.c
ip_sockglue.c ipv4: add __rcu annotations to ip_ra_chain 2010-10-25 14:18:28 -07:00
ipcomp.c
ipconfig.c
ipip.c tunnels: Fix tunnels change rcu protection 2010-10-27 14:20:08 -07:00
ipmr.c ipmr: cleanups 2010-10-03 21:50:53 -07:00
Kconfig Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
Makefile
netfilter.c
proc.c tcp: Replace time wait bucket msg by counter 2010-12-08 12:16:33 -08:00
protocol.c net: add __rcu annotations to protocol 2010-10-27 11:37:31 -07:00
raw.c
route.c ipv4: dont create routes on down devices 2010-12-25 20:05:31 -08:00
syncookies.c
sysctl_net_ipv4.c tcp: restrict net.ipv4.tcp_adv_win_scale (#20312) 2010-11-28 10:39:45 -08:00
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
tcp_input.c net: avoid limits overflow 2010-11-10 12:12:00 -08:00
tcp_ipv4.c tcp: fix listening_get_next() 2010-12-23 09:32:46 -08:00
tcp_lp.c
tcp_minisocks.c tcp: Replace time wait bucket msg by counter 2010-12-08 12:16:33 -08:00
tcp_output.c tcp: protect sysctl_tcp_cookie_size reads 2010-12-08 12:34:09 -08:00
tcp_probe.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
tcp_scalable.c
tcp_timer.c tcp: use correct counters in CA_CWR state too 2010-10-17 13:46:33 -07:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
tcp_westwood.c
tcp_yeah.c
tcp.c tcp: Make TCP_MAXSEG minimum more correct. 2010-11-24 11:47:22 -08:00
tunnel4.c tunnels: add __rcu annotations 2010-10-27 11:37:32 -07:00
udp_impl.h
udp.c net: fix nulls list corruptions in sk_prot_alloc 2010-12-16 14:26:56 -08:00
udplite.c net: fix nulls list corruptions in sk_prot_alloc 2010-12-16 14:26:56 -08:00
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c net dst: use a percpu_counter to track entries 2010-10-11 13:06:53 -07:00
xfrm4_state.c
xfrm4_tunnel.c