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

[ Available lists | Index of freebsd-current | Month of Mar 2007 | Week of 6 Mar 2007 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Bruce M. Simpson <bms@FreeBSD.org>
Date
6 Mar 2007 23:57:23
Subject
Re: Compiling ISC DHCP Server on current - ascii2addr() errors
Message-ID
45EDFFE0.4020203@FreeBSD.org

In reply to

[ Hide this part ]
Bruce M. Simpson wrote:
> No, that's wrong. I am trying to do too many things at once and I just
> got in from a night out.
>
I will re-read patches before sending them.
I will re-read patches before sending them.
I will re-read patches before sending them.
I will re-read patches before sending them.
I will change my name to Bart by deed-poll.
> 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) != 1)
>> 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) != 1)
>> log_fatal ("invalid ip address: %s", s2);
>> jail_ip_address = ntohl (jail_ip_address);
>> }
>>
>



Elapsed time: 0.101 seconds