acrn-kernel/net/ipv6
William Tu b80d0b93b9 net: ip6_gre: fix tunnel metadata device sharing.
Currently ip6gre and ip6erspan share single metadata mode device,
using 'collect_md_tun'.  Thus, when doing:
  ip link add dev ip6gre11 type ip6gretap external
  ip link add dev ip6erspan12 type ip6erspan external
  RTNETLINK answers: File exists
simply fails due to the 2nd tries to create the same collect_md_tun.

The patch fixes it by adding a separate collect md tunnel device
for the ip6erspan, 'collect_md_tun_erspan'.  As a result, a couple
of places need to refactor/split up in order to distinguish ip6gre
and ip6erspan.

First, move the collect_md check at ip6gre_tunnel_{unlink,link} and
create separate function {ip6gre,ip6ersapn}_tunnel_{link_md,unlink_md}.
Then before link/unlink, make sure the link_md/unlink_md is called.
Finally, a separate ndo_uninit is created for ip6erspan.  Tested it
using the samples/bpf/test_tunnel_bpf.sh.

Fixes: ef7baf5e08 ("ip6_gre: add ip6 erspan collect_md mode")
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-19 23:32:12 -04:00
..
ila
netfilter netfilter: x_tables: add module alias for icmp matches 2018-05-08 14:15:32 +02:00
Kconfig trivial: fix inconsistent help texts 2018-05-08 00:05:11 -04:00
Makefile
addrconf.c
addrconf_core.c
addrlabel.c
af_inet6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-03-31 23:33:04 -04:00
ah6.c
anycast.c
calipso.c
datagram.c ipv6: add a wrapper for ip6_dst_store() with flowi6 checks 2018-04-04 11:31:57 -04:00
esp6.c
esp6_offload.c
exthdrs.c
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c
fou6.c
icmp.c
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c ipv6: Revert "ipv6: Allow non-gateway ECMP for IPv6" 2018-05-02 16:33:02 -04:00
ip6_flowlabel.c
ip6_gre.c net: ip6_gre: fix tunnel metadata device sharing. 2018-05-19 23:32:12 -04:00
ip6_icmp.c
ip6_input.c
ip6_offload.c
ip6_offload.h
ip6_output.c net: test tailroom before appending to linear skb 2018-05-17 17:05:01 -04:00
ip6_tunnel.c ip6_tunnel: better validate user provided tunnel names 2018-04-05 15:16:15 -04:00
ip6_udp_tunnel.c
ip6_vti.c vti6: Change minimum MTU to IPV4_MIN_MTU, vti6 can carry IPv4 too 2018-04-27 07:29:23 +02:00
ip6mr.c
ipcomp6.c
ipv6_sockglue.c
mcast.c
mcast_snoop.c
mip6.c
ndisc.c
netfilter.c
output_core.c
ping.c ipv6: allow to cache dst for a connected sk in ip6_sk_dst_lookup_flow() 2018-04-04 11:31:57 -04:00
proc.c inet: frags: break the 2GB limit for frags storage 2018-03-31 23:25:39 -04:00
protocol.c
raw.c
reassembly.c inet: frags: fix ip6frag_low_thresh boundary 2018-04-04 12:04:59 -04:00
route.c ipv6: fix uninit-value in ip6_multipath_l3_keys() 2018-05-01 12:15:24 -04:00
seg6.c
seg6_hmac.c
seg6_iptunnel.c ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts 2018-04-22 21:04:17 -04:00
seg6_local.c
sit.c ipv6: sit: better validate user provided tunnel names 2018-04-05 15:16:15 -04:00
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-03-31 23:33:04 -04:00
tcpv6_offload.c
tunnel6.c
udp.c udp: fix SO_BINDTODEVICE 2018-05-10 15:42:52 -04:00
udp_impl.h
udp_offload.c
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c xfrm: Fix warning in xfrm6_tunnel_net_exit. 2018-04-16 07:50:09 +02:00