@@ -19,3 +19,5 @@ CONFIG_NET_NS=y
CONFIG_NET_IPGRE=m
CONFIG_NET_IPIP=m
CONFIG_IPV6_SIT=m
+CONFIG_IPV6_GRE=m
+CONFIG_IPV6_TUNNEL=m
@@ -25,6 +25,8 @@ ALL_TESTS="
redir_gre
redir_ipip
redir_sit
+ redir_ip6gre
+ redir_ip6tnl
"
NUM_NETIFS=0
@@ -318,6 +320,40 @@ redir_sit()
cleanup_tunnel
}
+redir_ip6gre()
+{
+ setup_tunnel "ipv6" "classical" "ip6gre"
+ ping_test ipv4 "IP6GRE, classical mode: IPv6 / GRE / IPv4"
+ ping_test ipv6 "IP6GRE, classical mode: IPv6 / GRE / IPv6"
+ ping_test ipv4-mpls "IP6GRE, classical mode: IPv6 / GRE / MPLS / IPv4"
+ ping_test ipv6-mpls "IP6GRE, classical mode: IPv6 / GRE / MPLS / IPv6"
+ cleanup_tunnel
+
+ setup_tunnel "ipv6" "collect_md" "ip6gre" "external" "nocsum"
+ ping_test ipv4 "IP6GRE, external mode: IPv6 / GRE / IPv4"
+ ping_test ipv6 "IP6GRE, external mode: IPv6 / GRE / IPv6"
+ ping_test ipv4-mpls "IP6GRE, external mode: IPv6 / GRE / MPLS / IPv4"
+ ping_test ipv6-mpls "IP6GRE, external mode: IPv6 / GRE / MPLS / IPv6"
+ cleanup_tunnel
+}
+
+redir_ip6tnl()
+{
+ setup_tunnel "ipv6" "classical" "ip6tnl" "mode any"
+ ping_test ipv4 "IP6TNL, classical mode: IPv6 / IPv4"
+ ping_test ipv6 "IP6TNL, classical mode: IPv6 / IPv6"
+ ping_test ipv4-mpls "IP6TNL, classical mode: IPv6 / MPLS / IPv4"
+ ping_test ipv6-mpls "IP6TNL, classical mode: IPv6 / MPLS / IPv6"
+ cleanup_tunnel
+
+ setup_tunnel "ipv6" "collect_md" "ip6tnl" "mode any external"
+ ping_test ipv4 "IP6TNL, external mode: IPv6 / IPv4"
+ ping_test ipv6 "IP6TNL, external mode: IPv6 / IPv6"
+ ping_test ipv4-mpls "IP6TNL, external mode: IPv6 / MPLS / IPv4"
+ ping_test ipv6-mpls "IP6TNL, external mode: IPv6 / MPLS / IPv6"
+ cleanup_tunnel
+}
+
exit_cleanup()
{
if [ "${TESTS_COMPLETED}" = "no" ]; then
Add selftests for the following commit: * da5a2e49f064 ("ip6_tunnel: allow redirecting ip6gre and ipxip6 packets to eth devices"). Like with the previous tc_redirect_l2l3.sh tests, verify that the following tc filter works on the ingress qdisc of ip6gre and ip6tnl devices: $ tc filter add dev tunnel0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Signed-off-by: Guillaume Nault <gnault@redhat.com> --- tools/testing/selftests/net/forwarding/config | 2 ++ .../net/forwarding/tc_redirect_l2l3.sh | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+)