From: David Ahern <dsahern@gmail.com>
To: "Sharma, Puneet" <pusharma@akamai.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: "dsahern@kernel.org" <dsahern@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2] tc: add print options to fix json output
Date: Thu, 29 Oct 2020 20:47:48 -0600 [thread overview]
Message-ID: <278df9b9-e2f6-fe8a-e7d6-432b29a39697@gmail.com> (raw)
In-Reply-To: <F6349CB8-670F-4CE1-AFFB-A446D311EA42@akamai.com>
On 10/29/20 6:42 PM, Sharma, Puneet wrote:
> Because basic match is made of multiple keywords and parsed and handle differently
> example:
> $ tc filter add dev $eth_dev_name ingress priority 20000 protocol ipv4 basic match '(cmp(u8 at 9 layer network eq 6) or cmp(u8 at 9 layer network eq 17)) and ipset(sg-test-ipv4 src)' action pass
>
> and if jsonw_string used then it will double-quote every string passed and
>
> prints something like this:
> "ematch": "("cmp(u8 at 9 layer 1 eq 6,")","OR "cmp(u8 at 9 layer 1 eq 17,")",") ","AND "ipset(sg-test-ipv4 src,")",
>
I think you need to print that string to a temp buffer to collect the
complete expression and then just call print_string on it.
prev parent reply other threads:[~2020-10-30 2:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 18:35 [PATCH iproute2] tc: add print options to fix json output Puneet Sharma
2020-10-29 20:17 ` Stephen Hemminger
[not found] ` <2B38A297-343E-4DD0-93E2-87F8B2AC1E26@akamai.com>
2020-10-29 23:16 ` Stephen Hemminger
2020-10-30 0:42 ` Sharma, Puneet
2020-10-30 2:47 ` David Ahern [this message]
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=278df9b9-e2f6-fe8a-e7d6-432b29a39697@gmail.com \
--to=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pusharma@akamai.com \
--cc=stephen@networkplumber.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.