[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#85397: need to call res_init



Howdy,

According to the manpage for resolv.conf, it is read only once
when the program is invoked:

	The resolver configuration file contains information that
	is read by the resolver routines the first time they are
	invoked by a process.

Since the base system is retrieved within dbootstrap, if the
nameserver file is incorrect the first time it is read it will
never be reloaded, even if the network information is
reconfigured.

I tested that calling res_init(3) after changing the resolv.conf
file will cause it to be reloaded, so I believe that the following
patch will fix this bug.

Matt

Index: utilities/dbootstrap/netconfig.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/netconfig.c,v
retrieving revision 1.49
diff -u -r1.49 netconfig.c
--- utilities/dbootstrap/netconfig.c	2000/10/01 18:30:26	1.49
+++ utilities/dbootstrap/netconfig.c	2001/04/08 16:16:11
@@ -17,6 +17,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h> 
+#include <resolv.h>
 #include "dbootstrap.h"
 #include "lang.h"
 #include "util.h"
@@ -893,6 +894,7 @@
   } else {
     ret = configure_static_network();
   }
+  res_init();
   return ret;
 }
 

Attachment: pgpG5bvJjJqx1.pgp
Description: PGP signature


Reply to: