On Tue, Jun 11, 2019 at 12:46 AM Stephen Hemminger <step...@networkplumber.org> wrote: > > On Tue, 11 Jun 2019 00:16:12 +0200 > Matteo Croce <mcr...@redhat.com> wrote: > > > + printf("\nnetns: %s\n", nsname); > > + cmd_exec(argv[0], argv, true, nsname); > > return 0; > > simple printf breaks JSON output.
It was just moved from on_netns_label(). I will check how the json output works when running doall and provide a similar behaviour. Anyway, I noticed that the VRF env should be reset but only in the child. I'm adding a function pointer to cmd_exec which will point to an hook which changes the netns when doing 'ip netns exec' and reset the VRF on vrf exec. Regards, -- Matteo Croce per aspera ad upstream