hostnames resolving problem
Clemens Fischer
ino-qc at spotteswoode.de.eu.org
Sat Aug 30 07:07:06 PDT 2003
* Kelly Yancey:
> diff -u -p -r1.4.2.17 ipfw2.c
> --- ipfw2.c 25 Jul 2003 08:23:07 -0000 1.4.2.17
> +++ ipfw2.c 29 Aug 2003 19:14:33 -0000
> @@ -1879,6 +1879,10 @@ lookup_host (char *host, struct in_addr
> if ((he = gethostbyname(host)) == NULL)
> return(-1);
> *ipaddr = *(struct in_addr *)he->h_addr_list[0];
> + if (he->h_addr_list[1] != NULL) {
> + warn("%s resolved to multiple addresses, only using %s",
> + host, inet_ntoa(*ipaddr));
> + }
that would not be my cup of tea, because by this ipfw(8) becomes
"unscriptable", ie. i'd have to grep(1) for messages and start from
scratch again. i guess this problem should be detected and handled
ahead of running ipfw(8). note that you can always use `-p
preprocessor' for this.
clemens
More information about the freebsd-ipfw
mailing list