Re: [PATCH nf-next v2] nft_osf: Add ttl option support

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

 



On Thu, Oct 04, 2018 at 01:05:42PM +0200, Fernando Fernandez Mancera wrote:
[...]
> On 10/3/18 5:36 PM, Pablo Neira Ayuso wrote:
[...]
> > Better make this optional, ie.
> > 
> >          if (tb[NFTA_OSF_TTL]) {
> >                  ttl = nla_get_u8(tb[NFTA_OSF_TTL]);
> >                  if (ttl > 2)
> >                          return -EINVAL;
> > 
> >                  priv->ttl = ttl;
> >          }
> > 
> 
> Seems fine to me, I am going to do it.
> 
> > What is the good default value for priv->ttl? We were using -1 before
> > this patch, but now ttl is u8, while nf_osf_ttl() takes a signed
> > value. Better make this s8 instead of u8?
> > 
> > Thanks.
> > 
> 
> About the default value for priv->ttl, I think we can use 0 instead of -1.
> Right now, if priv->ttl is -1 the behaviour established is "-m osf --ttl 0".
> What do you think about that?

Fine with me.

Thanks.



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

  Powered by Linux