From 9354daa2786189277d614cebf9b692587cb9bd4d Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 10 Jan 2017 16:07:06 +0100 Subject: llmnrd: Correct IPv6 check in llmnr_respond() Implement the check whether IPv6 is enabled properly, checking the bool variable llmnr_ipv6 < 0 doesn't make sense. Found by the coverity scanner (CID 159830). Fixes: e9cd5a6826f1 ("llmnrd: merge rtnl interface event loop into main select() loops") Signed-off-by: Tobias Klauser --- llmnr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llmnr.c b/llmnr.c index 73f5168..64fcabd 100644 --- a/llmnr.c +++ b/llmnr.c @@ -99,7 +99,7 @@ static void llmnr_respond(unsigned int ifindex, const struct llmnr_hdr *hdr, return; /* No AAAA responses if IPv6 is disabled */ - if (llmnr_ipv6 < 0 && qtype == LLMNR_QTYPE_AAAA) + if (!llmnr_ipv6 && qtype == LLMNR_QTYPE_AAAA) return; switch (qtype) { -- cgit v1.2.3-54-g00ecf