get the ifindex via if_nametoindex(3).
Also, don't record an error restoring kernel RA settings for
a removed interface.
Thanks to Sergey Fionov.
memcpy(ifp->hwaddr, sll->sll_addr, ifp->hwlen);
#endif
}
+#ifdef __linux__
+ /* PPP addresses on Linux don't have hardware addresses */
+ else
+ ifp->index = if_nametoindex(ifp->name);
+#endif
/* We only work on ethernet by default */
if (!(ifp->flags & IFF_POINTOPOINT) &&
restore[nrestore]);
snprintf(path, sizeof(path), "%s/%s/accept_ra",
prefix, restore[nrestore]);
- if (write_path(path, "1") == -1)
+ if (write_path(path, "1") == -1 && errno != ENOENT)
syslog(LOG_ERR, "write_path: %s: %m", path);
#ifdef DEBUG_MEMORY
}