linux-stable/tools
Hangbin Liu 429b55b441 selftests: fib_test: add a test case for IPv6 source address delete
Add a test case for IPv6 source address delete.

As David suggested, add tests:
- Single device using src address
- Two devices with the same source address
- VRF with single device using src address
- VRF with two devices using src address

As Ido points out, in IPv6, the preferred source address is looked up in
the same VRF as the first nexthop device. This will give us similar results
to IPv4 if the route is installed in the same VRF as the nexthop device, but
not when the nexthop device is enslaved to a different VRF. So add tests:
- src address and nexthop dev in same VR
- src address and nexthop device in different VRF

The link local address delete logic is different from the global address.
It should only affect the associate device it bonds to. So add tests cases
for link local address testing.

Here is the test result:

IPv6 delete address route tests
    Single device using src address
    TEST: Prefsrc removed when src address removed on other device      [ OK ]
    Two devices with the same source address
    TEST: Prefsrc not removed when src address exist on other device    [ OK ]
    TEST: Prefsrc removed when src address removed on all devices       [ OK ]
    VRF with single device using src address
    TEST: Prefsrc removed when src address removed on other device      [ OK ]
    VRF with two devices using src address
    TEST: Prefsrc not removed when src address exist on other device    [ OK ]
    TEST: Prefsrc removed when src address removed on all devices       [ OK ]
    src address and nexthop dev in same VRF
    TEST: Prefsrc removed from VRF when source address deleted          [ OK ]
    TEST: Prefsrc in default VRF not removed                            [ OK ]
    TEST: Prefsrc not removed from VRF when source address exist        [ OK ]
    TEST: Prefsrc in default VRF removed                                [ OK ]
    src address and nexthop device in different VRF
    TEST: Prefsrc not removed from VRF when nexthop dev in diff VRF     [ OK ]
    TEST: Prefsrc not removed in default VRF                            [ OK ]
    TEST: Prefsrc removed from VRF when nexthop dev in diff VRF         [ OK ]
    TEST: Prefsrc removed in default VRF                                [ OK ]
    Table ID 0
    TEST: Prefsrc removed from default VRF when source address deleted  [ OK ]
    Link local source route
    TEST: Prefsrc not removed when delete ll addr from other dev        [ OK ]
    TEST: Prefsrc removed when delete ll addr                           [ OK ]
    TEST: Prefsrc not removed when delete ll addr from other dev        [ OK ]
    TEST: Prefsrc removed even ll addr still exist on other dev         [ OK ]

Tests passed:  19
Tests failed:   0

Suggested-by: Ido Schimmel <idosch@idosch.org>
Suggested-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-08-20 15:27:22 +01:00
..
accounting
arch perf tools fixes for v6.5: 3rd batch 2023-08-09 21:06:14 -07:00
bootconfig
bpf bpftool: Implement link show support for xdp 2023-08-16 10:14:17 -07:00
build Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-07-20 15:52:55 -07:00
certs
cgroup
counter tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure 2023-07-24 10:29:52 -04:00
debugging
edid
firewire
firmware
gpio
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-07-23 23:19:30 +00:00
iio
include bpf: Add support for bpf_get_func_ip helper for uprobe program 2023-08-07 16:42:58 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Set close-on-exec flag on gzopen 2023-08-14 17:35:32 +02:00
memory-model
mm
net/ynl tools: ynl-gen: use temporary file for rendering 2023-08-19 19:24:38 +01:00
objtool x86/srso: Add a Speculative RAS Overflow mitigation 2023-07-27 11:07:14 +02:00
pci
pcmcia
perf perf stat: Don't display zero tool counts 2023-08-08 14:33:57 -03:00
power platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00
rcu
scripts
spi
testing selftests: fib_test: add a test case for IPv6 source address delete 2023-08-20 15:27:22 +01:00
thermal
time
tracing rtla/timerlat_hist: Add timerlat user-space support 2023-06-13 16:41:14 -04:00
usb
verification
virtio tools/virtio: fix build break for aarch64 2023-06-27 10:47:08 -04:00
wmi
workqueue
Makefile