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: <1660abed-e6ad-4657-8736-599ab9114f68@suse.de>
Date: Thu, 8 Jan 2026 12:24:47 +0100
From: Fernando Fernandez Mancera <fmancera@...e.de>
To: David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
 horms@...nel.org, shuah@...nel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/2 net-next v2] selftests: ipv6_icmp: add tests for
 ICMPv6 handling

On 1/7/26 5:41 PM, David Ahern wrote:
> On 1/7/26 8:38 AM, Fernando Fernandez Mancera wrote:
>> +icmpv6_to_vrf_based_local_address()
>> +{
>> +	local rc
>> +	local lldummy
>> +
>> +	echo
>> +	echo "ICMPv6 to VRF based local address"
>> +
>> +	setup
>> +
>> +	lldummy=$(get_linklocal dummy0)
>> +
>> +	if [ -z "$lldummy" ]; then
>> +		echo "Failed to get link local address for dummy0"
>> +		return 1
>> +	fi
>> +
>> +	run_cmd "$NS_EXEC sysctl -w net.ipv6.conf.all.keep_addr_on_down=1"
>> +
>> +	# create VRF and setup
>> +	run_cmd "$IP link add vrf0 type vrf table 10"
>> +	run_cmd "$IP link set vrf0 up"
>> +	run_cmd "$IP link set dummy0 master vrf0"
> 
> run_cmd "$IP -6 addr add ::1 dev vrf0 nodad"
> 
> makes the VRF device the loopback.
> 
>> +
>> +	# route to reach 2001:db8::1/128 on VRF device and back to ::1
>> +	run_cmd "$IP -6 route add 2001:db8:1::1/64 dev vrf0"
>> +	run_cmd "$IP -6 route add ::1/128 dev vrf0 table 10"
> 
> and then this route add should not be needed. This is how fcnal-test.sh
> works.
> 

Oh neat! Thanks.

>> +
>> +	# ping6 to link local address
>> +	run_cmd "$NS_EXEC ${ping6} -c 3 $lldummy%dummy0"
>> +	log_test $? 0 "Ping to link local address on VRF context"
>> +
>> +	# ping6 to link local address from localhost (::1)
>> +	run_cmd "$NS_EXEC ${ping6} -c 3 -I ::1 $lldummy%dummy0"
> 
> -I vrf0 should be needed for all VRF tests. I suspect your current
> passing tests are because you have a single setup step and then run
> non-VRF test followed by VRF test. Really you need to do the setup,
> run_test, cleanup for each test.
> 

You are right here about the cleanup, although the tests are passing 
even if the cleanup is properly done or if `-t 
icmpv6_to_vrf_based_local_address`. I don't see why they should not pass.

I am changing them to use `-I vrf0` because it makes more sense.

Thanks for the feedback!
Fernando.

>> +	log_test $? 0 "Ping to link local address from ::1 on VRF context"
>> +
>> +	# ping6 to local address
>> +	run_cmd "$NS_EXEC ${ping6} -c 3 2001:db8:1::1"
>> +	log_test $? 0 "Ping to local address on VRF context"
>> +
>> +	# ping6 to local address from localhost (::1)
>> +	run_cmd "$NS_EXEC ${ping6} -c 3 -I ::1 2001:db8:1::1"
>> +	log_test $? 0 "Ping to local address from ::1 on VRF context"
>> +}
>> +
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ