From owner-freebsd-stable@FreeBSD.ORG Tue Nov 19 21:22:37 2013 Return-Path: Delivered-To: freebsd-stable@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 1B9FC7EF for ; Tue, 19 Nov 2013 21:22:37 +0000 (UTC) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2D12D82 for ; Tue, 19 Nov 2013 21:22:36 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id p61so3683008wes.34 for ; Tue, 19 Nov 2013 13:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=2kjl/amhFYlQPly6rjTBi+yH7VzK2YXWV/8wlolnDps=; b=avLLy4JqzuBusnnI8ciKEP2yZpnrLYhYmNCD91VhMsnVIHtr+2Ki5yfj2Dvo1t3MLj IdMJgJcWeFnWKc4Sq58JSk9XoVxHXgH8+GpSLaGeCie8TiHvT7L1qlxsG0/M7SWxlWET gnMb8MFrCHgmd7679htV3TrN+z8PqMN9TlN7U75EU8eEqRBmW4IsagWJFftnrkTkyv6L 4NwSsnygYSvLY+4WdXyQIibX66TQzILsky1apInEClfS+jAEXBgVL1aS8Lfs9iKkt7fd eRsPQ6BByn/rpnbYZ+3PTfrem2IBoaXZ9ADFFRhjLj9EAQ7o/e30RE9pqNzNr7zfJKSE 8KXA== MIME-Version: 1.0 X-Received: by 10.194.48.115 with SMTP id k19mt3512535wjn.47.1384896155031; Tue, 19 Nov 2013 13:22:35 -0800 (PST) Received: by 10.216.91.144 with HTTP; Tue, 19 Nov 2013 13:22:34 -0800 (PST) In-Reply-To: References: Date: Tue, 19 Nov 2013 23:22:34 +0200 Message-ID: Subject: Re: ipfw table add problem From: =?ISO-8859-1?Q?=D6zkan_KIRIK?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: freebsd-ipfw , freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2013 21:22:37 -0000 "ipfw table 1 add 4899" command works, on FreeBSD 8.2 and 8.4. I am using port lookup tables on FreeBSD 8.4. For example : "ipfw add allow all from any to any lookup src-port 1" Lookup section from the MAN page of ipfw : lookup {dst-ip | dst-port | src-ip | src-port | uid | jail} N Search an entry in lookup table N that matches the field speci- fied as argument. If not found, the match fails. Otherwise, the match succeeds and tablearg is set to the value extracted from the table. On Tue, Nov 19, 2013 at 10:36 PM, =D6zkan KIRIK wro= te: > Hi, > > > > On Tue, Nov 19, 2013 at 10:22 PM, Andreas Nilsson wro= te: > >> >> >> >> On Tue, Nov 19, 2013 at 8:55 PM, =D6zkan KIRIK wr= ote: >> >>> 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 >>> >> Works with ipfw table 1 add 0 4899 >> > No, i want to use this table as port list ( to use with "lookup src-port > 1" ) . If you add like this, you cannot match against ports. Am I wrong? > > >> >>> #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 >>> >> Did you mean ipfw table 1 add 10.2.3.0 1 ? That works for me. >> > Please dont leave spaces between 0 and 1. > > >> >>> #ipfw table 1 delete ::/0 >>> ipfw: setsockopt(IP_FW_TABLE_XDEL): No such process >>> >> However ipfw table 1 delete 0.0.0.0/0 does. >> > Thank you > >> >>> >>> I guess that, this problem is related to radix mask calculation >>> problem/fix. >>> >>> Is there a quick solution for this. >>> Best, regards, >> >> >> Best regards >> Andreas >> > > Best regards, > Ozkan. > >