// Open ICMPv6 socket
ping_socket = socket(AF_INET6, SOCK_RAW | SOCK_CLOEXEC, IPPROTO_ICMPV6);
+ if (ping_socket < 0) {
+ syslog(LOG_ERR, "Unable to open raw socket: %s", strerror(errno));
+ return -1;
+ }
int val = 2;
setsockopt(ping_socket, IPPROTO_RAW, IPV6_CHECKSUM, &val, sizeof(val));
int setup_router_interface(struct interface *iface, bool enable)
{
+ if (!fp_route || router_event.uloop.fd < 0)
+ return -1;
+
struct ipv6_mreq all_nodes = {ALL_IPV6_NODES, iface->ifindex};
struct ipv6_mreq all_routers = {ALL_IPV6_ROUTERS, iface->ifindex};