diff options
author | ume <ume@FreeBSD.org> | 2001-12-26 21:21:10 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-12-26 21:21:10 +0000 |
commit | 32d91b30d9111333596a67421839d385fac08eb7 (patch) | |
tree | 6cd2500cc174e15ae8f8e8c45a5b5f7b863200bf /lib/libc/net/res_send.c | |
parent | eb6c6922fca06dfd53e72a1c466f4d42fe6cb3a6 (diff) | |
download | FreeBSD-src-32d91b30d9111333596a67421839d385fac08eb7.zip FreeBSD-src-32d91b30d9111333596a67421839d385fac08eb7.tar.gz |
- Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
- Don't connect datagram socket if RES_INSECURE1.
- Needed to implement IPv6 anycast UDP DNS queries as documented in
<draft-ietf-ipngwg-dns-discovery-03.txt>.
Obtained from: KAME
Diffstat (limited to 'lib/libc/net/res_send.c')
-rw-r--r-- | lib/libc/net/res_send.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c index e56b91f..1155ba2 100644 --- a/lib/libc/net/res_send.c +++ b/lib/libc/net/res_send.c @@ -635,8 +635,16 @@ read_len: * however, we don't want to remain connected, * as we wish to receive answers from the first * server to respond. + * + * When the option "insecure1" is specified, we'd + * rather expect to see responses from an "unknown" + * address. In order to let the kernel accept such + * responses, do not connect the socket here. + * XXX: or do we need an explicit option to disable + * connecting? */ - if (_res.nscount == 1 || (try == 0 && ns == 0)) { + if (!(_res.options & RES_INSECURE1) && + (_res.nscount == 1 || (try == 0 && ns == 0))) { /* * Connect only if we are sure we won't * receive a response from another server. |