aboutsummaryrefslogtreecommitdiffstats
path: root/main/dnsmasq
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-12-18 08:57:15 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2018-12-18 09:02:15 +0100
commit7acc467c57a09ae004c8b6c57de3b8925766df2b (patch)
treec746de625c3a075e5b87b93d1df8f130be9ca47e /main/dnsmasq
parentbf34a99ea3ac407e584b67d6a2c18651263d6101 (diff)
downloadaports-7acc467c57a09ae004c8b6c57de3b8925766df2b.tar.bz2
aports-7acc467c57a09ae004c8b6c57de3b8925766df2b.tar.xz
main/dnsmasq: fix netmask for multi addr support
We already support multiple addresses for the bridge device, but they would all use the BRIDGE_NETMASK. Fix so you can either specify the netmask with the address or fallback to BRIDGE_NETMASK. For example: BRIDGE_ADDR="192.168.0.1 10.0.0.1/16" BRIDGE_NETMASK="255.255.255.0"
Diffstat (limited to 'main/dnsmasq')
-rw-r--r--main/dnsmasq/APKBUILD4
-rw-r--r--main/dnsmasq/dnsmasq.initd5
2 files changed, 6 insertions, 3 deletions
diff --git a/main/dnsmasq/APKBUILD b/main/dnsmasq/APKBUILD
index aac3e2fc23..0488440a7d 100644
--- a/main/dnsmasq/APKBUILD
+++ b/main/dnsmasq/APKBUILD
@@ -15,7 +15,7 @@
#
pkgname=dnsmasq
pkgver=2.80
-pkgrel=1
+pkgrel=2
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
-dd283b280d74ae17cc6b68f3074c3fbad1f6ddddf7f56658b4324d14d7d91cb8b370fa3a307cec0e17de6e6d627af08d265422b10159942a5d15dc17e827f3b4 dnsmasq.initd
+5a75751ce7900fd8110108edf487c2497836b50eb2ab3823343609c66556457917afea330288730f3c5066a9467b4239a07bc6634b14f1254d98c6ee9eca0be4 dnsmasq.initd
9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8 dnsmasq.confd
01e9e235e667abda07675009fb1947547863e0bb0256393c5a415978e2a49c1007585c7f0b51e8decce79c05e6f2ced3f400b11343feaa4de9b2e524f74a1ee3 uncomment-conf-dir.patch"
diff --git a/main/dnsmasq/dnsmasq.initd b/main/dnsmasq/dnsmasq.initd
index 141ed5b682..9af390f56b 100644
--- a/main/dnsmasq/dnsmasq.initd
+++ b/main/dnsmasq/dnsmasq.initd
@@ -55,7 +55,10 @@ setup_bridge() {
ip link set dev $BRIDGE address ${BRIDGE_MAC} && \
for ADDR in $BRIDGE_ADDR $BRIDGE_ADDR_EXTRA; do
- ip addr add ${ADDR}/${BRIDGE_NETMASK} dev $BRIDGE
+ case "$ADDR" in
+ */*) ip addr add ${ADDR} dev $BRIDGE;;
+ *) ip addr add ${ADDR}/${BRIDGE_NETMASK} dev $BRIDGE;;
+ esac
done && ip link set dev $BRIDGE up
echo 1 > /proc/sys/net/ipv4/ip_forward