aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_iso88025subr.c
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2004-03-14 05:24:54 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2004-03-14 05:24:54 +0000
commit43a6c75a7ac2bdcaadcb2b4c651e4fc67c89f4dc (patch)
treefa04f6c12f731d091e642544a54bdf19c0a8e3c3 /sys/net/if_iso88025subr.c
parent1669fd499dae2fe6195a2fd97e75d17fcb29b7a5 (diff)
downloadsrc-43a6c75a7ac2bdcaadcb2b4c651e4fc67c89f4dc.tar.gz
src-43a6c75a7ac2bdcaadcb2b4c651e4fc67c89f4dc.zip
Handle AF_ARP in *_output()
Obtained from: NetBSD
Notes
Notes: svn path=/head/; revision=126951
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 456307a0af72..e6d3d74a7905 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: