mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-24 08:33:40 +01:00
Remove one-subnet restriction on 'detect' in the interfaces file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1171 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
d661412ea9
commit
c31cb73f8c
@ -779,12 +779,7 @@ find_broadcasts() {
|
|||||||
for interface in $all_interfaces; do
|
for interface in $all_interfaces; do
|
||||||
eval bcast=\$$(chain_base $interface)_broadcast
|
eval bcast=\$$(chain_base $interface)_broadcast
|
||||||
if [ "x$bcast" = "xdetect" ]; then
|
if [ "x$bcast" = "xdetect" ]; then
|
||||||
addr="$(ip -f inet addr show $interface 2> /dev/null)"
|
ip -f inet addr show $interface 2> /dev/null | grep 'inet.*brd' | sed 's/inet.*brd //; s/scope.*//;' | sort -u
|
||||||
if [ -n "$(echo "$addr" | grep 'inet.*brd ')" ]; then
|
|
||||||
addr="$(echo "$addr" | \
|
|
||||||
grep "inet " | sed 's/^.* inet.*brd //;s/scope.*//')"
|
|
||||||
echo $addr | cut -d' ' -f 1
|
|
||||||
fi
|
|
||||||
elif [ "x${bcast}" != "x-" ]; then
|
elif [ "x${bcast}" != "x-" ]; then
|
||||||
echo $(separate_list $bcast)
|
echo $(separate_list $bcast)
|
||||||
fi
|
fi
|
||||||
|
@ -37,8 +37,7 @@
|
|||||||
# will detect the broadcast address for you. If you
|
# will detect the broadcast address for you. If you
|
||||||
# select this option, the interface must be up before
|
# select this option, the interface must be up before
|
||||||
# the firewall is started, you must have iproute
|
# the firewall is started, you must have iproute
|
||||||
# installed and the interface must only be associated
|
# installed.
|
||||||
# with a single subnet.
|
|
||||||
#
|
#
|
||||||
# If you don't want to give a value for this column but
|
# If you don't want to give a value for this column but
|
||||||
# you want to enter a value in the OPTIONS column, enter
|
# you want to enter a value in the OPTIONS column, enter
|
||||||
|
Loading…
Reference in New Issue
Block a user