selftests: netfilter: missing error check when setting up veth interface
authorJeffrin Jose T <jeffrin@rajagiritech.edu.in>
Wed, 15 May 2019 06:44:04 +0000 (12:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:15:15 +0000 (08:15 +0200)
commitef4ffa0f0b677e090a4176b19599922af20a43fa
treeac1abac122aeb4359834570e2b28255f4e418bc0
parent61c83de6e622cb89c5c85721893c30a7c7cd6e76
selftests: netfilter: missing error check when setting up veth interface

[ Upstream commit 82ce6eb1dd13fd12e449b2ee2c2ec051e6f52c43 ]

A test for the basic NAT functionality uses ip command which needs veth
device. There is a condition where the kernel support for veth is not
compiled into the kernel and the test script breaks. This patch contains
code for reasonable error display and correct code exit.

Signed-off-by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/netfilter/nft_nat.sh