From owner-freebsd-current@FreeBSD.ORG Tue Mar 6 23:51:26 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 1D3BC16A402 for ; Tue, 6 Mar 2007 23:51:26 +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 E7B3613C4A5 for ; Tue, 6 Mar 2007 23:51:25 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 86B131F5D54; Tue, 6 Mar 2007 18:51:25 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by out1.internal (MEProxy); Tue, 06 Mar 2007 18:51:25 -0500 X-Sasl-enc: czqj79/Ket1MyYCYDDZrxJpkmnzb/mt/B8GN6nVkmE1W 1173225085 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 AD562448; Tue, 6 Mar 2007 18:51:24 -0500 (EST) Message-ID: <45EDFE78.4080702@FreeBSD.org> Date: Tue, 06 Mar 2007 23:51:20 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Scott Ullrich References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------060602060206020005070506" Cc: FreeBSD Current , Joerg.Pulz@frm2.tum.de 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:51:26 -0000 This is a multi-part message in MIME format. --------------060602060206020005070506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Scott Ullrich wrote: > > > Recently this function was renamed/moved(?) by bms. Terminated with extreme prejudice. We reached consensus on this over a year ago, just no one actually made it happen til now. > > Is there a solution or workaround to get DHCP compiling again? Try this. addr2ascii() is only special and magic if used for AF_LINK. inet_pton() is fine for this job. This patch should be good for all branches and should probably go upstream. Regards, BMS --------------060602060206020005070506 Content-Type: text/x-patch; name="dhcp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dhcp.patch" --- 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) < 0) 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) < 0) log_fatal ("invalid ip address: %s", s2); jail_ip_address = ntohl (jail_ip_address); } --------------060602060206020005070506--