All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] tc: u32 match in nexthdr not working?
Date: Fri, 14 Dec 2001 13:54:43 +0000	[thread overview]
Message-ID: <marc-lartc-100833788904209@msgid-missing> (raw)
In-Reply-To: <marc-lartc-100827285418750@msgid-missing>


	Hello,

On Fri, 14 Dec 2001, bert hubert wrote:

> > 	No, ihl includes the options. Everything works perfectly.
> > It is bug to use sport and dport if ip options are present. There
>
> Geh. Or an 'undocumented feature'. Because you don't know what kind of
> packets you will send or forward, using 'ip sport' is always a bug.

	Yes

> > are tcp dst and tcp src for example. Same for udp. For icmp there
> > are icmp type and icmp code. All they use the same base pointer.
>
> But tcp src only works when operating in a hashed filter? Which is
> not often the case.

	Right. But only then we can match packets with options.

> I tried this:
> tc filter add dev eth0 parent 1:0 prio 5 u32  \
> 	match ip nofrag \
> 	offset mask 0x0F00 shift 6 \
> 	match tcp src 22 0xffff classid 1:2
>
> But it doesn't work, gives:

	Of course

> RTNETLINK answers: Invalid argument

Didn't tried it but something like this:

F="tc filter add dev eth0 parent 1:0 protocol ip prio 5"
$F handle 1: u32 divisor 1
$F u32 ht 1: match tcp src 22 0xFFFF match ip protocol 6 0xFF match ip firstfrag flowid 1:2
$F u32 ht 800:: match u8 0 0 offset at 0 mask 0x0f00 shift 6 link 1:

Using ip nofrag is another bug :) Small? You miss traffic.

> Regards,
>
> bert

Regards

--
Julian Anastasov <ja@ssi.bg>


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

  parent reply	other threads:[~2001-12-14 13:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13 19:46 [LARTC] tc: u32 match in nexthdr not working? Lutz Pressler
2001-12-14  0:13 ` bert hubert
2001-12-14  7:36 ` Lutz Pressler
2001-12-14 12:10 ` Lutz Pressler
2001-12-14 12:56 ` Julian Anastasov
2001-12-14 12:58 ` bert hubert
2001-12-14 13:15 ` Julian Anastasov
2001-12-14 13:32 ` bert hubert
2001-12-14 13:54 ` Julian Anastasov [this message]
2001-12-14 15:16 ` Henrik Nordstrom
2001-12-14 19:59 ` Michael T. Babcock
2001-12-14 23:00 ` bert hubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-100833788904209@msgid-missing \
    --to=ja@ssi.bg \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.