Em Fri, Mar 02, 2001 at 01:21:07AM +0100, J.R. de Jong escreveu: > Anyway, our main server died (it wasn't me!) which is another reason to > wait for tomorrow to get consistent results (the other being that I'm too > tired right now to run the right kernel, leading me to send you wrong data > before). Ok, so please test this patch, that has that small damn bug (!= should be ==) fixed, I think it'll cure the bug, when you confirm that I'll submit it for inclusion, ok? - Arnaldo --- linux-2.4.2-ac7/include/net/ipx.h Wed Feb 21 21:10:24 2001 +++ linux-2.4.2-ac7.acme/include/net/ipx.h Thu Mar 1 13:11:16 2001 @@ -78,7 +78,10 @@ u8 ipx_tctrl; u32 ipx_dest_net; u32 ipx_source_net; - int last_hop_index; + struct { + u32 netnum; + int index; + } last_hop; }; #endif #define IPX_MIN_EPHEMERAL_SOCKET 0x4000 --- linux-2.4.2-ac7/net/ipx/af_ipx.c Thu Mar 1 06:29:31 2001 +++ linux-2.4.2-ac7.acme/net/ipx/af_ipx.c Thu Mar 1 20:12:42 2001 @@ -65,6 +65,7 @@ * Arnaldo Carvalho de Melo <acme@conectiva.com.br>, * December, 2000 * Revision 044: Call ipxitf_hold on NETDEV_UP (acme) + * Revision 045: fix PPROP routing bug * * Protect the module by a MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT * pair. Also, now usage count is managed this way @@ -693,13 +694,13 @@ ipx->ipx_source.net = IPX_SKB_CB(skb)->ipx_source_net; /* see if we need to include the netnum in the route list */ - if (IPX_SKB_CB(skb)->last_hop_index >= 0) { + if (IPX_SKB_CB(skb)->last_hop.index >= 0) { u32 *last_hop = (u32 *)(((u8 *) skb->data) + sizeof(struct ipxhdr) + - IPX_SKB_CB(skb)->last_hop_index * + IPX_SKB_CB(skb)->last_hop.index * sizeof(u32)); - *last_hop = intrfc->if_netnum; - IPX_SKB_CB(skb)->last_hop_index = -1; + *last_hop = IPX_SKB_CB(skb)->last_hop.netnum; + IPX_SKB_CB(skb)->last_hop.index = -1; } /* @@ -827,7 +828,7 @@ } } - IPX_SKB_CB(skb)->last_hop_index = -1; + IPX_SKB_CB(skb)->last_hop.index = -1; if (ipx->ipx_type == IPX_TYPE_PPROP && IPX_SKB_CB(skb)->ipx_tctrl < 8 && skb->pkt_type != PACKET_OTHERHOST && @@ -847,7 +848,8 @@ /* < 8 hops && input itfc not in list */ /* save the position where we will insert recvd * netnum into list, later on, in ipxitf_send */ - IPX_SKB_CB(skb)->last_hop_index = i; + IPX_SKB_CB(skb)->last_hop.index = i; + IPX_SKB_CB(skb)->last_hop.netnum = intrfc->if_netnum; IPX_SKB_CB(skb)->ipx_tctrl++; /* xmit on all other interfaces... */ spin_lock_bh(&ipx_interfaces_lock); @@ -858,11 +860,16 @@ continue; /* That aren't in the list */ + if (ifcs == intrfc) + continue; l = (__u32 *) c; - for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) + /* don't consider the last entry in the packet + * list, it is our netnum */ + for (i = 0; + i < IPX_SKB_CB(skb)->ipx_tctrl - 1; i++) if (ifcs->if_netnum == *l++) break; - if (i == IPX_SKB_CB(skb)->ipx_tctrl) { + if (i == IPX_SKB_CB(skb)->ipx_tctrl - 1) { struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); @@ -1470,8 +1477,7 @@ ipx->ipx_type = usipx->sipx_type; skb->h.raw = (void *)skb->nh.ipxh = ipx; - IPX_SKB_CB(skb)->last_hop_index = -1; - + IPX_SKB_CB(skb)->last_hop.index = -1; #ifdef CONFIG_IPX_INTERN IPX_SKB_CB(skb)->ipx_source_net = sk->protinfo.af_ipx.intrfc->if_netnum; memcpy(ipx->ipx_source.node, sk->protinfo.af_ipx.node, IPX_NODE_LEN); @@ -2494,7 +2500,7 @@ proc_net_create("ipx_interface", 0, ipx_interface_get_info); proc_net_create("ipx_route", 0, ipx_rt_get_info); #endif - printk(KERN_INFO "NET4: Linux IPX 0.44 for NET4.0\n"); + printk(KERN_INFO "NET4: Linux IPX 0.45 for NET4.0\n"); printk(KERN_INFO "IPX Portions Copyright (c) 1995 Caldera, Inc.\n"); printk(KERN_INFO "IPX Portions Copyright (c) 2000 Conectiva, Inc.\n"); return 0; - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org