diff options
Diffstat (limited to 'main/dnsmasq/dnsmasq.initd')
-rw-r--r-- | main/dnsmasq/dnsmasq.initd | 9 |
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 |