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

2018-10-04 Thread Fernando Fernandez Mancera
On 10/4/18 2:03 PM, Pablo Neira Ayuso wrote: On Thu, Oct 04, 2018 at 01:57:17PM +0200, Fernando Fernandez Mancera wrote: [...] diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c index 00db27dfd2ff..e0fe1b8429ac 100644 --- a/net/netfilter/nfnetlink_osf.c +++

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

2018-10-04 Thread Pablo Neira Ayuso
On Thu, Oct 04, 2018 at 01:57:17PM +0200, Fernando Fernandez Mancera wrote: [...] > diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c > index 00db27dfd2ff..e0fe1b8429ac 100644 > --- a/net/netfilter/nfnetlink_osf.c > +++ b/net/netfilter/nfnetlink_osf.c > @@ -32,9 +32,7 @@

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

2018-10-04 Thread Fernando Fernandez Mancera
Add ttl option support to the nftables "osf" expression. Signed-off-by: Fernando Fernandez Mancera --- v1:initial patch v2:v2: code correctness and fix the "~" typo. v3:make priv->ttl = ttl; optional and priv->ttl default value is now 0. --- include/linux/netfilter/nfnetlink_osf.h | 3 ++-

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

2018-10-04 Thread Pablo Neira Ayuso
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

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

2018-10-04 Thread Fernando Fernandez Mancera
On 10/3/18 5:36 PM, Pablo Neira Ayuso wrote: Hi Fernando, A few comments. On Sat, Sep 29, 2018 at 12:18:51PM +0200, Fernando Fernandez Mancera wrote: Add ttl option support to the nftables "osf" expression. [..] if (!os_name) strncpy((char *)dest, "unknown",