Commit e71b7f1f authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by Jakub Kicinski

selftests: add ping test with ping_group_range tuned

The 'ping' utility is able to manage two kind of sockets (raw or icmp),
depending on the sysctl ping_group_range. By default, ping_group_range is
set to '1 0', which forces ping to use an ip raw socket.

Let's replay the ping tests by allowing 'ping' to use the ip icmp socket.
After the previous patch, ipv4 tests results are the same with both kinds
of socket. For ipv6, there are a lot a new failures (the previous patch
fixes only two cases).
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e1a7ac6f
...@@ -810,10 +810,16 @@ ipv4_ping() ...@@ -810,10 +810,16 @@ ipv4_ping()
setup setup
set_sysctl net.ipv4.raw_l3mdev_accept=1 2>/dev/null set_sysctl net.ipv4.raw_l3mdev_accept=1 2>/dev/null
ipv4_ping_novrf ipv4_ping_novrf
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv4_ping_novrf
log_subsection "With VRF" log_subsection "With VRF"
setup "yes" setup "yes"
ipv4_ping_vrf ipv4_ping_vrf
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv4_ping_vrf
} }
################################################################################ ################################################################################
...@@ -2348,10 +2354,16 @@ ipv6_ping() ...@@ -2348,10 +2354,16 @@ ipv6_ping()
log_subsection "No VRF" log_subsection "No VRF"
setup setup
ipv6_ping_novrf ipv6_ping_novrf
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv6_ping_novrf
log_subsection "With VRF" log_subsection "With VRF"
setup "yes" setup "yes"
ipv6_ping_vrf ipv6_ping_vrf
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv6_ping_vrf
} }
################################################################################ ################################################################################
......
Markdown is supported
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