Skip to content

Commit

Permalink
selftests: add ping test with ping_group_range tuned
Browse files Browse the repository at this point in the history
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: Nicolas Dichtel <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
NicolasDichtel authored and kuba-moo committed May 6, 2022
1 parent e1a7ac6 commit e71b7f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/testing/selftests/net/fcnal-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,16 @@ ipv4_ping()
setup
set_sysctl net.ipv4.raw_l3mdev_accept=1 2>/dev/null
ipv4_ping_novrf
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv4_ping_novrf

log_subsection "With VRF"
setup "yes"
ipv4_ping_vrf
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv4_ping_vrf
}

################################################################################
Expand Down Expand Up @@ -2348,10 +2354,16 @@ ipv6_ping()
log_subsection "No VRF"
setup
ipv6_ping_novrf
setup
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv6_ping_novrf

log_subsection "With VRF"
setup "yes"
ipv6_ping_vrf
setup "yes"
set_sysctl net.ipv4.ping_group_range='0 2147483647' 2>/dev/null
ipv6_ping_vrf
}

################################################################################
Expand Down

0 comments on commit e71b7f1

Please sign in to comment.