-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pf.conf.5: additional quoting for ranges in lists #1516
base: main
Are you sure you want to change the base?
Conversation
I'm not sure I understand what is the desired result. Is it?:
As a side note, for new documentation purposes, we subscribe to the use of RFC 5737 addresses. |
Yes. Except that will give you a syntax error, because, as stated in the previous line of the manpage: Thanks for pointing me to the RFC I will update the PR accordingly. |
I think I understand now what you are trying to document: In order to overcome the limitation that macros don't get expanded inside quotes, when you have, for instance, a macro containing a range, and want it to expand to a list, you must define the macro quoted:
Or as you suggest, using a combination of single and double quotes, in order to avoid escaping the double quotes? ...interesting. |
Yes that's exactly it. |
When defining network address ranges in macros that will later be used as items in list macro, these ranges must be quoted with additiona simple quotes. For instance, the following does not work and is rejected as a syntax error: usr = "192.168.1.0/24" srv = "192.168.2.10 - 192.168.29" nat_ranges = "{" $usr $srv "}" Defining ranges as the following instead will work: usr = "'192.168.1.0/24'" srv = "'192.168.2.10 - 192.168.29'" MFC after: 3 days Reviewed by: Alexander Ziaee <[email protected]>
5a7b787
to
50c46d9
Compare
The current manpage has two PARAMETERS top-level sections, which can be confusing when searching or browsing documentation quickly. Since the parameters described in these two sections are actually applicable within the scope of the sections they follow (ETHERNET FILTERING and PACKET FILTERING respectively), I propose we move them to subsections. I also propose we reword the title of one of those subsections to facilitate quick searching or browsing. MFC after: 3 days Reviewed by: Alexander Ziaee <[email protected]>
1bfd1cf
to
c814f49
Compare
cc @kprovost |
When defining network address ranges in macros that will later be used as items in list macro, these ranges must be quoted with additiona simple quotes.
For instance, the following does not work and is rejected as a syntax error:
Defining ranges as the following instead will work:
@concussious I took the liberty to already name you as a reviewer based on our recent interaction on Discord, I hope that's fine. Please let me know.