Re: Forwarded traffic bypassing filter

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found out the culprit piece of code in the u32 filter classifier. Some
foundation first. I am using 2.4.18 kernel on MPC855T the powerpc
version. 

Now the following code snippet from 'cls_u32.c'

static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res)
{
   struct {
      struct tc_u_knode *knode;
      u8      *ptr;
   } stack[TC_U32_MAXDEPTH];

   struct tc_u_hnode *ht = (struct tc_u_hnode*)tp->root;
   u8 *ptr = skb->nh.raw;
   struct tc_u_knode *n;
   int sdepth = 0;
   int off2 = 0;
   int sel = 0;
   int i;

/********* CULPRIT CODE *******/
#if !defined(__i386__) && !defined(__mc68000__)
   if ( (unsigned long)ptr & 3 )
      return -1;
#endif
/********* CULPRIT CODE *******/

......
.........

The above code checks for word alignment of a packet on PowerPC
platforms and it somehow fails for forwarded packets then packets
generated by the local host. Now, I checked newer versions of kernel &
it seems that this piece of code has been removed from them. 

So, this issue is closed.

Thanks,
+Amit

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux