Date: Sat, 15 Nov 1997 11:19:53 -0800 From: Pavlin Ivanov Radoslavov <pavlin@catarina.usc.edu> To: FreeBSD-gnats@freebsd.org, freebsd-bugs@freebsd.org Cc: pavlin@catarina.usc.edu Subject: Re: bin/5047: ipfw(8) IP address resolving problem if only /etc/hosts used Message-ID: <199711151919.LAA04969@catarina.usc.edu> In-Reply-To: Your message of "Fri, 14 Nov 1997 20:30:01 PST." <199711150430.UAA28818@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Thank you very much for your problem report. > It has the internal identification `bin/5047'. > The individual assigned to look at your > report is: freebsd-bugs. > > >Category: bin > >Responsible: freebsd-bugs > >Synopsis: ipfw(8) IP address resolving problem if only /etc/hosts used > >Arrival-Date: Fri Nov 14 20:30:00 PST 1997 Below is a better fix of the problem. It allows any IP address to be given as an input instead of allowing only the addresses that can be resolved: --- ipfw.c Wed Mar 5 04:30:08 1997 +++ ipfw-new.c Sat Nov 15 11:10:58 1997 @@ -386,8 +386,16 @@ { struct hostent *he = gethostbyname(host); - if (!he) - return(-1); + if (!he) { + struct in_addr ia; + + if (!inet_aton(host, &ia)) + return(-1); + else { + *ipaddr = ia; + return(0); + } + } *ipaddr = *(struct in_addr *)he->h_addr_list[0];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711151919.LAA04969>