diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-06-11 10:06:05 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-06-11 10:06:05 +0000 |
commit | 2661edd5e2d7a0106c9507f4de4c44d6fbe5102d (patch) | |
tree | 7a116003b29bcf48ddb6f76a18479bd911b44af3 /lib/libc/net/res_init.c | |
parent | 9f4fa9f45bad8232fea1393de0e5ddeb8b9d20c0 (diff) |
support EDNS0 (RFC2671) buffer size notification on DNS queries.
"options edns0" in /etc/resolv.conf will enable the behavior. no behavior
change if you don't have the line. see resolv.conf(5) for more details.
EDNS0 is useful for avoiding TCP DNS queries/replies on larger DNS responses.
also, draft-ietf-dnsext-message-size-* plans to mandate EDNS0 support for DNS
clients that support IPv6 transport.
Diffstat (limited to 'lib/libc/net/res_init.c')
-rw-r--r-- | lib/libc/net/res_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index bba8cfaad16..c44539604a3 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_init.c,v 1.20 2000/11/10 15:33:04 provos Exp $ */ +/* $OpenBSD: res_init.c,v 1.21 2001/06/11 10:06:00 itojun Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -64,7 +64,7 @@ static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_init.c,v 1.20 2000/11/10 15:33:04 provos Exp $"; +static char rcsid[] = "$OpenBSD: res_init.c,v 1.21 2001/06/11 10:06:00 itojun Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -608,6 +608,8 @@ res_setoptions(options, source) #endif } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { _res.options |= RES_USE_INET6; + } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) { + _res.options |= RES_USE_EDNS0; } else { /* XXX - print a warning here? */ } |