summaryrefslogtreecommitdiff
path: root/sbin/resolvd
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2021-08-30 19:14:31 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2021-08-30 19:14:31 +0000
commit4f4e61ace3268d162554675e3427f1776fb9ecf3 (patch)
tree8138d786dcd75d6e54b53e7bf2da25903f06a14e /sbin/resolvd
parentcd13716ca7d9578f1c0ad1aaa89eb2762f973cd2 (diff)
Accept dns proposals for the loopback addresses
Don't reserve^Wignore them for unwind(8); there are non-unwind use-cases and so far resolvd(8) always seems to do the right thing when proposing localhost while unwind is running. OK benno
Diffstat (limited to 'sbin/resolvd')
-rw-r--r--sbin/resolvd/resolvd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sbin/resolvd/resolvd.c b/sbin/resolvd/resolvd.c
index d97cf97de27..de3b3bfaa24 100644
--- a/sbin/resolvd/resolvd.c
+++ b/sbin/resolvd/resolvd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolvd.c,v 1.17 2021/08/30 11:04:50 kn Exp $ */
+/* $OpenBSD: resolvd.c,v 1.18 2021/08/30 19:14:30 kn Exp $ */
/*
* Copyright (c) 2021 Florian Obser <florian@openbsd.org>
* Copyright (c) 2021 Theo de Raadt <deraadt@openbsd.org>
@@ -476,8 +476,6 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info)
case AF_INET:
memcpy(&addr4, src, sizeof(struct in_addr));
src += sizeof(struct in_addr);
- if (addr4.s_addr == htonl(INADDR_LOOPBACK))
- continue;
new = findslot(learning);
if (inet_ntop(af, &addr4, learning[new].ip,
INET6_ADDRSTRLEN) != NULL) {
@@ -490,8 +488,6 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info)
case AF_INET6:
memcpy(&addr6, src, sizeof(struct in6_addr));
src += sizeof(struct in6_addr);
- if (IN6_IS_ADDR_LOOPBACK(&addr6))
- continue;
new = findslot(learning);
if (inet_ntop(af, &addr6, learning[new].ip,
INET6_ADDRSTRLEN) != NULL) {