projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[package] fireall:
[openwrt.git]
/
package
/
firewall
/
files
/
lib
/
core_init.sh
diff --git
a/package/firewall/files/lib/core_init.sh
b/package/firewall/files/lib/core_init.sh
index
e1f80ba
..
c7e41e7
100644
(file)
--- a/
package/firewall/files/lib/core_init.sh
+++ b/
package/firewall/files/lib/core_init.sh
@@
-42,7
+42,7
@@
fw_load_defaults() {
boolean disable_ipv6 0 \
} || return
[ -n "$FW_DEFAULTS_APPLIED" ] && {
boolean disable_ipv6 0 \
} || return
[ -n "$FW_DEFAULTS_APPLIED" ] && {
-
echo "Error: multiple defaults sections detected
"
+
fw_log error "duplicate defaults section detected, skipping
"
return 1
}
FW_DEFAULTS_APPLIED=1
return 1
}
FW_DEFAULTS_APPLIED=1
@@
-159,7
+159,8
@@
fw_load_zone() {
fw_config_get_zone "$1"
list_contains FW_ZONES $zone_name && {
fw_config_get_zone "$1"
list_contains FW_ZONES $zone_name && {
- fw_die "zone ${zone_name}: duplicated zone"
+ fw_log error "zone ${zone_name}: duplicated zone, skipping"
+ return 0
}
append FW_ZONES $zone_name
}
append FW_ZONES $zone_name
@@
-244,9
+245,9
@@
fw_load_zone() {
if [ "$zone_masq" == 1 ]; then
local msrc mdst
for msrc in ${zone_masq_src:-0.0.0.0/0}; do
if [ "$zone_masq" == 1 ]; then
local msrc mdst
for msrc in ${zone_masq_src:-0.0.0.0/0}; do
-
[ "${msrc#!}" != "$msrc" ] && msrc="! -s ${msrc#!}" || msrc="-s
$msrc"
+
fw_get_negation msrc '-s' "
$msrc"
for mdst in ${zone_masq_dest:-0.0.0.0/0}; do
for mdst in ${zone_masq_dest:-0.0.0.0/0}; do
-
[ "${mdst#!}" != "$mdst" ] && mdst="! -d ${mdst#!}" || mdst="-d
$mdst"
+
fw_get_negation mdst '-d' "
$mdst"
fw add $mode n ${chain}_nat MASQUERADE $ { $msrc $mdst }
done
done
fw add $mode n ${chain}_nat MASQUERADE $ { $msrc $mdst }
done
done
This page took
0.019598 seconds
and
4
git commands to generate.