static ssize_t ping6(struct in6_addr *addr,
const struct interface *iface)
{
- struct sockaddr_in6 dest = {AF_INET6, 0, 0, *addr, 0};
+ struct sockaddr_in6 dest = {AF_INET6, 0, 0, *addr, iface->ifindex};
struct icmp6_hdr echo = {.icmp6_type = ICMP6_ECHO_REQUEST};
struct iovec iov = {&echo, sizeof(echo)};
RTA_PAYLOAD(rta) >= sizeof(*addr))
addr = RTA_DATA(rta);
+ // Keep-alive neighbor entries for RA sending
+ if (nh->nlmsg_type == RTM_DELNEIGH && !(ndm->ndm_state & NUD_FAILED) &&
+ addr && IN6_IS_ADDR_LINKLOCAL(addr) && iface->ra == RELAYD_SERVER)
+ ping6(addr, iface);
+
// Address not specified or unrelated
if (!addr || IN6_IS_ADDR_LINKLOCAL(addr) ||
IN6_IS_ADDR_MULTICAST(addr))