From 2d2a3b840421cfc6328aee8cc52e5a5a51444fda Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 12 Dec 2018 18:48:30 +0100 Subject: odhcpd: switch to libubox container_of implementation Signed-off-by: Hans Dedecker --- src/dhcpv6-ia.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dhcpv6-ia.c') diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index fb1c228..3b2dfaf 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -521,7 +521,8 @@ static void set_border_assignment_size(struct interface *iface, struct dhcpv6_as /* More data was received from TCP connection */ static void managed_handle_pd_data(struct ustream *s, _unused int bytes_new) { - struct dhcpv6_assignment *c = container_of(s, struct dhcpv6_assignment, managed_sock); + struct ustream_fd *fd = container_of(s, struct ustream_fd, stream); + struct dhcpv6_assignment *c = container_of(fd, struct dhcpv6_assignment, managed_sock); time_t now = odhcpd_time(); bool first = c->managed_size < 0; @@ -592,7 +593,8 @@ static void managed_handle_pd_data(struct ustream *s, _unused int bytes_new) /* TCP transmission has ended, either because of success or timeout or other error */ static void managed_handle_pd_done(struct ustream *s) { - struct dhcpv6_assignment *c = container_of(s, struct dhcpv6_assignment, managed_sock); + struct ustream_fd *fd = container_of(s, struct ustream_fd, stream); + struct dhcpv6_assignment *c = container_of(fd, struct dhcpv6_assignment, managed_sock); if (!(c->flags & OAF_STATIC)) c->valid_until = odhcpd_time() + 15; -- cgit v1.2.3