Skip to content
Commit 215cd989 authored by luyun's avatar luyun Committed by Jakub Kicinski
Browse files

selftests/net: enable lo.accept_local in psock_snd test



The psock_snd test sends and receives packets over loopback, and
the test results depend on parameter settings:
Set rp_filter=0,
or set rp_filter=1 and accept_local=1
so that the test will pass. Otherwise, this test will fail with
Resource temporarily unavailable:
sudo ./psock_snd.sh
dgram
tx: 128
rx: 142
./psock_snd: recv: Resource temporarily unavailable

For most distro kernel releases(like Ubuntu or Centos), the parameter
rp_filter is enabled by default, so it's necessary to enable the
parameter lo.accept_local in psock_snd test. And this test runs
inside a netns, changing a sysctl is fine.

Signed-off-by: default avatarluyun <luyun@kylinos.cn>
Reviewed-by: default avatarJackie Liu <liuyun01@kylinos.cn>
Tested-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20220525031819.866684-1-luyun_611@163.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d0bbe032
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment