From owner-freebsd-bugs@freebsd.org Mon Jan 11 20:49:39 2021 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB88B4E5DB4 for ; Mon, 11 Jan 2021 20:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF5Rl5hDBz4rBw for ; Mon, 11 Jan 2021 20:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id C16584E5AF6; Mon, 11 Jan 2021 20:49:39 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C12E14E59D4 for ; Mon, 11 Jan 2021 20:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF5Rl52fGz4rBv for ; Mon, 11 Jan 2021 20:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BFE821190 for ; Mon, 11 Jan 2021 20:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 10BKnd4j064973 for ; Mon, 11 Jan 2021 20:49:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 10BKndZM064972 for bugs@FreeBSD.org; Mon, 11 Jan 2021 20:49:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 252596] ping to 255.255.255.255 does not set broadcast MAC Date: Mon, 11 Jan 2021 20:49:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: jcaplan@blackberry.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 20:49:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252596 Bug ID: 252596 Summary: ping to 255.255.255.255 does not set broadcast MAC Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: jcaplan@blackberry.com Summary: When pinging the ip address 255.255.255.255, the MAC address shoul= d be set to the broadcast address. Description: I narrowed this down to sys/netinet/ip_output.c where it looks like the decision about whether to set M_BCAST is happening on line 505 for this cas= e: isbroadcast =3D in_ifaddr_broadcast(gw->sin_addr, ia); It looks like in_ifaddr_broadcast is only checking whether the address is t= he same as the interface broadcast (e.g. 192.168.122.255), but not 255.255.255.255. If I ping 192.168.122.255, then I get the expected MAC broadcast address. Actual results: -------------- tcpdump -vvvv -xx -ni em0 icmp & ping -nc 1 255.255.255.255 root@bsd-vbox:/home/jcaplan # tcpdump -vvvv -xx -ni em0 icmp & [1] 5429 root@bsd-vbox:/home/jcaplan # tcpdump: listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes root@bsd-vbox:/home/jcaplan # ping -nc 1 255.255.255.255 PING 255.255.255.255 (255.255.255.255): 56 data bytes 02:01:55.895257 IP (tos 0x0, ttl 64, id 46687, offset 0, flags [none], proto ICMP (1), length 84) 192.168.1.32 > 255.255.255.255: ICMP echo request, id 13845, seq 0, len= gth 64 0x0000: 3c37 862c 1f63 0800 27b8 57c0 0800 4500 Note the first six bytes are not 0xff. Expected Results: ---------------- root@bsd-vbox:/home/jcaplan # tcpdump -vvvv -xx -ni em0 icmp & [1] 5429 root@bsd-vbox:/home/jcaplan # tcpdump: listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes root@bsd-vbox:/home/jcaplan # ping -nc 1 255.255.255.255 PING 255.255.255.255 (255.255.255.255): 56 data bytes 02:01:55.895257 IP (tos 0x0, ttl 64, id 46687, offset 0, flags [none], proto ICMP (1), length 84) 192.168.1.32 > 255.255.255.255: ICMP echo request, id 13845, seq 0, len= gth 64 0x0000: ffff ffff ffff 0800 27b8 57c0 0800 4500 Note the first 6 bytes are 0xff. --=20 You are receiving this mail because: You are the assignee for the bug.=