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 <ffmancera@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#define NFT_SET_MAXNAMELEN NFT_NAME_MAXLEN
#define NFT_OBJ_MAXNAMELEN NFT_NAME_MAXLEN
#define NFT_USERDATA_MAXLEN 256
+#define NFT_OSF_MAXGENRELEN 16
/**
* enum nft_registers - nf_tables registers
#include <string.h>
#include <osf.h>
-#include <net/if.h>
-
static void osf_expr_print(const struct expr *expr, struct output_ctx *octx)
{
nft_print(octx, "osf name");
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;