Subject: Re: [PATCH 3/3] [TC/U32] Infrastructure for pretty printing

From: jamal <[email-masked]>
Date: Mon, 21 Apr 2008 10:15:55 -0400

On Mon, 2008-21-04 at 09:59 -0400, jamal wrote:
> On Mon, 2008-21-04 at 15:29 +0200, Patrick McHardy wrote:
> 
> > Something like that. But it used to already work the
> > way I described, at least for all parts where I tested
> > it so far (IIRC routes/rules/addresses/qdiscs/classes/filters).
> 
> ok, missed that - i dont recall ever using it like that. But i will test
> and make sure it works. Now i get more of what you are saying with the
> env variables.
> 
> > Yes, the first part needs to be stripped (filter/qdisc/class/...).
> > I usually do something like
> > 
> > "ip link/route/addr del <paste dump without first word here>".
> > 
> > Similar for tc.
> 
> Ok, just tried it on my laptop; u32 (and maybe the rest of the filters)
> doesnt work in this mode. Essentially inputting is of the form
> "match u{8,16,32} value mask" and output is of form "match
> 32bitval/32bitmask"

Actually it is easy to fix but it may break existing scripts again.
Certainly will break mine. The simple solution would be:
Change output which goes like:

-------
match 00000000/00ff0000 at 4
-----

to

---------
match 00000000 00ff0000 at 4
---

So maybe just make sure the cooked mode works in the future and ignore
all the rest. Or for the raw format (when someone explicitly calls it
with -raw) output it with the space instead of /.

cheers,
jamal