Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Aug 2003 18:52:10 -0700 (PDT)
From:      Kelly Yancey <kbyanc@posi.net>
To:        Clemens Fischer <ino-qc@spotteswoode.de.eu.org>
Cc:        luigi@FreeBSD.org
Subject:   Re: hostnames resolving problem
Message-ID:  <20030831184821.C13778-100000@gateway.posi.net>
In-Reply-To: <ekz3b5ob.fsf@ID-23066.news.dfncis.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 Aug 2003, Clemens Fischer wrote:

> * 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.
>

  No you don't, it just warns, not exits.  You'll get warnings telling you
that what you are doing is a Bad Idea, but you can send them to /dev/null if
you don't care.

  Kelly

--
Kelly Yancey -- kbyanc@{posi.net,FreeBSD.org}
FreeBSD, The Power To Serve: http://www.freebsd.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030831184821.C13778-100000>