summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2016-05-12 20:56:16 +0500
committerVladislav Grishenko <themiron@mail.ru>2017-12-05 00:39:05 +0500
commit2aa6aeaca2691403e52ea007d3574cb7f662b0e7 (patch)
treef4543f105b1c9f38ed511ac7b87bcb66bd56bb97 /accel-pppd/ipv6
parent7fc3d1044d3a46903dac0acd96b4e1c50602b309 (diff)
downloadaccel-ppp-2aa6aeaca2691403e52ea007d3574cb7f662b0e7.tar.gz
accel-ppp-2aa6aeaca2691403e52ea007d3574cb7f662b0e7.zip
ipv6: nd: fix interface id addresses generation for prefixes > /64
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r--accel-pppd/ipv6/dhcpv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c
index 9c31507a..d99165c6 100644
--- a/accel-pppd/ipv6/dhcpv6.c
+++ b/accel-pppd/ipv6/dhcpv6.c
@@ -169,7 +169,7 @@ static void build_addr(struct ipv6db_addr_t *a, uint64_t intf_id, struct in6_add
if (a->prefix_len <= 64)
*(uint64_t *)(addr->s6_addr + 8) = intf_id;
else
- *(uint64_t *)(addr->s6_addr + 8) |= intf_id & ((1 << (128 - a->prefix_len)) - 1);
+ *(uint64_t *)(addr->s6_addr + 8) |= intf_id & htobe64((1 << (128 - a->prefix_len)) - 1);
}
static void insert_dp_routes(struct ap_session *ses, struct dhcpv6_pd *pd)