[LARTC] [Q]about u32 filter

Linux Advanced Routing and Traffic Control

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

 



Hi, I have a question about u32 filter.

in u32_classify() function (located in net/sched/cls_u32.c), 
there is a memory address boundary check code : 

--

#if !defined(__i386__) && !defined(__mc68000__)
	if ((unsigned long)ptr & 3) { // ptr = skb->nh.raw
		printk("ptr error...returned -1\n");
		return -1;
	}
#endif

--

According to the code, it is error if ptr is not a multiple of 4 
except on the i386 or mc68000.  Why is this kind of code necessary? 
What kind of problem could happen if that code is removed 
on the other platform - arm or mips or etc..

SoYoung


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