Re: Compiling ISC DHCP Server on current - ascii2addr() errors

From: Bruce M. Simpson <bms_at_FreeBSD.org>
Date: Tue, 06 Mar 2007 23:55:31 +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
> _at__at_ -379,7 +379,7 _at__at_
>  			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;
> _at__at_ -478,7 +478,7 _at__at_
>  	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);
>  	}
>   
Received on Tue Mar 06 2007 - 22:55:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:06 UTC