// Check address update
static void check_updates(struct interface *iface)
{
- struct odhcpd_ipaddr addr[8] = {{IN6ADDR_ANY_INIT, 0, 0, 0, 0}};
+ struct odhcpd_ipaddr addr[RELAYD_MAX_ADDRS] = {{IN6ADDR_ANY_INIT, 0, 0, 0, 0}};
time_t now = odhcpd_time();
- ssize_t len = odhcpd_get_interface_addresses(iface->ifindex, addr, 8);
+ ssize_t len = odhcpd_get_interface_addresses(iface->ifindex, addr, ARRAY_SIZE(addr));
if (len < 0)
return;
#define RELAYD_BUFFER_SIZE 8192
#define RELAYD_MAX_PREFIXES 8
+#define RELAYD_MAX_ADDRS 8
#define INFINITE_VALID(x) ((x) == 0)
// Runtime data
struct uloop_timeout timer_rs;
struct list_head ia_assignments;
- struct odhcpd_ipaddr ia_addr[8];
+ struct odhcpd_ipaddr ia_addr[RELAYD_MAX_ADDRS];
size_t ia_addr_len;
bool ia_reconf;
odhcpd_get_mac(iface, adv.lladdr.data);
// If not currently shutting down
- struct odhcpd_ipaddr addrs[8];
+ struct odhcpd_ipaddr addrs[RELAYD_MAX_ADDRS];
ssize_t ipcnt = 0;
int64_t minvalid = INT64_MAX;