On Fri, Jun 14, 2019 at 4:36 PM David Ahern <dsah...@gmail.com> wrote:
>
> On 6/11/19 10:10 AM, Matteo Croce wrote:
> > Refactor the netns and ipvrf code so less steps are needed to exec commands
> > in a netns or a VRF context.
> > Also remove some code which became dead. bloat-o-meter output:
> >
>
> This breaks the vrf reset after namespace switch
>
>
> # ip vrf ls
> Name              Table
> -----------------------
> red               1001
>
> Set shell into vrf red context:
> # ip vrf exec red bash
>
> Add new namespace and do netns exec:
> # ip netns  add foo
> # ./ip netns exec foo bash
>
> Check the vrf id:
> # ip vrf id
> red
>
> With the current command:
> # ip netns exec foo bash
> # ip vrf id
> <nothing - no vrf bind>

Hi David,

if the vrf needs to be reset after a netns change, why don't we do in
netns_switch()?
This way all code paths will be covered.

Cheers,
-- 
Matteo Croce
per aspera ad upstream

Reply via email to