Fix ALL_DHCPV6_RELAYS/ALL_DHCPV6_SERVERS membership subscription
authorHans Dedecker <hans.dedecker@technicolor.com>
Thu, 9 Jan 2014 09:09:12 +0000 (10:09 +0100)
committerHans Dedecker <hans.dedecker@technicolor.com>
Thu, 9 Jan 2014 09:09:12 +0000 (10:09 +0100)
src/dhcpv6.c

index 8f8f4356774029e367c9e3caf765a446f187dffb..9b802c48bb1cc6dee618695a2c87817c510f400e 100644 (file)
@@ -84,12 +84,10 @@ int setup_dhcpv6_interface(struct interface *iface, bool enable)
 
                struct ipv6_mreq relay = {ALL_DHCPV6_RELAYS, iface->ifindex};
                struct ipv6_mreq server = {ALL_DHCPV6_SERVERS, iface->ifindex};
-               setsockopt(iface->dhcpv6_event.uloop.fd, IPPROTO_IPV6,
-                               IPV6_ADD_MEMBERSHIP, &relay, sizeof(relay));
+               setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &relay, sizeof(relay));
 
                if (iface->dhcpv6 == RELAYD_SERVER)
-                       setsockopt(iface->dhcpv6_event.uloop.fd, IPPROTO_IPV6,
-                                       IPV6_ADD_MEMBERSHIP, &server, sizeof(server));
+                       setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &server, sizeof(server));
 
                iface->dhcpv6_event.uloop.fd = sock;
                iface->dhcpv6_event.handle_dgram = handle_dhcpv6;