Skip to contentSkip to conversation

tc filter: match tcp src vs. match ip sport

PATCH RESEND New DervishD 1 participant 1 message Nov 25, 2005

lore
Share & tools
lore

DervishD

author
#0 lore raw

PATCH RESEND 1/1 tc filter: match tcp src vs. match ip sport

Hi all :))

Sorry for asking again, but got no answers and google doesn't
give useful information (seems like "nexthdr" doesn't work right, but I don't know why...). I really want to know what am I doing wrong...

    This filter matches what I want:
 
    tc filter add dev eth0 protocol ip parent 1:0 prio 9 u32\
            match ip sport 0x3000 0xf000 flowid 1:22
 
    and traffic goes to 1:22, but this one doesn't match:

    tc filter add dev eth0 protocol ip parent 1:0 prio 9 u32\
            match tcp src 0x3000 0xf000 flowid 1:22
 
    I don't understand why the first one matches and the second one

doesn't :? because in the output of "tc filter show" the only difference is that the first one matches "at 20" and the second one "at nexthdr+0", which should be identical :?????

Looks like "nexthdr" is not working, and I prefer to use it just
in case I have to filter IP packets with options (because then the first filter won't work).

What the heck am I doing wrong? Is iptables my only option?
What's the matter with "nexthdr"?

Thanks a lot in advance :)

Raúl Núñez de Arenas Coronado

Signature · 7 lines
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc