From 351078d072afb06a58fb247f41087a628200291b Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 11 Dec 2007 18:37:14 +0100 Subject: [PATCH] Use 127.0.0.1 as nameserver if none can be found in /etc/resolv.conf. This agrees with bind's behaviour. --- src/reslib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/reslib.c b/src/reslib.c index dcc7450..fce6f05 100644 --- a/src/reslib.c +++ b/src/reslib.c @@ -149,7 +149,10 @@ int irc_res_init(void) { irc_nscount = 0; - return parse_resvconf(); + parse_resvconf(); + if (irc_nscount == 0) + add_nameserver("127.0.0.1"); + return 0; } /* parse_resvconf()