diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2014-05-01 16:37:43 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2014-05-01 16:37:43 +0100 |
commit | 1e7f82f4d8d86ee3d5412ae15e61c1cdad621b4c (patch) | |
tree | 24ba094e6d755d3d27696e15d4c36dfc4050d7da /src/dhcp6.c | |
parent | 4872aa747b24238c0859166eaae0ae3d89364244 (diff) | |
download | dnsmasq-pd.tar.gz |
First commit for DHCPv6_PD.pd
Diffstat (limited to 'src/dhcp6.c')
-rw-r--r-- | src/dhcp6.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dhcp6.c b/src/dhcp6.c index 3a83c18..03a2087 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -774,6 +774,21 @@ void dhcp_construct_contexts(time_t now) } } +#ifdef HAVE_PD +struct dhcp_context *find_prefix_context(struct dhcp_netid *tags, struct in6_addr *addr, int prefix_len) +{ + struct dhcp_context *tmp; + + for (tmp = daemon->prefix_contexts; tmp; tmp = tmp->current) + if (prefix_len == tmp->prefix && + IN6_ARE_ADDR_EQUAL(&tmp->start6, addr) && + match_netid(tmp->filter, tags, 1)) + return tmp; + + return NULL; +} +#endif + #endif |