Date: Mon, 3 Sep 2007 12:19:28 GMT From: Andrey Sverdlichenko <blaze@ruddy.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/116048: Different anchor wildcards in pfctl and kernel Message-ID: <200709031219.l83CJS27042561@www.freebsd.org> Resent-Message-ID: <200709031220.l83CK1Ef085276@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709031219.l83CJS27042561>
