[Bug 252596] ping to 255.255.255.255 does not set broadcast MAC

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 09 Dec 2022 10:28:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252596

--- Comment #14 from Yuichiro NAITO <naito.yuichiro@gmail.com> ---
(In reply to Zhenlei Huang from comment #13)

> Found an interesting bug, the ICMP request is duplicated (and hence the duplicated ICMP reply).

I don't think it is a bug of protocol stack.

The first ICMP request is really sent to the ethernet, the second one is
received packet that is broadcasted. The sending interface is also in the
broadcast domain.

If you make a bridge interface that includes 'em0' and use the bridge interface
for
255.255.255.255. You can see just sending packets on 'em0'.

Example commands are here.

```
ifconfig bridge0 create
ifconfig bridge0 addm em0
ifconfig bridge0 inet <some address>/<netmask>
route add 255.255.255.255 -iface bridge0
tcpdump -nvei em0 icmp
```

One packet can be seen on 'em0' while `ping -c1 255.255.255.255`.

And, two received ICMP responses are different in source address.
They are '192.168.117.1' and '192.168.117.2'. Two hosts responded to your
broadcast packet.

-- 
You are receiving this mail because:
You are the assignee for the bug.