summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <hans.dedecker@technicolor.com>2014-01-09 10:09:12 +0100
committerHans Dedecker <hans.dedecker@technicolor.com>2014-01-09 10:09:12 +0100
commit865c2b80b155c41b11cdc7e53d750fa1618114be (patch)
tree4ad37abbe1f2ec8c39a4c1cbe8047e57695a5fc5
parent359a2c478832b41af427f6a96c4d11d81447e65a (diff)
Fix ALL_DHCPV6_RELAYS/ALL_DHCPV6_SERVERS membership subscription
-rw-r--r--src/dhcpv6.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 8f8f435..9b802c4 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -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;