Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit fe32dff

Browse files
troglobitdavem330
authored andcommitted
selftests: forwarding: add TCPDUMP_EXTRA_FLAGS to lib.sh
For some use-cases we may want to change the tcpdump flags used in tcpdump_start(). For instance, observing interfaces without the PROMISC flag, e.g. to see what's really being forwarded to the bridge interface. Signed-off-by: Joachim Wiberg <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b343734 commit fe32dff

File tree

1 file changed

+2
-1
lines changed
  • tools/testing/selftests/net/forwarding

1 file changed

+2
-1
lines changed

tools/testing/selftests/net/forwarding/lib.sh

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000}
2828
REQUIRE_JQ=${REQUIRE_JQ:=yes}
2929
REQUIRE_MZ=${REQUIRE_MZ:=yes}
3030
STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no}
31+
TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=}
3132

3233
relative_path="${BASH_SOURCE%/*}"
3334
if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
@@ -1405,7 +1406,7 @@ tcpdump_start()
14051406
capuser="-Z $SUDO_USER"
14061407
fi
14071408

1408-
$ns_cmd tcpdump -e -n -Q in -i $if_name \
1409+
$ns_cmd tcpdump $TCPDUMP_EXTRA_FLAGS -e -n -Q in -i $if_name \
14091410
-s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 &
14101411
cappid=$!
14111412

0 commit comments

Comments
 (0)