summaryrefslogtreecommitdiff
path: root/rust/kernel/debugfs/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authoryuan.gao <yuan.gao@ucloud.cn>2025-12-24 14:31:45 +0800
committerJakub Kicinski <kuba@kernel.org>2026-01-04 09:48:53 -0800
commit4c0856c225b39b1def6c9a6bc56faca79550da13 (patch)
treef24769b56cd0310fa460de187d2f8375c82cd6ef /rust/kernel/debugfs/git@git.tavy.me:linux.git
parent34f3ff52cb9fa7dbf04f5c734fcc4cb6ed5d1a95 (diff)
inet: ping: Fix icmp out counting
When the ping program uses an IPPROTO_ICMP socket to send ICMP_ECHO messages, ICMP_MIB_OUTMSGS is counted twice. ping_v4_sendmsg ping_v4_push_pending_frames ip_push_pending_frames ip_finish_skb __ip_make_skb icmp_out_count(net, icmp_type); // first count icmp_out_count(sock_net(sk), user_icmph.type); // second count However, when the ping program uses an IPPROTO_RAW socket, ICMP_MIB_OUTMSGS is counted correctly only once. Therefore, the first count should be removed. Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Signed-off-by: yuan.gao <yuan.gao@ucloud.cn> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20251224063145.3615282-1-yuan.gao@ucloud.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/debugfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions