-/* $OpenBSD: engine.c,v 1.25 2017/05/29 07:54:46 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.26 2017/05/29 08:15:38 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
struct timespec when;
struct timespec uptime;
uint32_t if_index;
+ struct ether_addr hw_address;
struct sockaddr_in6 addr;
struct in6_addr mask;
struct in6_addr prefix;
&addr_proposal->prefix,
sizeof(struct in6_addr)) != 0)
continue;
+
+ if (memcmp(&addr_proposal->hw_address,
+ &iface->hw_address,
+ sizeof(addr_proposal->hw_address)) != 0)
+ continue;
+
if (addr_proposal->privacy) {
/*
* create new privacy address if old
addr_proposal->when = ra->when;
addr_proposal->uptime = ra->uptime;
addr_proposal->if_index = iface->if_index;
+ memcpy(&addr_proposal->hw_address, &iface->hw_address,
+ sizeof(addr_proposal->hw_address));
addr_proposal->privacy = privacy;
memcpy(&addr_proposal->prefix, &prefix->prefix,
sizeof(addr_proposal->prefix));