Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Apr 2024 14:46:09 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d776dd5fbd48 - stable/14 - Support ARP for 802 networks
Message-ID:  <202404271446.43REk9dZ015226@gitrepo.freebsd.org>

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

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

commit d776dd5fbd484acdf00f6df55583e9aa53226859
Author:     Denny Page <dennypage@me.com>
AuthorDate: 2024-04-13 17:16:08 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-04-27 14:45:22 +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
    (cherry picked from commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b)
---
 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 0319807dbfd2..f201fd67cab4 100644
--- a/sys/net/if_arp.h
+++ b/sys/net/if_arp.h
@@ -47,7 +47,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 df564b210f9b..a14671528f18 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -684,6 +684,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?202404271446.43REk9dZ015226>