--- if_ethersubr.c.org Wed Jan 13 14:40:53 1999 +++ if_ethersubr.c Wed Jun 2 08:13:29 1999 @@ -111,6 +111,12 @@ #include #endif /* NVLAN > 0 */ +SYSCTL_NODE(_net_link_ether, PF_IPX, ipx, CTLFLAG_RW, 0, ""); +static int ipx8023; /* Should we do Ethernet_II framing for IPX? */ +SYSCTL_INT(_net_link_ether_ipx, OID_AUTO, framing8023, CTLFLAG_RW, + &ipx8023, 0, ""); + + static int ether_resolvemulti __P((struct ifnet *, struct sockaddr **, struct sockaddr *)); u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -179,7 +185,10 @@ #endif #ifdef IPX case AF_IPX: - type = htons(ETHERTYPE_IPX); + if (ipx8023) + type = htons(m->m_pkthdr.len); + else + type = htons(ETHERTYPE_IPX); bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host), (caddr_t)edst, sizeof (edst)); break; @@ -474,8 +483,13 @@ #endif #ifdef IPX case ETHERTYPE_IPX: - schednetisr(NETISR_IPX); - inq = &ipxintrq; + if (ipx8023 == 0) { + schednetisr(NETISR_IPX); + inq = &ipxintrq; + } else { + m_freem(m); + return; + } break; #endif #ifdef NS @@ -496,6 +510,18 @@ return; #endif NETATALK default: +#ifdef IPX + { + struct ipx *ipxp = mtod(m, struct ipx *); + + if (ipx8023 && (ipxp->ipx_sum == 0xffff) && + (ntohs(ipxp->ipx_len) <= m->m_pkthdr.len)) { + schednetisr(NETISR_IPX); + inq = &ipxintrq; + break; + } + } +#endif #ifdef NS checksum = mtod(m, ushort *); /* Novell 802.3 */