--- if_ethersubr.c.v2.2.org Wed Jul 2 07:56:33 1997 +++ if_ethersubr.c Sun Jul 27 10:18:58 1997 @@ -101,6 +101,11 @@ extern u_char aarp_org_code[ 3 ]; #endif NETATALK +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, ""); + u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #define senderr(e) { error = (e); goto bad;} @@ -177,7 +182,10 @@ { struct ifaddr *ia; - 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)); for (ia = ifp->if_addrlist; ia != NULL; ia = ia->ifa_next) @@ -467,8 +475,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 @@ -489,6 +502,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 */