summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-09-01 15:29:31 +0200
committerSteven Barth <steven@midlink.org>2015-09-01 15:29:31 +0200
commitb8f53276092dc48409006fec3c1e90383820cbc5 (patch)
treece85383c34fafc3d154bd660a573911bdb4d5a74 /src/router.c
parent5b12eeba475a3301c362cf59f138ec7aa60d2dd9 (diff)
Fixup RAs/DHCPv6 announcing incorrect addresses
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/router.c b/src/router.c
index 853b9e8..9c9b55a 100644
--- a/src/router.c
+++ b/src/router.c
@@ -244,15 +244,15 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
odhcpd_get_mac(iface, adv.lladdr.data);
// If not currently shutting down
- struct odhcpd_ipaddr *addrs = NULL;
+ struct odhcpd_ipaddr addrs[8];
ssize_t ipcnt = 0;
int64_t minvalid = INT64_MAX;
int64_t maxvalid = 0;
// If not shutdown
if (iface->timer_rs.cb) {
- addrs = iface->ia_addr;
ipcnt = iface->ia_addr_len;
+ memcpy(addrs, iface->ia_addr, ipcnt * sizeof(*addrs));
// Check default route
if (parse_routes(addrs, ipcnt))