lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYkw23FjhSG6qiUX@fedora>
Date: Mon, 9 Feb 2026 00:56:59 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Linus Heckemann <git@...alerite.org>
Cc: edumazet@...gle.com, davem@...emloft.net, eric.dumazet@...il.com,
	horms@...nel.org, kuba@...nel.org, morikw2@...il.com,
	netdev@...r.kernel.org, pabeni@...hat.com,
	syzbot+d4dda070f833dc5dc89a@...kaller.appspotmail.com
Subject: Re: [PATCH] selftests/net: add test for IPv4-in-IPv6 tunneling

Hi Linus
On Sun, Feb 08, 2026 at 03:46:04PM +0100, Linus Heckemann wrote:
> 81c734dae203757fb3c9eee6f9896386940776bd was fine in and of itself, but

Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")'

> its backport to 6.12 (and 6.6) broke IPv4-in-IPv6 tunneling, see [1].
> This adds a self-test for basic IPv4-in-IPv6 functionality.
> 
> [1]: https://lore.kernel.org/all/CAA2RiuSnH_2xc+-W6EnFEG00XjS-dszMq61JEvRjcGS31CBw=g@mail.gmail.com/
> ---
>  tools/testing/selftests/net/Makefile      |  1 +
>  tools/testing/selftests/net/ip6_tunnel.sh | 41 +++++++++++++++++++++++
>  2 files changed, 42 insertions(+)
>  create mode 100644 tools/testing/selftests/net/ip6_tunnel.sh
> 
> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
> index 45c4ea381bc36..5037a344ad826 100644
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -43,6 +43,7 @@ TEST_PROGS := \
>  	io_uring_zerocopy_tx.sh \
>  	ioam6.sh \
>  	ip6_gre_headroom.sh \
> +	ip6_tunnel.sh \
>  	ip_defrag.sh \
>  	ip_local_port_range.sh \
>  	ipv6_flowlabel.sh \
> diff --git a/tools/testing/selftests/net/ip6_tunnel.sh b/tools/testing/selftests/net/ip6_tunnel.sh
> new file mode 100644
> index 0000000000000..366f4c06cd6a3
> --- /dev/null
> +++ b/tools/testing/selftests/net/ip6_tunnel.sh
> @@ -0,0 +1,41 @@
> +#!/bin/bash
> +# Test that IPv4-over-IPv6 tunneling works.

Maybe tests IPv6-over-IPv6 as well?

> +
> +set -e
> +
> +setup_prepare() {
> +  ip link add transport1 type veth peer name transport2
> +
> +  ip netns add ns1

net lib has a helper setup_ns()

> +  ip link set transport1 netns ns1
> +  ip netns exec ns1 bash <<EOF
> +  set -e
> +  ip address add 2001:db8::1/64 dev transport1 nodad
> +  ip link set transport1 up
> +  ip link add link transport1 name tunnel1 type ip6tnl mode ipip6 local 2001:db8::1 remote 2001:db8::2
> +  ip address add 172.0.0.1/32 peer 172.0.0.2/32 dev tunnel1
> +  ip link set tunnel1 up
> +EOF

You can use ip -n $ns_name address/link other than put all the cmds in a inner
bash.


> +
> +  ip netns add ns2
> +  ip link set transport2 netns ns2
> +  ip netns exec ns2 bash <<EOF
> +  set -e
> +  ip address add 2001:db8::2/64 dev transport2 nodad
> +  ip link set transport2 up
> +  ip link add link transport2 name tunnel2 type ip6tnl mode ipip6 local 2001:db8::2 remote 2001:db8::1
> +  ip address add 172.0.0.2/32 peer 172.0.0.1/32 dev tunnel2
> +  ip link set tunnel2 up
> +EOF

Same here

> +}
> +
> +cleanup() {
> +  ip netns delete ns1
> +  ip netns delete ns2

At the same time cleanup_all_ns() help could be used.

> +  # in case the namespaces haven't been set up yet
> +  ip link delete transport1
> +}
> +
> +trap cleanup EXIT
> +setup_prepare
> +ip netns exec ns1 ping -W1 -c1 172.0.0.2
> -- 
> 2.52.0
> 

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ