Re: [mpls-linux-general] bug: mpls/tc and mpls/netfilter, the same problem ?
Status: Beta
Brought to you by:
jleu
From: Vincent J. <ja...@en...> - 2001-07-03 23:37:32
|
Find enclosed my patch in order to get mpls/tc that is working now ;-))) The ingress filter was not working because: 1/ mpls_index was not set to the right value in sch_ingress.c 2/ mpls_output needs to be called from ip_rcv_finish (ip_input.c) otherwise ip_route_input could not find the right entry and then the skb was delivered to ip_error(). Moreover, I have tested my mpls/tc patch with the MPLS/netfilter patch. It works too ;-) If anyone wants to try it, you should add the following line into mpls_output.c: int mpls_output(struct sk_buff *skb) { static const char *fn_name = "mpls_output"; struct mpls_push_data *mpr = (struct mpls_push_data*)kmem_cache_alloc( mpls_mpr_cachep,GFP_ATOMIC); [... ] mpr->bos = 1; mpr->exp = 0; #ifdef CONFIG_MPLS_INGRESS_POLICING if (skb->mpls_index) { unsigned int key = skb->mpls_index; MPLS_DEBUG(("%s: selecting moi with mpls_index 0x%x\n",fn_name,key)); RADIX_GET(&moi_tree,mpls_out_info_node,next,MPLS_TREE_BITS,unsigned int, key,MPLS_TREE_DEPTH,moi,moi,retval); if(retval || !moi) { MPLS_DEBUG(("%s: unknown mpls_index\n",fn_name)); kmem_cache_free(mpls_mpr_cachep,mpr); return -ESRCH; } mpls_again: + skb->dst = moi->moi_dst; // XXX <- add this line for(i=0;i<moi->moi_instruction_length;i++) { switch(moi->moi_instruction[i].mi_opcode) { case MPLS_OP_FWD: [...] Please Olivier, could you tell me if both work with your ATM boards too ? (I do not have any ;-( ) Thanks, Vincent PS: Enclosed the configuration files of my testbed. Le Mardi 3 Juillet 2001 10:07, Olivier Dugeon a écrit : > Hi Vincent, > > You must use MPLS/tc OR MPLS/netfilter, but not both at the same time. > So, verify that : > > 1/ when you use MPLS/tc iptables are flush > # iptables -v -F -t mangles to flush the mangle table > # iptables -v -L -t mangle to list the mangle table > > 2/ when you use MPLS/netfilter tc ingress are disable > # tc qdisc del dev eth0 handle ffff: ingress to delete ingress > on eth0 > # tc qdisc dev eth0 show to list qdisc > ingress on eth0 > > When you pass mpls_index to iptables, don't forget to preceed the key by > 0x to let iptables know the value has Hexadecimal. > > We have test our patch on atm card and not on ethernet. MPLS/tc doesn't > work for us with atm card. > > Hope you this help, > > Olivier |