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

Re: Does u32 match nexthdr+X work?



Yes it is broken probably. At least I find
bug in code several months ago and described
it at my homepage.
Never tried to repair however ;)

Stuart DJ Lynne wrote:
> 
> Is it possible that the u32 filter use of nexthdr+N construct is broken?
> 
> I'm trying to match ack's with:
> 
>     tc filter add dev eth0 parent 20:0 protocol ip prio 10 u32 \
>        match ip protocol 6 0xff \
>        match u8 0x10 0xff at nexthdr+13 \
>        flowid 20:23
> 
> This doesn't work for me so I added a few printks in the u32_classify()
> function to show what it was working on. It seemed to be showing me
> the data at offset 12 in the buffer, not what was at offset 32.
> 
> I was able to match acks with an explicit test like:
> 
>     tc filter add dev eth0 parent 20:0 protocol ip prio 10 u32 \
>         match ip protocol 6 0xff \
>         match u8 0x05 0x0f at 0 \
>         match u8 0x34 0xff at 3 \
>         match u8 0x10 0xff at 33 \
>         flowid 20:23
> 
> Which works but could if there where IP options etc.
> 
> --
> sdjl@fireplug.net