From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: iptables 1.3.6 not using /etc/networks Date: Mon, 20 Nov 2006 01:00:44 +0100 Message-ID: <4560F02C.4040905@netfilter.org> References: <20061112173312.GA2593@linuxace.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Phil Oester , netfilter-devel@lists.netfilter.org Return-path: To: "Laurence J. Lane" In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Laurence J. Lane wrote: > On 11/12/06, Phil Oester wrote: > >> Not sure offhand how we can satisfy both cases here, but I'd posit >> that more people use x.x.x/24 than use foonet/x notation. > > I have another bug report saying it breaks stuff from /etc/hosts too. > > How about something like this? I assume valid IP characters are in the > range of 0-9 and a dot. This will skip pad_cidr() if any characters > outside of that range are encountered. Plain bad IP addresses are > apparently validated elsewhere. Of course, I could be wrong about all > of this. Apparently /etc/host accepts entries composed of dots, e.g. foo.machine 192.168.100.100 So this assumption can be OK as soon as nobody is using such notation. -- The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris