1 From 549b1a478c5eee9dbd3a0709913a26ec29d30f2c Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Wed, 20 May 2015 20:20:24 +0100
4 Subject: [PATCH 98/98] Tweak immediately previous patch.
7 src/rfc2131.c | 9 +++++++--
8 1 file changed, 7 insertions(+), 2 deletions(-)
10 diff --git a/src/rfc2131.c b/src/rfc2131.c
11 index e602a21585c9..9f69ed595903 100644
14 @@ -805,9 +805,14 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
15 if (service->type == type)
18 - if (!service || !service->basename || !(context = narrow_context(context, mess->ciaddr, tagif_netid)))
20 + for (; context; context = context->current)
21 + if (match_netid(context->filter, tagif_netid, 1) &&
22 + is_same_net(mess->ciaddr, context->start, context->netmask))
25 + if (!service || !service->basename || !context)
28 clear_packet(mess, end);
30 mess->yiaddr = mess->ciaddr;