FreeBSD Bugzilla – Attachment 148278 Details for
Bug 194292
Patch for adding firewall_myservices_tcp and firewall_myservices_udp support to rc.conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch to support both protocols in one variable
rc_myservices.diff (text/plain), 1.23 KB, created by
Hiroki Sato
on 2014-10-13 19:34:05 UTC
(
hide
)
Description:
Updated patch to support both protocols in one variable
Filename:
MIME Type:
Creator:
Hiroki Sato
Created:
2014-10-13 19:34:05 UTC
Size:
1.23 KB
patch
obsolete
>Index: etc/rc.firewall >=================================================================== >--- etc/rc.firewall (revision 272887) >+++ etc/rc.firewall (working copy) >@@ -422,7 +422,7 @@ > > [Ww][Oo][Rr][Kk][Ss][Tt][Aa][Tt][Ii][Oo][Nn]) > # Configuration: >- # firewall_myservices: List of TCP ports on which this host >+ # firewall_myservices: List of ports on which this host > # offers services. > # firewall_allowservices: List of IPv4 and/or IPv6 addresses > # that have access to >@@ -487,7 +487,24 @@ > # > for i in ${firewall_allowservices} ; do > for j in ${firewall_myservices} ; do >- ${fwcmd} add pass tcp from $i to me $j >+ case $j in >+ [0-9A-Za-z]*/[Pp][Rr][Oo][Tt][Oo]) >+ ${fwcmd} add pass ${j%/[Pp][Rr][Oo][Tt][Oo]} from $i to me >+ ;; >+ [0-9A-Za-z]*/[Tt][Cc][Pp]) >+ ${fwcmd} add pass tcp from $i to me ${j%/[Tt][Cc][Pp]} >+ ;; >+ [0-9A-Za-z]*/[Uu][Dd][Pp]) >+ ${fwcmd} add pass udp from $i to me ${j%/[Uu][Dd][Pp]} >+ ;; >+ *[0-9A-Za-z]) >+ echo "Consider using tcp/$j in firewall_myservices." > /dev/stderr >+ ${fwcmd} add pass udp from $i to me $j >+ ;; >+ *) >+ echo "Invalid port in firewall_myservices: $j" > /dev/stderr >+ ;; >+ esac > done > done >
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 194292
:
148177
|
148185
|
148266
|
148267
| 148278