aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorArjen de Korte <build+lede@de-korte.org>2016-12-05 12:53:16 +0100
committerJohn Crispin <john@phrozen.org>2016-12-06 07:55:07 +0100
commit4fbd3aa278903bfc74341aafaeef86ff98e82e09 (patch)
treea1d533220c026f838c63048338f70e73a4465cce /package
parent0422f8bcec579ef38d86bc2d327f6895b5ed1a1f (diff)
downloadupstream-4fbd3aa278903bfc74341aafaeef86ff98e82e09.tar.gz
upstream-4fbd3aa278903bfc74341aafaeef86ff98e82e09.tar.bz2
upstream-4fbd3aa278903bfc74341aafaeef86ff98e82e09.zip
dnsmasq: Fix splitting hostid for DHCPv6 static leases
Correct splitting the 32-bit 'hostid' value to two 16-bit hexadecimal values. Previously, the lower 16-bit value was truncated to an 8-bit value, which would result in hostid values 100 and 200 both to be set to [::0:0] instead of [::0:100] and [::0:200] respectively. Signed-off-by: Arjen de Korte <build+lede@de-korte.org>
Diffstat (limited to 'package')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 845cf1b5e3..eebf5c76c8 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -35,7 +35,7 @@ hex_to_hostid() {
export "$var=$(
printf "%0x:%0x" \
$(((0x$hex >> 16) % 65536)) \
- $(( 0x$hex % 256))
+ $(( 0x$hex % 65536))
)"
return 0