From 3384849c113b1ec3906c7a22cc71d708aae1218e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Eckl?= Date: Wed, 6 Jun 2018 11:13:35 +0200 Subject: nat: Eliminate misuse of AF_* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although the value of AF_INET and NFPROTO_IPV4 is the same, the use of AF_INET was misleading when checking the proto family. Same with AF_INET6. Signed-off-by: Máté Eckl Signed-off-by: Pablo Neira Ayuso --- src/netlink_delinearize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/netlink_delinearize.c') diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index 7d882eba..2c938e52 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -878,7 +878,7 @@ static void netlink_parse_nat(struct netlink_parse_ctx *ctx, goto out_err; } - if (family == AF_INET) + if (family == NFPROTO_IPV4) expr_set_type(addr, &ipaddr_type, BYTEORDER_BIG_ENDIAN); else expr_set_type(addr, &ip6addr_type, @@ -895,7 +895,7 @@ static void netlink_parse_nat(struct netlink_parse_ctx *ctx, goto out_err; } - if (family == AF_INET) + if (family == NFPROTO_IPV4) expr_set_type(addr, &ipaddr_type, BYTEORDER_BIG_ENDIAN); else expr_set_type(addr, &ip6addr_type, -- cgit v1.2.3