Re: [PATCH 3/3 nft v4] src: osf: import nfnl_osf.c to load osf fingerprints

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

 



Yes, I am going to work on this improvement. Also after this, I am going to work on give support to ttl and loglevel options in nft_osf if you don't mind.

Thanks!

El 24/08/2018 a las 9:48, Pablo Neira Ayuso escribió:
Some comments, in case you find the time to follow up.

On Wed, Aug 22, 2018 at 05:03:46PM +0200, Fernando Fernandez Mancera wrote:
diff --git a/src/osf.c b/src/osf.c
index 131d54e..b8457cc 100644
--- a/src/osf.c
+++ b/src/osf.c
@@ -26,6 +26,7 @@ struct expr *osf_expr_alloc(const struct location *loc)
  	const struct datatype *type = &string_type;
  	struct expr *expr;
+ osf_init = true;

A possible improvement: I think we can probably remove this osf_init
variable and do this from expr_evaluate_osf(). You can initialize
struct netlink_ctx ctx from what we have in struct eval_ctx, similar
to what we do in cache_update(). So you can call
nfnl_osf_load_fingerprints() from expr_evaluate_osf() instead of doing
so from the do_command_add() path.

Thanks.




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

  Powered by Linux