From owner-freebsd-ports Sat Jun 27 04:20:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA01310 for freebsd-ports-outgoing; Sat, 27 Jun 1998 04:20:48 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA01215 for ; Sat, 27 Jun 1998 04:20:38 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id EAA20773; Sat, 27 Jun 1998 04:20:02 -0700 (PDT) Received: from odin.sat.t.u-tokyo.ac.jp (odin.sat.t.u-tokyo.ac.jp [133.11.156.40]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA29383 for ; Sat, 27 Jun 1998 04:17:34 -0700 (PDT) (envelope-from hideyuki@sat.t.u-tokyo.ac.jp) Received: by odin.sat.t.u-tokyo.ac.jp (8.8.8/8.7.3) id UAA24467; Sat, 27 Jun 1998 20:17:28 +0900 (JST) Message-Id: <199806271117.UAA24467@odin.sat.t.u-tokyo.ac.jp> Date: Sat, 27 Jun 1998 20:17:28 +0900 (JST) From: Hideyuki Suzuki Reply-To: hideyuki@sat.t.u-tokyo.ac.jp To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: takayuki@moon.trad.pfu.co.jp, hideyuki@sat.t.u-tokyo.ac.jp X-Send-Pr-Version: 3.2 Subject: ports/7088: wide-dhcp: resolv.conf generation problem Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7088 >Category: ports >Synopsis: wide-dhcp: resolv.conf generation problem >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jun 27 04:20:01 PDT 1998 >Last-Modified: >Originator: Hideyuki Suzuki >Organization: Univ. of Tokyo, Japan. >Release: FreeBSD 2.2.6-STABLE i386 >Environment: ports-current >Description: Though wide-dhcp port includes a patch to generate /etc/resolv.conf from information offered by DHCP server, both DNS server address and domain name have been required to generate resolv.conf. Since domain name is not essential, dhcp client should generate resolv.conf regardless of domain name. >How-To-Repeat: When the dhcp server does not offer domain name, see its wide-dhcp client does not generate /etc/resolv.conf in spite of -r option. >Fix: Apply the following patch. One file is modified. No file is added or removed. Index: wide-dhcp/patches/patch-ac =================================================================== RCS file: /pub/FreeBSD-CVS/ports/net/wide-dhcp/patches/patch-ac,v retrieving revision 1.6 diff -u -r1.6 patch-ac --- patch-ac 1998/05/02 15:14:41 1.6 +++ patch-ac 1998/06/27 10:34:29 @@ -1,5 +1,5 @@ --- client/dhcpc_subr.c.orig Thu Jul 3 05:19:01 1997 -+++ client/dhcpc_subr.c Wed Apr 22 01:10:00 1998 ++++ client/dhcpc_subr.c Sat Jun 27 19:30:56 1998 @@ -64,6 +64,12 @@ #ifdef __osf__ #include @@ -42,7 +42,7 @@ bzero(&so_dst, sizeof(struct sockaddr)); bzero(&so_mask, sizeof(struct sockaddr)); bzero(&so_gate, sizeof(struct sockaddr)); -@@ -1895,6 +1909,44 @@ +@@ -1895,6 +1909,45 @@ #endif @@ -60,13 +60,14 @@ + /* + * set resolv.conf + */ -+ if (param->dns_domain != NULL && param->dns_server != NULL) { ++ if (param->dns_server != NULL) { + if (param->dns_server->num && param->dns_server->addr != NULL) { + unlink(_PATH_RESCONF); + if ((fp = fopen(_PATH_RESCONF, "w")) == NULL) { + return; + } -+ fprintf(fp, "domain %s\n", param->dns_domain); ++ if (param->dns_domain != NULL) ++ fprintf(fp, "domain %s\n", param->dns_domain); + for (i = 0; i < param->dns_server->num; i++) { + fprintf(fp,"nameserver %s\n",inet_ntoa(param->dns_server->addr[i])); + } @@ -87,7 +88,7 @@ void make_decline(lsbuf, reqspecp) -@@ -2528,11 +2580,9 @@ +@@ -2528,11 +2581,9 @@ struct msghdr msg; struct iovec bufvec[1]; int bufsize = DFLTDHCPLEN; @@ -99,7 +100,7 @@ if (sockfd == -1) { struct sockaddr_in myaddr; -@@ -2556,7 +2606,7 @@ +@@ -2556,7 +2607,7 @@ return(-1); } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message