]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: rtnetlink: correct xfrm policy rule in kci_test_ipsec_offload
authorZhengchao Shao <shaozhengchao@huawei.com>
Thu, 1 Dec 2022 08:22:46 +0000 (16:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Dec 2022 10:30:45 +0000 (11:30 +0100)
[ Upstream commit 85a0506c073332a3057f5a9635fa0d4db5a8e03b ]

When testing in kci_test_ipsec_offload, srcip is configured as $dstip,
it should add xfrm policy rule in instead of out.
The test result of this patch is as follows:
PASS: ipsec_offload

Fixes: 25d87e7abc0f ("selftests: rtnetlink: add ipsec offload API test")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20221201082246.14131-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/rtnetlink.sh

index 28ea3753da20731095af76e3d2a7ba2d106853f6..911c549f186fb1a6c37b76d13161ca1f0684f028 100755 (executable)
@@ -780,7 +780,7 @@ kci_test_ipsec_offload()
            tmpl proto esp src $srcip dst $dstip spi 9 \
            mode transport reqid 42
        check_err $?
-       ip x p add dir out src $dstip/24 dst $srcip/24 \
+       ip x p add dir in src $dstip/24 dst $srcip/24 \
            tmpl proto esp src $dstip dst $srcip spi 9 \
            mode transport reqid 42
        check_err $?