From 420945ccf1bfa6c0a7cde5f3b6b9d51219d951b8 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 27 Mar 2019 16:55:19 +0100 Subject: [PATCH] netlink: fix IPv6 address updates (FS#2204) Keep the valid and preferred lifetimes in sync with the kernel by always updating the cached IPv6 addresses in refesh_iface_addr6(). This fixes invalid preferred and valid IA lifetimes in DHCPv6 reply messages due to the cached preferred and valid lifetimes not being in sync with the preferred and valid kernel lifetimes Signed-off-by: Hans Dedecker --- src/netlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/netlink.c b/src/netlink.c index c672748..c3536e7 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -212,7 +212,9 @@ static void refresh_iface_addr6(int ifindex) } if (!change) { - free(addr); + free(iface->addr6); + iface->addr6 = addr; + iface->addr6_len = len; return; } -- 2.25.1