From nobody Tue Apr 23 16:31:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VP70h0RXQz5HZpL; Tue, 23 Apr 2024 16:31:16 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VP70h01zdz46cp; Tue, 23 Apr 2024 16:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713889876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhNGnw/S2QqkX6l53e2yCG/t8ywhu78kx5vk1eELCWc=; b=hk060D/PLk0oMAybLI9Enir7Ia5PwOyLNuJhJcAKWCSuFywfb2wgnBafrXuC8IU+i12jb2 nS3uSyr7UO+RLAYX7bHGkeP+sFdZTx/siVbGseDGw9TSPWhm1cwGjRC1UcPRBOUM6FwNWp wH9+YMY6U5gxjjEdqmuuzbFAjrbE65y4kJF/bspUcUL6eLmIkj4K0IgNb0hOJS3/p8C/p9 IY4pB/YQZHTJM35u3jSln1VNMM3efQBIwP2uG2AIafdHvTXSSWqYSTEZivW/yQnhJjLjSH aALWeeyRWdLTCjdZeUsm7QFzAf4qZVeq/UK26YJ1zrQ6oixPeDC1UzPq+MLb4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713889876; a=rsa-sha256; cv=none; b=ZTBe9cIOJQ6C33kG/FfVYHsTCq5zsc0t2H5FTxWPGPNNg0CH363YiW8P0B1agUqd8NPLGi HdMFhuxWztHGXa1kRrXVg+U40d1q6GLJVetG8Qzm72WaqRxblzbH9eV6vFmfpsu/LmY05Y AkopSRLHxINFxucChPTYvrICScGwbWaIvFxdk09i7xIOuJ1H2O4Uhs3IMgKIraA17ihYOq thYAhxPozq9C0HIjlzq4cJi7/mmTn2Y66T53fHEoWe7WUCz4OwQ0LXxKryib97feYZSLP2 8iWGVBJvP7ZCuCKP9pp+/VLyg2KWVlL4Qpyy2H9/XeYGgQpwCoGs5ybWnWnkaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713889876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhNGnw/S2QqkX6l53e2yCG/t8ywhu78kx5vk1eELCWc=; b=As0T5CV315xVII3LYh5DiZzFEWncnETvhYka0bS/xAAIhoQkxPiu71a6PH5G3fxOv+VsOq Wqs+SE1jrA63oJk/m45GJ3QYfA5H1W4T9WKR56Fa5PFf7HvX9BCVzshU+8Clw3cEVHkAOa 7YGlunKxiKteei9kitGv6nwU57gwIm2XPbzrx8uJD/JSm+ka1rf5CxqNf8BfrRR9FgOgGs NImi3Lk1TzniSQ7rbfL9sskz0ppMarkZIehANoTfBCw9KJkhpE6fvtv+RW1Orki/wz9BL9 kJlbwOpntt4y7VFfMzJkTs6Kz+wQCRR39Ys0b4yLt8BYzhdGRf1Amzn0LlEihA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4VP70g6lPfzftq; Tue, 23 Apr 2024 16:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43NGVFfS047450; Tue, 23 Apr 2024 16:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43NGVFJn047447; Tue, 23 Apr 2024 16:31:15 GMT (envelope-from git) Date: Tue, 23 Apr 2024 16:31:15 GMT Message-Id: <202404231631.43NGVFJn047447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fcdf9a19893b - main - Support ARP for 802 networks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcdf9a19893b9b5beb7a21407de507f0ae4c500b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fcdf9a19893b9b5beb7a21407de507f0ae4c500b commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b Author: Denny Page AuthorDate: 2024-04-13 17:16:08 +0000 Commit: Ed Maste CommitDate: 2024-04-23 16:30:53 +0000 Support ARP for 802 networks This is used by 802.3 Ethernet. (Also be used by 802.4 Token Bus and 802.5 Token Ring, but we don't support those.) This was accidentally removed along with FDDI support in commit 0437c8e3b198, presumably because comments implied it was used only by FDDI or Token Ring. Fixes: 0437c8e3b198 ("Remove support for FDDI networks.") Reviewed-by: emaste Signed-off-by: Denny Page Pull-request: https://github.com/freebsd/freebsd-src/pull/1166 --- sys/net/if_arp.h | 2 +- sys/netinet/if_ether.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h index 0c3ee5d7acc6..6a944276674c 100644 --- a/sys/net/if_arp.h +++ b/sys/net/if_arp.h @@ -45,7 +45,7 @@ struct arphdr { u_short ar_hrd; /* format of hardware address */ #define ARPHRD_ETHER 1 /* ethernet hardware format */ -#define ARPHRD_IEEE802 6 /* token-ring hardware format */ +#define ARPHRD_IEEE802 6 /* 802.2 networks (ethernet/tb/tr) */ #define ARPHRD_FRELAY 15 /* frame relay hardware format */ #define ARPHRD_IEEE1394 24 /* firewire hardware format */ #define ARPHRD_INFINIBAND 32 /* infiniband hardware format */ diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 4b3d2a91d996..543e6a3922fb 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -682,6 +682,10 @@ arpintr(struct mbuf *m) hlen = ETHER_ADDR_LEN; /* RFC 826 */ layer = "ethernet"; break; + case ARPHRD_IEEE802: + hlen = ETHER_ADDR_LEN; + layer = "ieee802"; + break; case ARPHRD_INFINIBAND: hlen = 20; /* RFC 4391, INFINIBAND_ALEN */ layer = "infiniband";