From bdab9612ffb2b548dd0d7d97a43101af9c205e66 Mon Sep 17 00:00:00 2001 From: Alberto Leiva Popper Date: Wed, 8 Jul 2020 11:13:47 -0500 Subject: [PATCH] Patch a bunch of compile bugs reported by Fatih USTA --- configure.ac | 2 +- src/mod/common/db/pool4/empty.c | 2 -- src/usr/nl/attribute.c | 2 +- src/usr/nl/attribute.h | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 5fdd68a79..e9c469d78 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AC_SEARCH_LIBS([pthread_create], [pthread]) AC_CHECK_LIB([argp], [argp_parse]) # Checks for dependencies. -PKG_CHECK_MODULES(LIBNLGENL3, libnl-genl-3.0 >= 3.1) +PKG_CHECK_MODULES(LIBNLGENL3, libnl-genl-3.0 >= 3.2.22) PKG_CHECK_MODULES(XTABLES, xtables) # Bash autocompletion option (https://www.swansontec.com/bash-completion.html): diff --git a/src/mod/common/db/pool4/empty.c b/src/mod/common/db/pool4/empty.c index bf972aa81..67dbd762e 100644 --- a/src/mod/common/db/pool4/empty.c +++ b/src/mod/common/db/pool4/empty.c @@ -30,8 +30,6 @@ bool pool4empty_contains(struct net *ns, const struct ipv4_transport_addr *addr) { if (addr->l4 < DEFAULT_POOL4_MIN_PORT) return false; - if (DEFAULT_POOL4_MAX_PORT < addr->l4) - return false; return contains_addr(ns, &addr->l3); } diff --git a/src/usr/nl/attribute.c b/src/usr/nl/attribute.c index 6243fab32..0912f483f 100644 --- a/src/usr/nl/attribute.c +++ b/src/usr/nl/attribute.c @@ -65,7 +65,7 @@ struct jool_result jnla_parse_nested(struct nlattr *tb[], int maxtype, /* Wrapper for nla_validate() for lists */ struct jool_result jnla_validate_list(struct nlattr *head, int len, - char const *what, struct nla_policy const *policy) + char const *what, struct nla_policy *policy) { struct nlattr *attr; int rem; diff --git a/src/usr/nl/attribute.h b/src/usr/nl/attribute.h index ee19394d0..7d33fdfc0 100644 --- a/src/usr/nl/attribute.h +++ b/src/usr/nl/attribute.h @@ -20,7 +20,7 @@ struct jool_result jnla_parse_msg(struct nl_msg *msg, struct nlattr *tb[], struct jool_result jnla_parse_nested(struct nlattr *result[], int maxtype, struct nlattr *root, struct nla_policy *policy); struct jool_result jnla_validate_list(struct nlattr *head, int len, - char const *what, struct nla_policy const *policy); + char const *what, struct nla_policy *policy); struct nlattr *jnla_nest_start(struct nl_msg *msg, int attrtype);