blob: 40c2a85122cdab21dea8f4facd350c0821350074 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 8be65561a9f8c641dc22269ae33ff736fdc71f7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Tue, 23 Feb 2016 08:46:09 +0200
Subject: [PATCH] fix handling of non-matching address family entries in
/etc/hosts
---
src/network/lookup_name.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c
index a26ad53..db0f237 100644
--- a/src/network/lookup_name.c
+++ b/src/network/lookup_name.c
@@ -71,7 +71,7 @@ static int name_from_hosts(struct address buf[static MAXADDRS], char canon[stati
/* Isolate IP address to parse */
for (p=line; *p && !isspace(*p); p++);
*p++ = 0;
- if (name_from_numeric(buf+cnt, line, family))
+ if (name_from_numeric(buf+cnt, line, family) > 0)
cnt++;
/* Extract first name as canonical name */
--
2.7.1
|