FreeBSD Bugzilla – Attachment 216737 Details for
Bug 248088
ipfilter variable substitution in rules & nat file not documented
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
rc.d patch to export environment to ipf and ipnat
ipf-rc.diff (text/plain), 2.08 KB, created by
Cy Schubert
on 2020-07-24 05:33:10 UTC
(
hide
)
Description:
rc.d patch to export environment to ipf and ipnat
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2020-07-24 05:33:10 UTC
Size:
2.08 KB
patch
obsolete
>diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter >index 6a430b55d89..90dbfdc1d90 100755 >--- a/libexec/rc/rc.d/ipfilter >+++ b/libexec/rc/rc.d/ipfilter >@@ -35,12 +35,14 @@ ipfilter_start() > fi > ${ipfilter_program:-/sbin/ipf} -Fa > if [ -r "${ipfilter_rules}" ]; then >- ${ipfilter_program:-/sbin/ipf} \ >- -f "${ipfilter_rules}" ${ipfilter_flags} >+ ${ipf_predefined:+env IPF_PREDEFINED="$ipf_predefined"} \ >+ ${ipfilter_program:-/sbin/ipf} \ >+ -f "${ipfilter_rules}" ${ipfilter_flags} > fi > if [ -r "${ipv6_ipfilter_rules}" ]; then >- ${ipfilter_program:-/sbin/ipf} -6 \ >- -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} >+ ${ipf_predefined:+env IPF_PREDEFINED="$ipf_predefined"} \ >+ ${ipfilter_program:-/sbin/ipf} -6 \ >+ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} > fi > } > >@@ -60,15 +62,17 @@ ipfilter_reload() > > ${ipfilter_program:-/sbin/ipf} -I -Fa > if [ -r "${ipfilter_rules}" ]; then >- ${ipfilter_program:-/sbin/ipf} -I \ >- -f "${ipfilter_rules}" ${ipfilter_flags} >+ ${ipf_predefined:+env IPF_PREDEFINED="$ipf_predefined"} \ >+ ${ipfilter_program:-/sbin/ipf} -I \ >+ -f "${ipfilter_rules}" ${ipfilter_flags} > if [ $? -ne 0 ]; then > err 1 'Load of rules into alternate set failed; aborting reload' > fi > fi > if [ -r "${ipv6_ipfilter_rules}" ]; then >- ${ipfilter_program:-/sbin/ipf} -I -6 \ >- -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} >+ ${ipf_predefined:+env IPF_PREDEFINED="$ipf_predefined"} \ >+ ${ipfilter_program:-/sbin/ipf} -I -6 \ >+ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} > if [ $? -ne 0 ]; then > err 1 'Load of IPv6 rules into alternate set failed; aborting reload' > fi >diff --git a/libexec/rc/rc.d/ipnat b/libexec/rc/rc.d/ipnat >index bff94154dc6..4a530814069 100755 >--- a/libexec/rc/rc.d/ipnat >+++ b/libexec/rc/rc.d/ipnat >@@ -23,7 +23,8 @@ required_modules="ipl:ipfilter" > ipnat_start() > { > echo "Installing NAT rules." >- ${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags} >+ ${ipnat_predefined:+env IPNAT_PREDEFINED="$ipnat_predefined"} \ >+ ${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags} > } > > run_rc_command "$1"
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 248088
:
216714
| 216737