[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807290918.18866.denys@visp.net.lb>
Date: Tue, 29 Jul 2008 09:18:18 +0300
From: Denys Fedoryshchenko <denys@...p.net.lb>
To: Patrick McHardy <kaber@...sh.net>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <shemminger@...ux-foundation.org>
Subject: Re: iproute2 / match / meta bug?
Code is a bit out of my understanding, but
tc/em_meta.c
num = bstrtoul(arg);
if (num != LONG_MAX) {
obj->kind = TCF_META_TYPE_INT << 12;
obj->kind |= TCF_META_ID_VALUE;
*dst = (unsigned long) num;
return bstr_next(arg);
}
num is always -1 in my case
If i change
num = bstrtoul(arg);
if (num != -1) {
obj->kind = TCF_META_TYPE_INT << 12;
obj->kind |= TCF_META_ID_VALUE;
*dst = (unsigned long) num;
return bstr_next(arg);
}
Everything works correctly.
example:
filter parent 1: protocol all pref 49151 basic
filter parent 1: protocol all pref 49151 basic handle 0x1 flowid 1:100
meta(rt_iif mask 0x00000000 eq 1234)
Seems just typo?
On Tuesday 29 July 2008, Patrick McHardy wrote:
> Denys Fedoryshchenko wrote:
> > Kernel 2.6.26, iproute2 latest release. All required modules is loaded.
> > What did i miss or doing wrong?
> >
> > tc filter add dev ifb0 protocol all basic match "meta(rt_iif eq tap0)" classid 1:100
> >
> > tc -s -d filter show dev ifb0
> > filter parent 1: protocol all pref 49152 basic
> > filter parent 1: protocol all pref 49152 basic handle 0x1 flowid 1:100
> > meta(-1 eq -1)
> >
> > Whatever i try - it doesn't work
> > ./tc filter add dev ifb0 protocol all basic match meta \(rt_iif eq tap0\) classid 1:100
> >
>
> You probably need to add support for skb->iif in case the
> packet didn't went through IPv4.
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists