Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 1997 21:00:30 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        mark.wild@cableinet.co.uk (Mark)
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: IPX router problems
Message-ID:  <199711261900.VAA13202@zibbi.mikom.csir.co.za>
In-Reply-To: <e471aef47%mark@dougal.local> from Mark at "Nov 26, 97 01:59:07 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Mark,

> > One problem might be because the FreeBSD IPX code only supports
> > Ethernet_II framing, which is not the default for Netware servers.
> > The default for Netware 3.x is 802.3 framing and I think for v4.x
> > it is 802.2SNAP, but I'm not 100% sure. The easiest if you only
> > have W95 machines will be to change the server to use Ethernet_II
> > framing. (The default 95 setup will sense that automatically.) If
> > you have older Win3.X machines and diskless machines it won't be
> > that easy. If you can't do Ethernet_II framing, I do have a patch
> > to enable 802.3 framing on the FreeBSD box.
> 
> I was incorrectly told that Ethernet II was being used, but infact it's
> 802.3 (Netware 3.12). I also have the requirement of forwarding IP
> packets across the two interfaces and I gather from your previous
> postings on this subject that it's not currently possible to have
> two frame types on the same interface. Is this still the case?
> Unfortunately there's no chance of moving to Eth. II.

FreeBSD currently can't do more than one IPX frame type on an interface.
You can use this patch to be able to do 802.3 on FreeBSD. It provides
a sysctl to switch between Ethernet_II (default) and 802.3. Remember
that it will switch it for IPX on all the interfaces.

John
-- 
John Hay -- John.Hay@mikom.csir.co.za

--- 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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711261900.VAA13202>