Skip to content

Commit a84e8c0

Browse files
Florian Westphalkuba-moo
authored andcommitted
selftests: netfilter: nft_queue.sh: fix warnings with socat 1.8.0.0
Updated to a more recent socat release and saw this: socat E xioopen_ipdgram_listen(): unknown address family 0 socat W address is opened in read-write mode but only supports read-only First error is avoided via pf=ipv4 option, second one via -u (unidirectional) mode. Signed-off-by: Florian Westphal <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fc49b80 commit a84e8c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/testing/selftests/net/netfilter/nft_queue.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,10 @@ EOF
512512
:> "$TMPFILE1"
513513
:> "$TMPFILE2"
514514

515-
timeout 10 ip netns exec "$ns2" socat UDP-LISTEN:12345,fork OPEN:"$TMPFILE1",trunc &
515+
timeout 10 ip netns exec "$ns2" socat UDP-LISTEN:12345,fork,pf=ipv4 OPEN:"$TMPFILE1",trunc &
516516
local rpid1=$!
517517

518-
timeout 10 ip netns exec "$ns3" socat UDP-LISTEN:12345,fork OPEN:"$TMPFILE2",trunc &
518+
timeout 10 ip netns exec "$ns3" socat UDP-LISTEN:12345,fork,pf=ipv4 OPEN:"$TMPFILE2",trunc &
519519
local rpid2=$!
520520

521521
ip netns exec "$nsrouter" ./nf_queue -q 12 -d 1000 &
@@ -528,8 +528,8 @@ EOF
528528
# Send two packets, one should end up in ns1, other in ns2.
529529
# This is because nfqueue will delay packet for long enough so that
530530
# second packet will not find existing conntrack entry.
531-
echo "Packet 1" | ip netns exec "$ns1" socat STDIN UDP-DATAGRAM:10.6.6.6:12345,bind=0.0.0.0:55221
532-
echo "Packet 2" | ip netns exec "$ns1" socat STDIN UDP-DATAGRAM:10.6.6.6:12345,bind=0.0.0.0:55221
531+
echo "Packet 1" | ip netns exec "$ns1" socat -u STDIN UDP-DATAGRAM:10.6.6.6:12345,bind=0.0.0.0:55221
532+
echo "Packet 2" | ip netns exec "$ns1" socat -u STDIN UDP-DATAGRAM:10.6.6.6:12345,bind=0.0.0.0:55221
533533

534534
busywait 10000 output_files_written "$TMPFILE1" "$TMPFILE2"
535535

0 commit comments

Comments
 (0)