diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-12-18 19:22:24 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-12-18 19:22:24 +0000 |
commit | 29c68cf4adf7870ca364a1d129dcece7945c0cbb (patch) | |
tree | 2f4a704bb37d78c095394044dbce7ebdc427ec5c /main/dnsmasq | |
parent | 3212792a0d66c68f455901f20c218dcde1dfaf24 (diff) | |
download | aports-29c68cf4adf7870ca364a1d129dcece7945c0cbb.tar.bz2 aports-29c68cf4adf7870ca364a1d129dcece7945c0cbb.tar.xz |
main/dnsmasq: listen to all BRIDGE_ADDRs
make sure dnsmasq listens to all addresses specified in BRIDGE_ADDR,
but not the ones in BRIDGE_ADDR_EXTRA. That way it is possible to have
another daemon listening to the extra address.
Also make sure we remove the addresses on service stop.
Diffstat (limited to 'main/dnsmasq')
-rw-r--r-- | main/dnsmasq/APKBUILD | 4 | ||||
-rw-r--r-- | main/dnsmasq/dnsmasq.initd | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/main/dnsmasq/APKBUILD b/main/dnsmasq/APKBUILD index 0488440a7d..cb61ea892a 100644 --- a/main/dnsmasq/APKBUILD +++ b/main/dnsmasq/APKBUILD @@ -15,7 +15,7 @@ # pkgname=dnsmasq pkgver=2.80 -pkgrel=2 +pkgrel=3 pkgdesc="A lightweight DNS, DHCP, RA, TFTP and PXE server" url="http://www.thekelleys.org.uk/dnsmasq/" arch="all" @@ -74,6 +74,6 @@ dnssec() { } sha512sums="da50030ac96617fbb7d54d5ef02d2ed1e14ec1ebe0df49bc23a1509381bc1644cf6fb95ff72ed15e0ad1e9bd6aa11ec6e4dcabec8ebb152da0d84f9a4408565b dnsmasq-2.80.tar.gz -5a75751ce7900fd8110108edf487c2497836b50eb2ab3823343609c66556457917afea330288730f3c5066a9467b4239a07bc6634b14f1254d98c6ee9eca0be4 dnsmasq.initd +a7d64a838d10f4f69e0f2178cf66f0b3725901696e30df9e8e3e09f2afd7c86e9d95af64d2b63ef66f18b8a637397b7015573938df9ad961e2b36c391c3ac579 dnsmasq.initd 9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8 dnsmasq.confd 01e9e235e667abda07675009fb1947547863e0bb0256393c5a415978e2a49c1007585c7f0b51e8decce79c05e6f2ced3f400b11343feaa4de9b2e524f74a1ee3 uncomment-conf-dir.patch" diff --git a/main/dnsmasq/dnsmasq.initd b/main/dnsmasq/dnsmasq.initd index 9af390f56b..c7e753fd4b 100644 --- a/main/dnsmasq/dnsmasq.initd +++ b/main/dnsmasq/dnsmasq.initd @@ -93,14 +93,23 @@ start_pre() { setup_firewall -I -A fi if yesno "$DNSMASQ_LISTEN_BRIDGE_ADDR"; then - command_args="$command_args --listen-address ${BRIDGE_ADDR}" + local addr + for addr in $BRIDGE_ADDR; do + command_args="$command_args --listen-address ${addr%/*}" + done fi command_args="$command_args --strict-order --bind-interfaces --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 + local addr + for addr in $BRIDGE_ADDR $BRIDGE_ADDR_EXTRA; do + case "$addr" in + */*) ip addr del $addr dev $BRIDGE;; + *) ip addr del $addr/${BRIDGE_NETMASK} dev $BRIDGE;; + esac + done ip link set dev $BRIDGE down if [ -z "$DISABLE_IPTABLES" ]; then setup_firewall -D -D |