mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
orther: fix xstrstr_init() memcmp() return value usage
This is a bug. The xstrstr_init initialized wrong IP version functions when this function was the first to run and set function pointers. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
6d737a7607
commit
444815f964
1 changed files with 2 additions and 2 deletions
|
|
@ -354,11 +354,11 @@ double get_range_size_v6(const struct range_t *r)
|
|||
*/
|
||||
int xstrstr_init(struct conf_t *state, const char *restrict str)
|
||||
{
|
||||
if (memcmp("lease ", str, 6)) {
|
||||
if (!memcmp("lease ", str, 6)) {
|
||||
set_ipv_functions(state, IPv4);
|
||||
return PREFIX_LEASE;
|
||||
}
|
||||
if (memcmp(" iaaddr ", str, 9)) {
|
||||
if (!memcmp(" iaaddr ", str, 9)) {
|
||||
set_ipv_functions(state, IPv6);
|
||||
return PREFIX_LEASE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue