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

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

--- Comment #13 from Zhenlei Huang <zlei.huang@gmail.com> ---
(In reply to Yuichiro NAITO from comment #11)

> For example, I have 'em0' interface for IPv4.
> Set a route entry as 'route add 255.255.255.255 -iface em0'.
> Then 'ping 255.255.255.255' works as I expected.

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

```
# route add 255.255.255.255 -iface em0
# ping -c1 255.255.255.255 
```

The tcpdump session:
```
# tcpdump -nvei em0 'icmp'

11:16:47.097435 00:0c:29:73:4f:98 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800),
length 98: (tos 0x0, ttl 64, id 8264, offset 0, flags [none], proto ICMP (1),
length 84)
    192.168.117.154 > 255.255.255.255: ICMP echo request, id 50203, seq 0,
length 64
11:16:47.097476 00:0c:29:73:4f:98 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800),
length 98: (tos 0x0, ttl 64, id 8264, offset 0, flags [none], proto ICMP (1),
length 84)
    192.168.117.154 > 255.255.255.255: ICMP echo request, id 50203, seq 0,
length 64
11:16:47.097688 00:50:56:c0:00:08 > 00:0c:29:73:4f:98, ethertype IPv4 (0x0800),
length 98: (tos 0x0, ttl 64, id 61857, offset 0, flags [none], proto ICMP (1),
length 84)
    192.168.117.1 > 192.168.117.154: ICMP echo reply, id 50203, seq 0, length
64
11:16:47.097692 00:50:56:f2:7d:1e > 00:0c:29:73:4f:98, ethertype IPv4 (0x0800),
length 98: (tos 0x0, ttl 128, id 2139, offset 0, flags [none], proto ICMP (1),
length 84)
    192.168.117.2 > 192.168.117.154: ICMP echo reply, id 50203, seq 0, length
64

```

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