From owner-freebsd-ipfw@FreeBSD.ORG Sun Aug 31 18:52:14 2003 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 421D516A4BF; Sun, 31 Aug 2003 18:52:14 -0700 (PDT) Received: from gateway.posi.net (adsl-63-201-90-66.dsl.snfc21.pacbell.net [63.201.90.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C7B943F93; Sun, 31 Aug 2003 18:52:12 -0700 (PDT) (envelope-from kbyanc@posi.net) Received: from localhost (localhost [127.0.0.1]) by gateway.posi.net (8.12.6/8.12.8) with ESMTP id h811qAYl013788; Sun, 31 Aug 2003 18:52:11 -0700 (PDT) (envelope-from kbyanc@posi.net) Date: Sun, 31 Aug 2003 18:52:10 -0700 (PDT) From: Kelly Yancey To: Clemens Fischer In-Reply-To: Message-ID: <20030831184821.C13778-100000@gateway.posi.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-ipfw@FreeBSD.org cc: luigi@FreeBSD.org Subject: Re: hostnames resolving problem X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 01:52:14 -0000 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/