fix _cleanup() didn't judge NO_DNSMASQ

This commit is contained in:
garywill 2018-08-31 18:41:06 +08:00 committed by garywill
parent f31006f401
commit 90dc5fdd8d
1 changed files with 4 additions and 1 deletions

View File

@ -688,7 +688,10 @@ _cleanup() {
iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
-p udp -m udp --dport 53 -j REDIRECT --to-ports $DNS_PORT
fi
iptables -w -D INPUT -i ${SUBNET_IFACE} -p udp -m udp --dport 67 -j ACCEPT
if [[ $NO_DNSMASQ -eq 0 ]]; then
iptables -w -D INPUT -i ${SUBNET_IFACE} -p udp -m udp --dport 67 -j ACCEPT
fi
ip link set down dev ${AP_IFACE}
ip addr flush ${AP_IFACE}