Skip to content

Commit

Permalink
selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compa…
Browse files Browse the repository at this point in the history
…tibility

"tcpdump" is used to capture traffic in these tests while using a random,
temporary and not suffixed file for it. This can interfere with apparmor
configuration where the tool is only allowed to read from files with
'known' extensions.

The MINE type application/vnd.tcpdump.pcap was registered with IANA for
pcap files and .pcap is the extension that is both most common but also
aligned with standard apparmor configurations. See TCPDUMP(8) for more
details.

This improves compatibility with standard apparmor configurations by
using ".pcap" as the file extension for the tests' temporary files.

Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrei Gherzan authored and David S. Miller committed Jan 28, 2023
1 parent 906ad3c commit a6efc42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/cmsg_ipv6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ksft_skip=4
NS=ns
IP6=2001:db8:1::1/64
TGT6=2001:db8:1::2
TMPF=`mktemp`
TMPF=$(mktemp --suffix ".pcap")

cleanup()
{
Expand Down

0 comments on commit a6efc42

Please sign in to comment.