Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Allow 'gateway' to be listed as one DNS server, among several
Browse files Browse the repository at this point in the history
  • Loading branch information
dlenski committed May 21, 2021
1 parent 04d4c7c commit 1210770
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions create_ap
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ usage() {
echo " back to managed"
echo " --mac <MAC> Set MAC address"
echo " --dhcp-dns <IP1[,IP2]> Set DNS returned by DHCP (default is gateway; see also --no-dns below)"
echo " Multiple servers may be specified (example: 'gateway,8.8.8.8')"
echo " --dhcp-dns6 <IP1[,IP2]> Set DNSv6 returned by DHCP (default is gateway; see also --no-dns below)"
echo " Multiple servers may be specified (example: 'gateway,2001:4860:4860::8888')"
echo " --daemon Run create_ap in the background"
echo " --pidfile <pidfile> Save daemon PID to file"
echo " --logfile <logfile> Save daemon messages to file"
Expand Down Expand Up @@ -1808,12 +1810,8 @@ elif [[ $NO_DNSMASQ -eq 0 ]]; then
else
DNSMASQ_BIND=bind-dynamic
fi
if [[ "$DHCP_DNS" == "gateway" ]]; then
DHCP_DNS="$GATEWAY"
fi
if [[ "$DHCP_DNS6" == "gateway" ]]; then
DHCP_DNS6="[$GATEWAY6]"
fi
DHCP_DNS="${DHCP_DNS/gateway/$GATEWAY}"
DHCP_DNS6="${DHCP_DNS6/gateway/[$GATEWAY6]}"
cat << EOF > $CONFDIR/dnsmasq.conf
interface=${WIFI_IFACE}
${DNSMASQ_BIND}
Expand Down
4 changes: 2 additions & 2 deletions create_ap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ DTIM_INTERVAL=2
########## Network Options ##########

# DNS servers to be pushed by DHCP server; separate multiple with ,
# Set to "gateway" to use the gateway itself
# Include "gateway" to use the gateway itself
DHCP_DNS=gateway
# IPv6 DNS servers to be pushed by DHCP server; enclose IPv6
# addresses in [], and separate multiple with ,
# Set to "gateway" to use the gateway itself
# Include "gateway" to use the gateway itself
DHCP_DNS6=
# Set to 1 to disable DNS
NO_DNS=0
Expand Down

0 comments on commit 1210770

Please sign in to comment.