summaryrefslogtreecommitdiffstats
path: root/sys/net/if_iso88025subr.c
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2004-03-14 05:24:54 +0000
committermdodd <mdodd@FreeBSD.org>2004-03-14 05:24:54 +0000
commit07e9f5afcafa05803364f4238c2794141edf058c (patch)
treefa04f6c12f731d091e642544a54bdf19c0a8e3c3 /sys/net/if_iso88025subr.c
parent76b946302c8928c38179cf60c7c3f5e5a30a3c33 (diff)
downloadFreeBSD-src-07e9f5afcafa05803364f4238c2794141edf058c.zip
FreeBSD-src-07e9f5afcafa05803364f4238c2794141edf058c.tar.gz
Handle AF_ARP in *_output()
Obtained from: NetBSD
Diffstat (limited to 'sys/net/if_iso88025subr.c')
-rw-r--r--sys/net/if_iso88025subr.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index 456307a..e6d3d74 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -292,6 +292,33 @@ iso88025_output(ifp, m, dst, rt0)
return (0); /* if not yet resolved */
snap_type = ETHERTYPE_IP;
break;
+ case AF_ARP:
+ {
+ struct arphdr *ah;
+ ah = mtod(m, struct arphdr *);
+ ah->ar_hrd = htons(ARPHRD_IEEE802);
+
+ loop_copy = -1; /* if this is for us, don't do it */
+
+ switch(ntohs(ah->ar_op)) {
+ case ARPOP_REVREQUEST:
+ case ARPOP_REVREPLY:
+ snap_type = ETHERTYPE_REVARP;
+ break;
+ case ARPOP_REQUEST:
+ case ARPOP_REPLY:
+ default:
+ snap_type = ETHERTYPE_ARP;
+ break;
+ }
+
+ if (m->m_flags & M_BCAST)
+ bcopy(ifp->if_broadcastaddr, edst, ISO88025_ADDR_LEN);
+ else
+ bcopy(ar_tha(ah), edst, ISO88025_ADDR_LEN);
+
+ }
+ break;
#endif /* INET */
#ifdef INET6
case AF_INET6:
OpenPOWER on IntegriCloud