kern/116048: Different anchor wildcards in pfctl and kernel

Andrey Sverdlichenko blaze at ruddy.ru
Mon Sep 3 05:20:02 PDT 2007


>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 at 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:


More information about the freebsd-bugs mailing list