You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ping接收ICMP回显应答时是否验证校验和?Fedora 27环境咨询

Does Fedora 27's Ping Tool Verify ICMP Echo Reply Checksums?

Great question—even though the ping man page doesn’t spell this out explicitly, the answer is yes: the ping utility included with Fedora 27 (part of the iputils package) absolutely validates ICMP echo reply checksums by default. Here’s the breakdown:

Why This Makes Sense

First, RFC 792 mandates checksum validation for all ICMP messages as a core part of ensuring packet integrity during transmission. Any compliant ICMP implementation (including ping) has to adhere to this requirement—skipping it would break the protocol’s basic design.

The iputils Ping Implementation

Fedora 27 uses the iputils version of ping. If you dig into its source code, you’ll find explicit logic that calculates the expected checksum for incoming echo reply packets and compares it to the checksum field in the received packet. If the values don’t match, the packet is silently discarded—you won’t see it show up as a successful reply in your ping output.

How to Test This Yourself

If you want to confirm this behavior hands-on:

  • Use a packet crafting tool to create an ICMP echo reply with an intentionally invalid checksum.
  • Send this modified packet to your Fedora 27 system while running ping against the source IP you used for the crafted packet.
  • You’ll notice ping never acknowledges this invalid packet—it won’t count it as a reply, and your output will show no corresponding "bytes from" line.

Can You Turn Off Checksum Validation?

There’s no documented command-line flag in Fedora 27’s ping to disable this check. That’s by design—skipping checksum validation would violate ICMP compliance and leave you open to corrupted or malicious packets.

内容的提问来源于stack exchange,提问作者FGreg

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:06:14