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.