On Tue, 11 Jun 2019 01:03:57 +0200
Matteo Croce wrote:
> On Tue, Jun 11, 2019 at 12:52 AM Matteo Croce wrote:
> >
> > On Tue, Jun 11, 2019 at 12:46 AM Stephen Hemminger
> > wrote:
> > >
> > > On Tue, 11 Jun 2019 00:16:12 +0200
> > > Matteo Croce wrote:
> > >
> > > > + printf("\nnetns:
On Tue, Jun 11, 2019 at 12:52 AM Matteo Croce wrote:
>
> On Tue, Jun 11, 2019 at 12:46 AM Stephen Hemminger
> wrote:
> >
> > On Tue, 11 Jun 2019 00:16:12 +0200
> > Matteo Croce wrote:
> >
> > > + printf("\nnetns: %s\n", nsname);
> > > + cmd_exec(argv[0], argv, true, nsname);
> > >
On Tue, Jun 11, 2019 at 12:46 AM Stephen Hemminger
wrote:
>
> On Tue, 11 Jun 2019 00:16:12 +0200
> Matteo Croce 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
On Tue, 11 Jun 2019 00:16:12 +0200
Matteo Croce wrote:
> + printf("\nnetns: %s\n", nsname);
> + cmd_exec(argv[0], argv, true, nsname);
> return 0;
simple printf breaks JSON output.
'ip netns exec' changes the current netns just before executing a child
process, and restores it after forking. This is needed if we're running in batch
or do_all mode, as well as other cleanup things like VRF associations.
Add an argument to cmd_exec() which allows to switch the current netns dire