From owner-freebsd-current@FreeBSD.ORG Tue Mar 6 23:55:34 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1034816A411; Tue, 6 Mar 2007 23:55:34 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id 7897013C481; Tue, 6 Mar 2007 23:55:33 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 0DDFA1F5B7D; Tue, 6 Mar 2007 18:55:33 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Tue, 06 Mar 2007 18:55:33 -0500 X-Sasl-enc: ruMTpY9SYf84vGhb1wvRY7s8zBvEeNOxyWBLaRXLVkvD 1173225333 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 924F42878D; Tue, 6 Mar 2007 18:55:32 -0500 (EST) Message-ID: <45EDFF73.4070709@FreeBSD.org> Date: Tue, 06 Mar 2007 23:55:31 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <45EDFE78.4080702@FreeBSD.org> In-Reply-To: <45EDFE78.4080702@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Current , Joerg.Pulz@frm2.tum.de, Scott Ullrich Subject: Re: Compiling ISC DHCP Server on current - ascii2addr() errors X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 23:55:34 -0000 Bruce M. Simpson wrote: > > This patch should be good for all branches and should probably go > upstream. No, that's wrong. I am trying to do too many things at once and I just got in from a night out. See below. > > Regards, > BMS > ------------------------------------------------------------------------ > > --- dhcpd.c.orig Tue Mar 6 23:45:25 2007 > +++ dhcpd.c Tue Mar 6 23:46:28 2007 > @@ -379,7 +379,7 @@ > set_jail = argv [i]; > if (++i == argc) > usage (); > - if (ascii2addr (AF_INET, argv[i], &jail_ip_address) < 0) > + if (inet_pton (AF_INET, argv[i], &jail_ip_address) == NULL) > log_fatal ("invalid ip address: %s", argv[i]); > jail_ip_address = ntohl (jail_ip_address); > no_dhcpd_jail = 1; > @@ -478,7 +478,7 @@ > if (!no_dhcpd_jail && (s = getenv ("DHCPD_JAIL_HOSTNAME")) && > (s2 = getenv ("DHCPD_JAIL_IPADDRESS"))) { > set_jail = s; > - if (ascii2addr (AF_INET, s2, &jail_ip_address) < 0) > + if (inet_pton (AF_INET, s2, &jail_ip_address) == NULL) > log_fatal ("invalid ip address: %s", s2); > jail_ip_address = ntohl (jail_ip_address); > } >