From 6deafcc1fad03312b4df0778ef8ebef11fb93e34 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 4 Jan 2014 10:14:59 +0100 Subject: Use 1 socket per interface for DHCPv6 --- src/dhcpv6-ia.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/dhcpv6-ia.c') diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index e5a7c0b..f933da6 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -32,13 +32,11 @@ static void update(struct interface *iface); static void reconf_timer(struct uloop_timeout *event); static struct uloop_timeout reconf_event = {.cb = reconf_timer}; -static int socket_fd = -1; static uint32_t serial = 0; -int dhcpv6_ia_init(int dhcpv6_socket) +int dhcpv6_ia_init(void) { - socket_fd = dhcpv6_socket; uloop_timeout_set(&reconf_event, 2000); return 0; } @@ -183,7 +181,7 @@ static int send_reconf(struct interface *iface, struct dhcpv6_assignment *assign md5_hash(reconf_msg.auth.key, 16, &md5); md5_end(reconf_msg.auth.key, &md5); - return odhcpd_send(socket_fd, &assign->peer, &iov, 1, iface); + return odhcpd_send(iface->dhcpv6_event.uloop.fd, &assign->peer, &iov, 1, iface); } -- cgit v1.2.3