From 2aa6aeaca2691403e52ea007d3574cb7f662b0e7 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Thu, 12 May 2016 20:56:16 +0500 Subject: ipv6: nd: fix interface id addresses generation for prefixes > /64 --- accel-pppd/extra/pppd_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accel-pppd/extra') diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c index 58581899..0ed88368 100644 --- a/accel-pppd/extra/pppd_compat.c +++ b/accel-pppd/extra/pppd_compat.c @@ -582,7 +582,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 fill_env(char **env, char *mem, struct pppd_compat_pd *pd) -- cgit v1.2.3