diff options
author | Steven Barth <steven@midlink.org> | 2014-01-04 10:14:59 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-01-04 10:14:59 +0100 |
commit | 6deafcc1fad03312b4df0778ef8ebef11fb93e34 (patch) | |
tree | 633c3e0e90fa948cd5624964ff88a96cd090995b /src/dhcpv6-ia.c | |
parent | 3fcc0814db3773e1295a372ea7a4194e19c62e52 (diff) |
Use 1 socket per interface for DHCPv6
Diffstat (limited to 'src/dhcpv6-ia.c')
-rw-r--r-- | src/dhcpv6-ia.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); } |