summaryrefslogtreecommitdiff
path: root/llmnr.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-01-10 16:07:06 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-01-10 16:07:19 +0100
commit9354daa2786189277d614cebf9b692587cb9bd4d (patch)
tree3ab221e8a6275ea66fd60cb1a467a1db1f823328 /llmnr.c
parente9cd5a6826f198029ee466ae63d56dca4dfa4ad7 (diff)
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 <tklauser@distanz.ch>
Diffstat (limited to 'llmnr.c')
-rw-r--r--llmnr.c2
1 files changed, 1 insertions, 1 deletions
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) {