On Mon, Jul 25, 2022 at 11:39:14PM +0200, Florian Westphal wrote: > Erik Skultety <eskultet@xxxxxxxxxx> wrote: > > The fact that the 'opt' table field reports spaces instead of '--' for > > IPv6 as it would have been the case with IPv4 has a bit of an > > unfortunate side effect that it completely confuses the 'jc' JSON > > formatter tool (which has an iptables formatter module). > > Consider: > > # ip6tables -L test > > Chain test (0 references) > > target prot opt source destination > > ACCEPT all a:b:c:: anywhere MAC01:02:03:04:05:06 > > > > Then: > > # ip6tables -L test | jc --iptables > > [{"chain":"test", > > "rules":[ > > {"target":"ACCEPT", > > "prot":"all", > > "opt":"a:b:c::", > > "source":"anywhere", > > "destination":"MAC01:02:03:04:05:06" > > }] > > }] > > > > which as you can see is wrong simply because whitespaces are considered > > as a column delimiter. > > Applied. I amended the commit message to include a Link to this thread > on lore.kernel.org so in case something else breaks because of this > change. > Thanks! However, given Phil's findings in his reply to the patch I think my patch is an incomplete fix without his suggested/proposed follow-ups, so hopefully those could land upstream as well. Regards, Erik