]> git.baikalelectronics.ru Git - kernel.git/commit
selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility
authorAndrei Gherzan <andrei.gherzan@canonical.com>
Thu, 26 Jan 2023 16:55:48 +0000 (16:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:42 +0000 (12:59 +0100)
commitd1f5f402ad4a0676075e1ff189f7e7d3783a1feb
treec4e9de006b26d399c601c8a5ee8d84d2cff1a0ad
parentcccaf0e02a1b235539f75bfa9b27275fa89510d5
selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility

[ Upstream commit a70367d70b5dd6be90e0b9805fcf6b9ce06abb90 ]

"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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/cmsg_ipv6.sh