linux/net/ipv4
Michal Schmidt 5533995b62 [IPIP]: Allow rebinding the tunnel to another interface
Once created, an IP tunnel can't be bound to another device.
(reported as https://bugzilla.redhat.com/show_bug.cgi?id=419671)

To reproduce:

# create a tunnel:
ip tunnel add tunneltest0 mode ipip remote 10.0.0.1 dev eth0
# try to change the bounding device from eth0 to eth1:
ip tunnel change tunneltest0 dev eth1
# show the result:
ip tunnel show tunneltest0

tunneltest0: ip/ip  remote 10.0.0.1  local any  dev eth0  ttl inherit

Notice the bound device has not changed from eth0 to eth1.

This patch fixes it. When changing the binding, it also recalculates the
MTU according to the new bound device's MTU.

If the change is acceptable, I'll do the same for GRE and SIT tunnels.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:57:25 -08:00
..
ipvs [NETFILTER]: Mark hooks __read_mostly 2008-01-28 14:56:07 -08:00
netfilter [NETFILTER]: {nfnetlink,ip,ip6}_queue: kill issue_verdict 2008-01-28 14:56:15 -08:00
Kconfig
Makefile [IPV4]: Cleanup the sysctl_net_ipv4.c file 2008-01-28 14:56:27 -08:00
af_inet.c [IPSEC]: Add ICMP host relookup support 2008-01-28 14:57:23 -08:00
ah4.c [IPSEC]: Move state lock into x->type->input 2008-01-28 14:53:52 -08:00
arp.c [ARP]: Consolidate some code in arp_req_set/delete_publc 2008-01-28 14:56:38 -08:00
cipso_ipv4.c [IPV4] net/ipv4/cipso_ipv4.c: use LIST_HEAD instead of LIST_HEAD_INIT 2008-01-28 14:56:52 -08:00
datagram.c
devinet.c [IPV4]: Cleanup sysctl manipulations in devinet.c 2008-01-28 14:57:09 -08:00
esp4.c [IPSEC]: Move state lock into x->type->input 2008-01-28 14:53:52 -08:00
fib_frontend.c [IPV4]: Add inet_dev_addr_type() 2008-01-28 14:55:56 -08:00
fib_hash.c [IPV4]: last default route is a fib table property 2008-01-28 14:57:01 -08:00
fib_lookup.h [IPV4]: Unify assignment of fi to fib_result 2008-01-28 14:57:01 -08:00
fib_rules.c
fib_semantics.c [IPV4]: no need pass pointer to a default into fib_detect_death 2008-01-28 14:57:00 -08:00
fib_trie.c [IPV4]: last default route is a fib table property 2008-01-28 14:57:01 -08:00
icmp.c [IPSEC]: Add ICMP host relookup support 2008-01-28 14:57:23 -08:00
igmp.c [IPV4]: Add ip_local_out 2008-01-28 14:53:47 -08:00
inet_connection_sock.c [NET]: Convert init_timer into setup_timer 2008-01-28 14:53:35 -08:00
inet_diag.c [INET]: Fix inet_diag dead-lock regression 2007-12-03 15:51:25 +11:00
inet_fragment.c [NET]: Convert init_timer into setup_timer 2008-01-28 14:53:35 -08:00
inet_hashtables.c
inet_lro.c [LRO] Fix lro_mgr->features checks 2008-01-08 23:30:18 -08:00
inet_timewait_sock.c [INET]: Use BUILD_BUG_ON in inet_timewait_sock.c checks 2008-01-28 14:57:08 -08:00
inetpeer.c
ip_forward.c [NETFILTER]: Introduce NF_INET_ hook values 2008-01-28 14:53:55 -08:00
ip_fragment.c
ip_gre.c [IPV4] ip_gre: set mac_header correctly in receive path 2007-12-20 00:10:33 -08:00
ip_input.c [IPv4] RAW: Compact the API for the kernel 2008-01-28 14:54:28 -08:00
ip_options.c
ip_output.c [NETFILTER]: Introduce NF_INET_ hook values 2008-01-28 14:53:55 -08:00
ip_sockglue.c
ipcomp.c [IPSEC]: Forbid BEET + ipcomp for now 2008-01-28 14:53:43 -08:00
ipconfig.c [IPCONFIG]: Mark vendor_class_identifier as __initdata. 2008-01-28 14:54:22 -08:00
ipip.c [IPIP]: Allow rebinding the tunnel to another interface 2008-01-28 14:57:25 -08:00
ipmr.c [NET]: Make rtnetlink infrastructure network namespace aware (v3) 2008-01-28 14:54:25 -08:00
netfilter.c [NETFILTER]: nf_queue: move list_head/skb/id to struct nf_info 2008-01-28 14:56:14 -08:00
proc.c
protocol.c
raw.c [RAW]: Consolidate proc interface. 2008-01-28 14:54:32 -08:00
route.c [NET]: Multiple namespaces in the all dst_ifdown routines. 2008-01-28 14:56:44 -08:00
syncookies.c
sysctl_net_ipv4.c [INET]: Merge sys.net.ipv4.ip_forward and sys.net.ipv4.conf.all.forwarding 2008-01-28 14:56:31 -08:00
tcp.c [TCP]: Use BUILD_BUG_ON for tcp_skb_cb size checking 2008-01-28 14:57:07 -08:00
tcp_bic.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_cong.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_cubic.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_diag.c
tcp_highspeed.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_htcp.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_hybla.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_illinois.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_input.c [TCP]: Abstract tp->highest_sack accessing & point to next skb 2008-01-28 14:55:46 -08:00
tcp_ipv4.c
tcp_lp.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_minisocks.c
tcp_output.c [TCP]: Abstract tp->highest_sack accessing & point to next skb 2008-01-28 14:55:46 -08:00
tcp_probe.c
tcp_scalable.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_timer.c
tcp_vegas.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_vegas.h
tcp_veno.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tcp_westwood.c
tcp_yeah.c [TCP]: Cong.ctrl modules: remove unused good_ack from cong_avoid 2008-01-28 14:55:41 -08:00
tunnel4.c
udp.c [UDP]: Only increment counter on first peek/recv 2008-01-28 14:56:34 -08:00
udp_impl.h
udplite.c
xfrm4_input.c [IPSEC]: Use the correct family for input state lookup 2008-01-28 14:55:49 -08:00
xfrm4_mode_beet.c [IPSEC]: Separate inner/outer mode processing on input 2008-01-28 14:53:46 -08:00
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c [IPSEC]: Separate inner/outer mode processing on input 2008-01-28 14:53:46 -08:00
xfrm4_output.c [NETFILTER]: Introduce NF_INET_ hook values 2008-01-28 14:53:55 -08:00
xfrm4_policy.c [IPSEC]: Added xfrm_decode_session_reverse and xfrmX_policy_check_reverse 2008-01-28 14:57:22 -08:00
xfrm4_state.c [IPSEC]: Kill afinfo->nf_post_routing 2008-01-28 14:53:55 -08:00
xfrm4_tunnel.c