[LARTC] Filtering packets with U32

Linux Advanced Routing and Traffic Control

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

 



hi.

I want to filter packets that's source address is 192.168.0.1 or 192.168.0.25 or 192.168.0.0/28.

# tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip src 192.168.0.1 flow id 1:30
# tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip src 192.168.0.25 flow id 1:30
# tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip src 192.168.0.0/28 flow id 1:30

But the above command need to execute tc   three times.

Can I filtering it with one line tc command?

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