Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Feb 2006 18:12:46 +0000
From:      Ceri Davies <ceri@submonkey.net>
To:        Xin LI <delphij@FreeBSD.org>, src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/sysinstall tcpip.c
Message-ID:  <20060206181246.GK21499@submonkey.net>
In-Reply-To: <20060206162626.GJ21499@submonkey.net>
References:  <200602060649.k166nvJL015878@repoman.freebsd.org> <20060206162626.GJ21499@submonkey.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Mon, Feb 06, 2006 at 04:26:26PM +0000, Ceri Davies wrote:
> On Mon, Feb 06, 2006 at 06:49:57AM +0000, Xin LI wrote:
> > delphij     2006-02-06 06:49:57 UTC
> > 
> >   FreeBSD src repository
> > 
> >   Modified files:
> >     usr.sbin/sysinstall  tcpip.c 
> >   Log:
> >   Attempt to fix DHCP address acquisition which was broken by rev. 1.133.
> 
> > | @@ -596,9 +596,12 @@ netconfig:
> > |  	    ipv4_enable = TRUE;
> > |  	if (ipv4_enable) {
> > |  	    sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
> > | -	    if (use_dhcp)
> > | -		sprintf(temp, "DHCP %s", extras);
> > | -	    else
> > | +	    if (use_dhcp) {
> > | +		if (strlen(extras) > 0)
> > | +		    sprintf(temp, "DHCP %s", extras);
> > | +		else
> > | +		    sprintf(temp, "DHCP");
> > | +	    } else
> > |  		sprintf(temp, "inet %s %s netmask %s",
> > |  			ipaddr, extras, netmask);
> > |  	    variable_set2(ifn, temp, 1);
> 
> Can you explain the failure mode?
> network.subr doesn't deal with trailing spaces or something?

Not to worry; I see it now.  I suspect that using strstr or the like at
line 129 of network.c would be a little more resilient though.

Ceri
-- 
That must be wonderful!  I don't understand it at all.
                                                  -- Moliere

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD55GeocfcwTS3JF8RAucwAKC75IrOr3jDndnvyW61FegrozH4EgCaA060
oxjvZ1s+NsfoaqQX0A0kCDQ=
=LkWF
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060206181246.GK21499>