git: 90499f6efd57 - stable/13 - Support ARP for 802 networks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 Apr 2024 14:47:41 UTC
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=90499f6efd57754563223bce1ec173669f1ce8a1 commit 90499f6efd57754563223bce1ec173669f1ce8a1 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:47:16 +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) (cherry picked from commit d776dd5fbd484acdf00f6df55583e9aa53226859) --- 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 cd5055e31533..9c72f9268ae5 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";