From owner-freebsd-stable@FreeBSD.ORG Mon Nov 14 17:44:36 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A05C16A41F for ; Mon, 14 Nov 2005 17:44:36 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74BEA43D6A for ; Mon, 14 Nov 2005 17:44:34 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jAEHiXa1009335; Mon, 14 Nov 2005 09:44:33 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jAEHiX4c009334; Mon, 14 Nov 2005 09:44:33 -0800 Date: Mon, 14 Nov 2005 09:44:33 -0800 From: Brooks Davis To: Mark Space Message-ID: <20051114174433.GB1928@odin.ac.hmc.edu> References: <437800F8.5020808@sbcglobal.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="61jdw2sOBCFtR2d/" Content-Disposition: inline In-Reply-To: <437800F8.5020808@sbcglobal.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-stable@freebsd.org Subject: Re: DHCP client error: domain_not_set.invalid X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2005 17:44:36 -0000 --61jdw2sOBCFtR2d/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 13, 2005 at 07:14:00PM -0800, Mark Space wrote: > Hi all, >=20 > I just set up the latest 6.0 release, and I'm getting errors with the=20 > DHCP client. Trying to pull a network address during start up, I get: >=20 > Bogus domain search list 15: domain_not_set.invalid >=20 > This repeats several times before giving up. Google tells me that this= =20 > problem was report by two users on the bsd-current list. No one ever=20 > replied to their inquiries (at least on the list), so I thought to try=20 > once more to see if there's any interest in addressing this issue.=20 >=20 > More info was in the original post: > http://lists.freebsd.org/pipermail/freebsd-current/2005-October/057034.ht= ml We should really bitch and then ignore this value when it's bogus rather than rejecting the lease. We should also probably allow underscores since they are popular among clueless Microsoft admins. Please try the follow patch. -- Brooks Index: dhclient.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sbin/dhclient/dhclient.c,v retrieving revision 1.11 diff -u -p -r1.11 dhclient.c --- dhclient.c 2 Sep 2005 17:35:35 -0000 1.11 +++ dhclient.c 14 Nov 2005 17:42:46 -0000 @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD: src/sbin/dhclient/dh =20 #define PERIOD 0x2e #define hyphenchar(c) ((c) =3D=3D 0x2d) +#define underscorechar(c) ((c) =3D=3D 0x5f) #define bslashchar(c) ((c) =3D=3D 0x5c) #define periodchar(c) ((c) =3D=3D PERIOD) #define asterchar(c) ((c) =3D=3D 0x2a) @@ -76,7 +77,7 @@ __FBSDID("$FreeBSD: src/sbin/dhclient/dh #define whitechar(c) ((c) =3D=3D ' ' || (c) =3D=3D '\t') =20 #define borderchar(c) (alphachar(c) || digitchar(c)) -#define middlechar(c) (borderchar(c) || hyphenchar(c)) +#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) =20 #define CLIENT_PATH "PATH=3D/usr/bin:/usr/sbin:/bin:/sbin" @@ -2252,6 +2253,8 @@ check_option(struct client_lease *l, int if (!res_hnok(sbuf)) { warning("Bogus Host Name option %d: %s (%s)", option, sbuf, opbuf); + l->options[option].len =3D 0; + free(l->options[option].data); return (0); } return (1); @@ -2260,7 +2263,8 @@ check_option(struct client_lease *l, int if (!check_search(sbuf)) { warning("Bogus domain search list %d: %s (%s)", option, sbuf, opbuf); - return (0); + l->options[option].len =3D 0; + free(l->options[option].data); } } return (1); --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --61jdw2sOBCFtR2d/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDeM0BXY6L6fI4GtQRArSWAJ9UFHTRTCW312TZ9bSJJuele9pqxQCeLi4j 6bBs4MYIeZrWFpW/K36N+XI= =08ZK -----END PGP SIGNATURE----- --61jdw2sOBCFtR2d/--