icmp_echo_ignore_broadcasts not working for broadcast other than 255
In an embedded system using linux 5.3.18 it is required to ignore ICMP broadcasts. This device IP set to 192.168.0.34/25
, so the broadcast will be 192.168.0.127
. The flag controlling this behaviour icmp_echo_ignore_broadcasts
is correclty set to 1
When an ICMP echo request with source IP 192.168.0.127
is sent, I would expect this request to be ignored since a response would be a broadcast, but the response is present and the dst MAC is now ff:ff:ff:ff:ff:ff
If the mask is set to /24
this works as intended.
Is my undestanding of calculated broadcast incorrect?
Why was the dst MAC address changed?
ICMP echoes don't have a source address as a broadcast. The source is the unicast address of the source. The destination will be a the broadcast address.