From: Denys Fedoryshchenko <denys@visp.net.lb>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org,
Stephen Hemminger <shemminger@linux-foundation.org>
Subject: Re: iproute2 / match / meta bug?
Date: Tue, 29 Jul 2008 09:25:46 +0300 [thread overview]
Message-ID: <200807290925.46731.denys@visp.net.lb> (raw)
In-Reply-To: <488EB632.9@trash.net>
According man of stroul
RETURN VALUE
The strtoul() function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result
of the conversion represented as an unsigned value, unless the original (non-negated) value would overflow; in the latter case, str-
toul() returns ULONG_MAX and sets the global variable errno to ERANGE. Precisely the same holds for strtoull() (with ULLONG_MAX
instead of ULONG_MAX).
ULONG_MAX is NOT LONG_MAX
So it must not work i guess (2.6.26 release).
Maybe in git it is fixed, dunno, i will check it now.
On Tuesday 29 July 2008, Patrick McHardy wrote:
> Denys Fedoryshchenko wrote:
> > Well, the issue not with ifb0 only. It is just not parsing rules correctly i think:
> >
> > rich tc # ./tc filter add dev ifb0 protocol all basic match meta\(protocol eq 1234\) classid 1:100
> > rich tc # ./tc filter add dev ifb0 protocol all basic match meta\(data_len eq 1234\) classid 1:100
> >
> > filter parent 1: protocol all pref 49151 basic
> > filter parent 1: protocol all pref 49151 basic handle 0x1 flowid 1:100
> > meta(-1 eq 1234)
> >
> > filter parent 1: protocol all pref 49152 basic
> > filter parent 1: protocol all pref 49152 basic handle 0x1 flowid 1:100
> > meta(-1 eq 1234)
> >
>
> Works fine here with a fresh git checkout:
>
> # tc filter add dev dummy0 protocol all parent 1: basic match
> meta\(protocol eq 1234\) classid 1:100
> # tc -s -d filter show dev dummy0
> filter parent 1: protocol all pref 49151 basic
> filter parent 1: protocol all pref 49151 basic handle 0x1 flowid 1:100
> meta(protocol mask 0x00000000 eq 1234)
>
> filter parent 1: protocol all pref 49152 basic
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2008-07-29 6:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 5:43 iproute2 / match / meta bug? Denys Fedoryshchenko
2008-07-29 5:54 ` Patrick McHardy
2008-07-29 6:11 ` Denys Fedoryshchenko
2008-07-29 6:18 ` Patrick McHardy
2008-07-29 6:25 ` Denys Fedoryshchenko [this message]
2008-07-29 6:35 ` Denys Fedoryshchenko
2008-07-29 8:16 ` Denys Fedoryshchenko
2008-07-29 6:18 ` Denys Fedoryshchenko
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=200807290925.46731.denys@visp.net.lb \
--to=denys@visp.net.lb \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).