another question about tc filter

Linux Advanced Routing and Traffic Control

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

 



hi, Stef

i run the following scripts :
tc qdisc add dev eth0 handle ffff: ingress
tc filter add dev eth0 parent ffff: protocol ip \
pref 4 u32 match ip dst 10.0.0.1 flowid :1
tc filter add dev eth0 parent ffff: protocol ip \
pref 5 u32 match ip dst 10.0.0.2 flowid :2

then , i do:
[root@router bin]# tc filter ls dev eth0 parent ffff:
filter protocol ip pref 4 u32
filter protocol ip pref 4 u32 fh 801: ht divisor 1
filter protocol ip pref 4 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid :2
match 0a000002/ffffffff at 16
filter protocol ip pref 4 u32 fh 800: ht divisor 1
filter protocol ip pref 4 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1
match 0a000001/ffffffff at 16
filter protocol ip pref 5 u32
filter protocol ip pref 5 u32 fh 801: ht divisor 1
filter protocol ip pref 5 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid :2
match 0a000002/ffffffff at 16
filter protocol ip pref 5 u32 fh 800: ht divisor 1
filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1
match 0a000001/ffffffff at 16


what confused me is : since i only add both exact one
filter at both priority 4 and priority 5 respectively,
why the filter list shows that there are two filters
in both priority 4 and priority 5?

in other words, the filter :
filter protocol ip pref 4 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid :2
match 0a000002/ffffffff at 16

and the filter :
filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1
match 0a000001/ffffffff at 16

are both unexpected.

and now, if there is a ip flow with a dst address 10.0.0.2,
then how can i tell which filter will it be matched,
the one with the pref 4 or the one with the pref 5?


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
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