[LARTC] Problem with tc filter (tc qdisc/class works ok)

Thomas Graf tgr@reeler.org
Sat, 11 Oct 2003 16:09:09 +0200


Hi

> # tc filter add dev imq0 parent 10:0 protocol ip \
> prio 1 u32 match u32 00100000 00ff0000 at 0 \
> flowid 1:10
> 
> All commands except the last one work fine.

I assume you're trying to match the tos field.  u32 uses strtol
to read numeric values. Values prefixed with a 0 are assumed to
be octal you have to write 0x0011... and 0x00ff.... in order
to have it interpreted in hex.

Try this:

tc filter add dev imq parent 10:0 protocol ip \
  prio 1 u32 match ip tos 0x10 0xff flowid 1:10

Regards

-- 
Thomas GRAF <tgraf@suug.ch>