From owner-freebsd-bugs@freebsd.org Mon Mar 4 15:11:19 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AE23151488A for ; Mon, 4 Mar 2019 15:11:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B19AD6E69E for ; Mon, 4 Mar 2019 15:11:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 6B3AF1514889; Mon, 4 Mar 2019 15:11:18 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ECF41514888 for ; Mon, 4 Mar 2019 15:11:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF0F36E69C for ; Mon, 4 Mar 2019 15:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 09DA4DF80 for ; Mon, 4 Mar 2019 15:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x24FBGIL035155 for ; Mon, 4 Mar 2019 15:11:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x24FBGe0035147 for bugs@FreeBSD.org; Mon, 4 Mar 2019 15:11:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236221] pf: ruleset optimizaton doesn't create autotables for rules into anchors Date: Mon, 04 Mar 2019 15:11:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: a.krasotin@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 15:11:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236221 Bug ID: 236221 Summary: pf: ruleset optimizaton doesn't create autotables for rules into anchors Product: Base System Version: 12.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: conf Assignee: bugs@FreeBSD.org Reporter: a.krasotin@yahoo.com I found out PF's ruleset optimization spoils rule into anchor. It replaces = list of addresses with autotable but doesn't create this one, so rule doesn't wo= rk. I tested with the following configs: # uname -a FreeBSD test 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 # cat /etc/pf.conf table persist { 10.10.12.49 } table persist { 10.10.12.49/24 } nat on em0 from to any -> { 192.168.170.199 } anchor user_profiles in on { em1 } { anchor User2 from { block quick log from to {87.250.250.242, 74.125.131.94, 4.2.2.2, 8.8.8.8, 217.69.139.202, 81.19.82.10} } } # cat /etc/rc.conf hostname=3D"test" ifconfig_em0=3D"inet 192.168.170.199 netmask 255.255.255.0" defaultrouter=3D"192.168.170.254" ifconfig_em1=3D"inet 10.10.12.1 netmask 255.255.255.0" sshd_enable=3D"YES" dumpdev=3D"NO" zfs_enable=3D"YES" pf_enable=3D"YES" gateway_enable=3D"YES" You can see there is an autotable into the rule: # pfctl -a 'user_profiles/*' -sr anchor "User2" from to any { block drop log quick inet from to <__automatic_c789788_0> } But there isn't autotable at all: # pfctl -sTables NatFrom User2 --=20 You are receiving this mail because: You are the assignee for the bug.=