summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/if_arcsubr.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c
index 1912dc3..dba312b 100644
--- a/sys/net/if_arcsubr.c
+++ b/sys/net/if_arcsubr.c
@@ -142,6 +142,33 @@ arc_output(ifp, m, dst, rt0)
atype = (ifp->if_flags & IFF_LINK0) ?
ARCTYPE_IP_OLD : ARCTYPE_IP;
break;
+ case AF_ARP:
+ {
+ struct arphdr *ah;
+ ah = mtod(m, struct arphdr *);
+ ah->ar_hrd = htons(ARPHRD_ARCNET);
+
+ loop_copy = -1; /* if this is for us, don't do it */
+
+ switch(ntohs(ah->ar_op)) {
+ case ARPOP_REVREQUEST:
+ case ARPOP_REVREPLY:
+ type = htons(ARCTYPE_REVARP);
+ break;
+ case ARPOP_REQUEST:
+ case ARPOP_REPLY:
+ default:
+ type = htons(ARCTYPE_ARP);
+ break;
+ }
+
+ if (m->m_flags & M_BCAST)
+ bcopy(ifp->if_broadcastaddr, adst, ARC_ADDR_LEN);
+ else
+ bcopy(ar_tha(ah), adst, ARC_ADDR_LEN);
+
+ }
+ break;
#endif
#ifdef INET6
case AF_INET6:
OpenPOWER on IntegriCloud