[LARTC] filters with multiple sport matches

Linux Advanced Routing and Traffic Control

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

 



Hello!

ewan wrote:
> I want to filter traffic from source ports X and Y into a filter I
> try
[...]
> tc filter add dev eth0 parent 1: protocol ip prio 9 u32 \
>    match ip sport X 0xffff \
>    match ip sport Y 0xffff \
>    flow id 1:30
>
> I get and illegal match error. whats going wrong and how to i do it
> properly?

A paket can only have one sourceport, so the match above can not work.
You will have to use one filter for each sport!

tc filter add dev eth0 parent 1: protocol ip prio 9 u32 \
   match ip sport X 0xffff \
   flow id 1:30

tc filter add dev eth0 parent 1: protocol ip prio 9 u32 \
   match ip sport Y 0xffff \
   flow id 1:30

Greetings, Nils



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