Re: [PATCH iptables] iptables-test: add -N option to exercise netns removal path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, Oct 20, 2018 at 11:21:42AM +0200, Pablo Neira Ayuso wrote:
> On Fri, Oct 19, 2018 at 03:38:58PM +0200, Phil Sutter wrote:
> > On Fri, Oct 19, 2018 at 11:55:07AM +0200, Pablo Neira Ayuso wrote:
> > > On Fri, Oct 19, 2018 at 11:04:42AM +0200, Phil Sutter wrote:
> > > > Hi,
> > > > 
> > > > On Thu, Oct 18, 2018 at 08:33:07PM +0200, Pablo Neira Ayuso wrote:
> > > > [...]
> > > > > @@ -108,8 +111,15 @@ def run_test(iptables, rule, rule_save, res, filename, lineno):
> > > > >              command = IPTABLES_SAVE
> > > > >          elif splitted[0] == IP6TABLES:
> > > > >              command = IP6TABLES_SAVE
> > > > > +
> > > > > +    if netns:
> > > > > +            path = "/sbin/ip"
> > > > > +            command = "netns exec ____vm-iptable-test " + EXECUTEABLE + " " + command
> > > > > +    else:
> > > > > +            path = os.path.abspath(os.path.curdir) + "/iptables/" + EXECUTEABLE
> > > > > +
> > > > 
> > > > In netns case, doesn't this lead to calling xtables-*-multi from $PATH
> > > > instead of the local one we want to test?
> > > 
> > > Hm, right, will fix this.
> > 
> > I had another look: In main(), PATH is extended to include $PWD/iptables
> > as first component. So actually this shouldn't matter, but maybe better
> > to have it explicit.
> 
> You mean, we could remove lines that are updating PATH and have them
> explicit everywhere, right? If so, that's fine with it.

Yes, that's what I meant.

> I can have a look in a follow up patch, or may this affect this patch
> in some way I'm overlooking?

No, no secret insights I didn't tell you about. :D

Thanks, Phil



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux