aboutsummaryrefslogtreecommitdiffstats
path: root/main/dnsmasq/dnsmasq.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-10-25 14:25:00 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2017-10-25 14:25:00 +0200
commitcedb54387820205e980d3a6155009762fc7c5ce4 (patch)
tree2bfa15f676713a657e08befe40efda27ecb92c5f /main/dnsmasq/dnsmasq.initd
parent5804348e91d7037ee5e54a4f1cdc882651a8ccd8 (diff)
downloadaports-cedb54387820205e980d3a6155009762fc7c5ce4.tar.bz2
aports-cedb54387820205e980d3a6155009762fc7c5ce4.tar.xz
main/dnsmasq: allow disable iptables and fix bridge
Diffstat (limited to 'main/dnsmasq/dnsmasq.initd')
-rw-r--r--main/dnsmasq/dnsmasq.initd9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/dnsmasq/dnsmasq.initd b/main/dnsmasq/dnsmasq.initd
index f5114fb806..a16c206a8f 100644
--- a/main/dnsmasq/dnsmasq.initd
+++ b/main/dnsmasq/dnsmasq.initd
@@ -83,14 +83,19 @@ start_pre() {
fi
setup_bridge
- setup_firewall -I -A
+ if [ -z "$DISABLE_IPTABLES" ]; then
+ setup_firewall -I -A
+ fi
command_args="$command_args --strict-order --bind-interfaces --listen-address ${BRIDGE_ADDR} --except-interface=lo --interface=$BRIDGE --dhcp-range $BRIDGE_DHCP_RANGE --dhcp-lease-max=$BRIDGE_DHCP_MAX --dhcp-no-override --dhcp-leasefile=$leasefile --dhcp-authoritative"
}
stop_post() {
if [ -n "$BRIDGE" ]; then
+ ip addr del ${BRIDGE_ADDR}/${BRIDGE_NETMASK} dev $BRIDGE
ip link set dev $BRIDGE down
- setup_firewall -D -D
+ if [ -z "$DISABLE_IPTABLES" ]; then
+ setup_firewall -D -D
+ fi
# dont destroy if there are attached interfaces
ls /sys/class/net/${BRIDGE}/brif/* > /dev/null 2>&1 || ip link delete ${BRIDGE}
fi