-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests: net: add test case for NAT46 looping back dst
Simple test for crash involving multicast loopback and stale dst. Reuse exising NAT46 program. Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250610001245.1981782-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
- Loading branch information
Jakub Kicinski
committed
Jun 12, 2025
1 parent
ba9db6f
commit 5677669
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
NS="ns-peer-$(mktemp -u XXXXXX)" | ||
|
||
ip netns add "${NS}" | ||
ip -netns "${NS}" link set lo up | ||
ip -netns "${NS}" route add default via 127.0.0.2 dev lo | ||
|
||
tc -n "${NS}" qdisc add dev lo ingress | ||
tc -n "${NS}" filter add dev lo ingress prio 4 protocol ip \ | ||
bpf object-file nat6to4.bpf.o section schedcls/egress4/snat4 direct-action | ||
|
||
ip netns exec "${NS}" \ | ||
bash -c 'echo 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abc | socat - UDP4-DATAGRAM:224.1.0.1:6666,ip-multicast-loop=1' |