FreeBSD Bugzilla – Attachment 232549 Details for
Bug 262590
[pf][patch] Anchor "blacklistd/*" not correctly shown in pfctl -a \* -s rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that fixes the issue for me
pfctl.c.diff (text/plain), 758 bytes, created by
Matteo Riondato
on 2022-03-18 12:08:23 UTC
(
hide
)
Description:
Patch that fixes the issue for me
Filename:
MIME Type:
Creator:
Matteo Riondato
Created:
2022-03-18 12:08:23 UTC
Size:
758 bytes
patch
obsolete
>diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c >index 88a96bd303..0dbec464c3 100644 >--- a/sbin/pfctl/pfctl.c >+++ b/sbin/pfctl/pfctl.c >@@ -1247,14 +1247,12 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, > ((void *)p == (void *)anchor_call || > *(--p) == '/')) || (opts & PF_OPT_RECURSE))) { > brace++; >- if ((p = strrchr(anchor_call, '/')) != >- NULL) >- p++; >- else >- p = &anchor_call[0]; >- } else >- p = &anchor_call[0]; >- >+ int aclen = strlen(anchor_call); >+ if (anchor_call[aclen - 1] == '*') >+ anchor_call[aclen - 2] = '\0'; >+ } >+ p = &anchor_call[0]; >+ /* printf("p: %s\n", p); */ > print_rule(&rule, p, rule_numbers, numeric); > if (brace) > printf(" {\n");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262590
: 232549