From cfa7f3aa145755a2abc6e6751e11bac95978cfe4 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Tue, 7 Aug 2018 11:44:06 +0200 Subject: src: use NFT_OSF_MAXGENRELEN instead of IFNAMSIZ in osf.c As no "genre" in pf.os exceed 16 bytes of length, we reduce NFT_OSF_MAXGENRELEN parameter to 16 bytes and use it instead of IFNAMSIZ. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- src/osf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/osf.c b/src/osf.c index f07a725c..131d54e4 100644 --- a/src/osf.c +++ b/src/osf.c @@ -4,8 +4,6 @@ #include #include -#include - static void osf_expr_print(const struct expr *expr, struct output_ctx *octx) { nft_print(octx, "osf name"); @@ -24,7 +22,7 @@ static const struct expr_ops osf_expr_ops = { struct expr *osf_expr_alloc(const struct location *loc) { - unsigned int len = IFNAMSIZ * BITS_PER_BYTE; + unsigned int len = NFT_OSF_MAXGENRELEN * BITS_PER_BYTE; const struct datatype *type = &string_type; struct expr *expr; -- cgit v1.2.3