From: Hans Dedecker Date: Wed, 27 Mar 2019 15:55:19 +0000 (+0100) Subject: netlink: fix IPv6 address updates (FS#2204) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=420945ccf1bfa6c0a7cde5f3b6b9d51219d951b8;p=oweals%2Fodhcpd.git 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 --- 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; }