I think the attached patch should be made generally available. For the time it is not included in the kernel, it fixes a problem with arp-packages on networks other than ethernet (at least for Token Ring).
Claus ----- History ------------------------------------------ Are the conditional compilations necessary anymore? If I compare the code with that of kernel 2.6.22.14, I find that in function arp_process the #ifdefs have already been removed. So I think we can remove them here as well. test for me ... works (at least with TR) ---------------------------------------------------- David Miller wrote: > From: Claus Regelmann <r...@rgc1.inka.de> > Date: Mon, 10 May 2010 00:39:45 +0200 > >> So the question is why CONFIG_TR is undefined allthought .config says: >> ... >> # CONFIG_NETDEV_1000 is not set >> # CONFIG_NETDEV_10000 is not set >> CONFIG_TR=m > > Because when a configuration setting is set to "m" that makes > CONFIG_FOO_MODULE get defined instead of plain CONFIG_FOO. > > So these places that test CONFIG_TR need to be changed to instead > test "defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)" > ----------------------------------------------------------------------------- installing OpenSuse 11.2 on desktop maschine with a TR-PCI card (driver olympic), I reexperienced the problem described below. I dived further into the problem -- almost by trial and error -- and found that the error is in '.../net/ipv4/arp.c' in the function 'arp_create'. --------------------(kernel 2.6.30.4)-------------------------------- /* * Exceptions everywhere. AX.25 uses the AX.25 PID value not the * DIX code for the protocol. Make these device structure fields. */ printk(KERN_WARNING "arp_create hwtype=%d %d\n",dev->type,ARPHRD_IEEE802_TR); <<my test code switch (dev->type) { default: arp->ar_hrd = htons(dev->type); arp->ar_pro = htons(ETH_P_IP); break; #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) case ARPHRD_AX25: arp->ar_hrd = htons(ARPHRD_AX25); arp->ar_pro = htons(AX25_P_IP); break; #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) case ARPHRD_NETROM: arp->ar_hrd = htons(ARPHRD_NETROM); arp->ar_pro = htons(AX25_P_IP); break; #endif #endif #ifdef CONFIG_FDDI case ARPHRD_FDDI: arp->ar_hrd = htons(ARPHRD_ETHER); arp->ar_pro = htons(ETH_P_IP); break; #endif // #ifdef CONFIG_TR <=============================== case ARPHRD_IEEE802_TR: printk(KERN_WARNING "arp_create: IEEE802_TR\n"); arp->ar_hrd = htons(ARPHRD_IEEE802); arp->ar_pro = htons(ETH_P_IP); break; // #endif <================================== } arp->ar_hln = dev->addr_len; arp->ar_pln = 4; After commenting the cond. compilation of CONFIG_TR all works. So the question is why CONFIG_TR is undefined allthought .config says: ... # CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_10000 is not set CONFIG_TR=m # CONFIG_IBMOL is not set # CONFIG_IBMLS is not set ... Claus
diff -Naur linux-2.6.32.8/net/ipv4/arp.c linux-2.6.32.8-cr/net/ipv4/arp.c --- linux-2.6.32.8/net/ipv4/arp.c 2010-02-09 13:57:19.000000000 +0100 +++ linux-2.6.32.8-cr/net/ipv4/arp.c 2010-05-10 20:50:33.000000000 +0200 @@ -604,33 +604,22 @@ arp->ar_hrd = htons(dev->type); arp->ar_pro = htons(ETH_P_IP); break; - -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) case ARPHRD_AX25: arp->ar_hrd = htons(ARPHRD_AX25); arp->ar_pro = htons(AX25_P_IP); break; - -#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) case ARPHRD_NETROM: arp->ar_hrd = htons(ARPHRD_NETROM); arp->ar_pro = htons(AX25_P_IP); break; -#endif -#endif - -#ifdef CONFIG_FDDI case ARPHRD_FDDI: arp->ar_hrd = htons(ARPHRD_ETHER); arp->ar_pro = htons(ETH_P_IP); break; -#endif -#ifdef CONFIG_TR case ARPHRD_IEEE802_TR: arp->ar_hrd = htons(ARPHRD_IEEE802); arp->ar_pro = htons(ETH_P_IP); break; -#endif } arp->ar_hln = dev->addr_len;
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page