"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dhcp-common.c" between
dnsmasq-2.84.tar.xz and dnsmasq-2.85.tar.xz

About: Dnsmasq is a lightweight caching DNS forwarder and DHCP server.

dhcp-common.c  (dnsmasq-2.84.tar.xz):dhcp-common.c  (dnsmasq-2.85.tar.xz)
skipping to change at line 283 skipping to change at line 283
return 1; return 1;
return 0; return 0;
} }
static int is_config_in_context(struct dhcp_context *context, struct dhcp_config *config) static int is_config_in_context(struct dhcp_context *context, struct dhcp_config *config)
{ {
if (!context) /* called via find_config() from lease_update_from_configs() */ if (!context) /* called via find_config() from lease_update_from_configs() */
return 1; return 1;
if (!(config->flags & (CONFIG_ADDR | CONFIG_ADDR6)))
return 1;
#ifdef HAVE_DHCP6 #ifdef HAVE_DHCP6
if (context->flags & CONTEXT_V6) if (context->flags & CONTEXT_V6)
{ {
struct addrlist *addr_list; struct addrlist *addr_list;
if (!(config->flags & CONFIG_ADDR6)) if (config->flags & CONFIG_ADDR6)
return 1; for (; context; context = context->current)
for (addr_list = config->addr6; addr_list; addr_list = addr_list->next
for (; context; context = context->current) )
for (addr_list = config->addr6; addr_list; addr_list = addr_list->next) {
{ if ((addr_list->flags & ADDRLIST_WILDCARD) && context->prefix == 6
if ((addr_list->flags & ADDRLIST_WILDCARD) && context->prefix == 64 4)
) return 1;
return 1;
if (is_same_net6(&addr_list->addr.addr6, &context->start6, context
if (is_same_net6(&addr_list->addr.addr6, &context->start6, context- ->prefix))
>prefix)) return 1;
return 1; }
}
} }
else else
#endif #endif
{ {
if (!(config->flags & CONFIG_ADDR))
return 1;
for (; context; context = context->current) for (; context; context = context->current)
if ((config->flags & CONFIG_ADDR) && is_same_net(config->addr, context->s tart, context->netmask)) if ((config->flags & CONFIG_ADDR) && is_same_net(config->addr, context->s tart, context->netmask))
return 1; return 1;
} }
return 0; return 0;
} }
static struct dhcp_config *find_config_match(struct dhcp_config *configs, static struct dhcp_config *find_config_match(struct dhcp_config *configs,
struct dhcp_context *context, struct dhcp_context *context,
 End of changes. 3 change blocks. 
17 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)