From owner-freebsd-ipfw@FreeBSD.ORG Sun Nov 24 19:56:51 2013 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96370D7A; Sun, 24 Nov 2013 19:56:51 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 573412259; Sun, 24 Nov 2013 19:56:51 +0000 (UTC) Received: from secured.by.ipfw.ru ([95.143.220.47] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Vkbzc-0005cS-6U; Sun, 24 Nov 2013 19:53:04 +0400 Message-ID: <529259DE.2040701@FreeBSD.org> Date: Sun, 24 Nov 2013 23:56:14 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130728 Thunderbird/17.0.7 MIME-Version: 1.0 To: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Subject: Re: ipfw table add problem References: <52911993.8010108@ipfw.ru> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2JKWEJWRTHEUCKVBDGILP" Cc: freebsd-ipfw , freebsd-stable , Luigi Rizzo X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 19:56:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2JKWEJWRTHEUCKVBDGILP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 24.11.2013 19:43, =C3=96zkan KIRIK wrote: > Hi, >=20 > I tested patch. This patch solves, ipfw table 1 add 4899 Ok. So I'll commit this fix soon. >=20 > But, ipfw table 1 add 10.2.3.01 works incorrectly. > output is below. > # ./ipfw table 1 flush > # ./ipfw table 1 add 10.2.3.01 inet_pton() does not recognize this as valid IPv4 address, so it is treated as usigned unteger key. It looks like this behavior is mentioned in STANDARDS section. > # ./ipfw table 1 list > 0.0.0.10/32 0 >=20 >=20 >=20 >=20 > On Sat, Nov 23, 2013 at 11:09 PM, Alexander V. Chernikov > wrote: >=20 > On 19.11.2013 23:55, =EF=BF=96zkan KIRIK wrote: >>>> Hi, >>>> >>>> I'm using kernel FreeBSD 10.0-BETA3 #2 r257635 kernel. I am trying >>>> to add port number to ipfw tables. But there is something strange >>>> : Problem is easily repeatable. >>>> >>>> #ipfw table 1 flush #ipfw table 1 add 4899 #ipfw table 1 list ::/0 >>>> 0 >>>> >>>> #ipfw table 1 flush #ipfw table 1 add 10.2.3.01 ( not >>>> 10.0.0.1, the last 1 has 0 as prefix ) #ipfw table 1 list ::/0 0 >>>> >>>> #ipfw table 1 delete ::/0 ipfw: setsockopt(IP_FW_TABLE_XDEL): No >>>> such process >>>> >>>> >>>> I guess that, this problem is related to radix mask calculation >>>> problem/fix. > Hello. > I'm sorry, it seems that key lookups were broken for quite a long time.= >=20 > Can you apply attached patch, rebuild ipfw(8) binary and see if this > helps? >=20 >=20 >>>> >>>> Is there a quick solution for this. Best, regards, >>>> _______________________________________________ >>>> freebsd-ipfw@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To >>>> unsubscribe, send any mail to >>>> "freebsd-ipfw-unsubscribe@freebsd.org" >>>> >=20 >> > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org"= >=20 ------enig2JKWEJWRTHEUCKVBDGILP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKSWeMACgkQwcJ4iSZ1q2njZACfdD3Slr+nei3etHXm83sRilmD 2hoAoICRbULOBCyJMBFXqMW6but3XSS4 =FFua -----END PGP SIGNATURE----- ------enig2JKWEJWRTHEUCKVBDGILP--