From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 3 12:20:02 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0645F16A41B for ; Mon, 3 Sep 2007 12:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BEF6513C469 for ; Mon, 3 Sep 2007 12:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l83CK1BQ085277 for ; Mon, 3 Sep 2007 12:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l83CK1Ef085276; Mon, 3 Sep 2007 12:20:01 GMT (envelope-from gnats) Resent-Date: Mon, 3 Sep 2007 12:20:01 GMT Resent-Message-Id: <200709031220.l83CK1Ef085276@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrey Sverdlichenko Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E38AB16A547 for ; Mon, 3 Sep 2007 12:19:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id CD98913C45B for ; Mon, 3 Sep 2007 12:19:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l83CJSx8042562 for ; Mon, 3 Sep 2007 12:19:28 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l83CJS27042561; Mon, 3 Sep 2007 12:19:28 GMT (envelope-from nobody) Message-Id: <200709031219.l83CJS27042561@www.freebsd.org> Date: Mon, 3 Sep 2007 12:19:28 GMT From: Andrey Sverdlichenko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/116048: Different anchor wildcards in pfctl and kernel X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2007 12:20:02 -0000 >Number: 116048 >Category: kern >Synopsis: Different anchor wildcards in pfctl and kernel >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 03 12:20:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Andrey Sverdlichenko >Release: 6.2-RELEASE >Organization: >Environment: FreeBSD bsd62.infosec.ru 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: pfctl expects :* as anchor wildcard. pf_ioctl.c expects /* as anchor windcard. As the result, anchor wildcards do not work at all. >How-To-Repeat: Create anchor foo with several sub-anchors and add "anchor foo:*" rule to main ruleset. No packets passed to sub-anchors. Also you have "syntax error" when trying "anchor foo/*" command. >Fix: ==== //sys/contrib/pf/net/pf_ioctl.c#3 - sys/contrib/pf/net/pf_ioctl.c ==== @@ -713,7 +713,7 @@ strlcat(path, name, sizeof(path)); } #ifdef __FreeBSD__ - if ((p = rindex(path, '/')) != NULL && !strcmp(p, "/*")) { + if ((p = rindex(path, ':')) != NULL && !strcmp(p, ":*")) { #else if ((p = strrchr(path, '/')) != NULL && !strcmp(p, "/*")) { #endif >Release-Note: >Audit-Trail: >Unformatted: