RE: [PATCH nf v5 2/3] netfilter: nat_helper: Make sure every proto nat module uses its nat_helper

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

 



Hi Pablo,

> From: netfilter-devel-owner@xxxxxxxxxxxxxxx
> [mailto:netfilter-devel-owner@xxxxxxxxxxxxxxx] On Behalf Of Pablo Neira
> Ayuso
> On Fri, Apr 14, 2017 at 08:46:44AM +0800, Gao Feng wrote:
> > > -----Original Message-----
> > > From: Pablo Neira Ayuso [mailto:pablo@xxxxxxxxxxxxx] On Fri, Mar 31,
> > > 2017 at 06:38:20PM +0800, gfree.wind@xxxxxxxxxxx wrote:
> > > > +static struct nf_ct_nat_helper pptp_nat = {
> > > > +	.name			= "pptp_nat",
> > >
> > > Why all these with "xyz_nat" names?
> >
> > I just used the variable name before.
> > How about rename it to "xyz_nat_helper"?
> > >
> > > This is going to break ctnetlink, as this is the name that
> > > identifies the
> > NAT
> > > helper to be used.
> 
> This name is exposed to userspace, right?
> 
> So FTP uses to rely on the "nat-follow-master" expectfn. But now the name
will
> be "ftp_nat".
> 
> If that is the case, this would break backward.

I am a little confusing.
The " struct nf_ct_nat_helper ftp_nat ftp_nat" is one new variable, while
the original variable 
"struct nf_ct_nat_helper follow_master_nat" name still is "
"nat-follow-master".

I couldn't figure about how could this break backward.
Do you think the name " ftp_nat " should use " ftp_nat_follow_master"?

BTW, how about use nat_helper pointer instead of expect fn?
As I mentioned before, it could avoid two assignment. 
Is it ok?

Regards
Feng

> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel"
in the
> body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at
> http://vger.kernel.org/majordomo-info.html



--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux