diff options
| author | Julian Elischer <julian@FreeBSD.org> | 1999-02-20 11:18:00 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 1999-02-20 11:18:00 +0000 |
| commit | 722012cc0c44c7c33ef83a4b3ce8178205ac5f78 (patch) | |
| tree | 6a5647f054e9d19259afda80603133a432d24c78 /sys/netinet/if_ether.c | |
| parent | cf8d718d1f85bf4668f41b5acfa580db5071a8c5 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/if_ether.c')
| -rw-r--r-- | sys/netinet/if_ether.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 382b5a4c8568..5b634cd5b890 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $Id: if_ether.c,v 1.52 1999/01/19 23:17:03 fenner Exp $ + * $Id: if_ether.c,v 1.53 1999/02/16 10:49:51 dfr Exp $ */ /* @@ -55,6 +55,7 @@ #include <net/if.h> #include <net/if_dl.h> +#include <net/if_types.h> #include <net/route.h> #include <net/netisr.h> @@ -297,7 +298,10 @@ arprequest(ac, sip, tip, enaddr) bzero((caddr_t)ea, sizeof (*ea)); (void)memcpy(eh->ether_dhost, etherbroadcastaddr, sizeof(eh->ether_dhost)); eh->ether_type = htons(ETHERTYPE_ARP); /* if_output will not swap */ - ea->arp_hrd = htons(ARPHRD_ETHER); + if (ac->ac_if.if_type == IFT_ETHER) + ea->arp_hrd = htons(ARPHRD_ETHER); + if (ac->ac_if.if_type == IFT_ISO88025) + ea->arp_hrd = htons(ARPHRD_IEEE802); ea->arp_pro = htons(ETHERTYPE_IP); ea->arp_hln = sizeof(ea->arp_sha); /* hardware address length */ ea->arp_pln = sizeof(ea->arp_spa); /* protocol address length */ @@ -410,7 +414,8 @@ arpintr() panic("arpintr"); if (m->m_len >= sizeof(struct arphdr) && (ar = mtod(m, struct arphdr *)) && - ntohs(ar->ar_hrd) == ARPHRD_ETHER && + (ntohs(ar->ar_hrd) == ARPHRD_ETHER || + ntohs(ar->ar_hrd) == ARPHRD_IEEE802) && m->m_len >= sizeof(struct arphdr) + 2 * ar->ar_hln + 2 * ar->ar_pln) |
