Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2024 16:31:15 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: fcdf9a19893b - main - Support ARP for 802 networks
Message-ID:  <202404231631.43NGVFJn047447@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=fcdf9a19893b9b5beb7a21407de507f0ae4c500b

commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b
Author:     Denny Page <dennypage@me.com>
AuthorDate: 2024-04-13 17:16:08 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
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 <dennypage@me.com>
    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";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404231631.43NGVFJn047447>