But if_init is failing? Odd as this has not changed.
/* After 2^31 bytes, the kernel offset overflows.
* To work around this bug, lseek 0. */
if (bytes == -1 && errno == EINVAL) {
- lseek(fd, 0, SEEK_SET);
+ lseek(bpf->bpf_fd, 0, SEEK_SET);
continue;
}
#endif
#ifdef INET
/* XXX We should fix this to write via the BPF interface. */
ssize_t
-bpf_send(const struct interface *ifp, __unused int fd, uint16_t protocol,
- const void *data, size_t len)
+bpf_send(const struct bpf *bpf, uint16_t protocol, const void *data, size_t len)
{
+ const struct interface *ifp = bpf->bpf_ifp;
dlpi_handle_t dh;
dlpi_info_t di;
int r;
if (state->nd_fd != -1)
return state->nd_fd;
- fd = ipv6nd_open0(true);
+ fd = ipv6nd_open(true);
if (fd == -1)
return -1;
struct cmsghdr *cm;
struct in6_pktinfo pi = { .ipi6_ifindex = ifp->index };
int s;
+#ifndef __sun
struct dhcpcd_ctx *ctx = ifp->ctx;
+#endif
if (ipv6_linklocal(ifp) == NULL) {
logdebugx("%s: delaying Router Solicitation for LL address",