Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4
is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in _res.sort_list for backward compatibility. However, both sort_list's are maintaind by just one index _res.nsort. So, when IPv6 address is specified to sortlist, empty entry was created in _res.sort_list. It broke sortlist facility of gethostbyname(). Discussed on users@jp.ipv6.org.
This commit is contained in:
parent
77f1de760e
commit
2004f62eea
@ -429,6 +429,9 @@ res_init()
|
||||
u++;
|
||||
}
|
||||
}
|
||||
_res.sort_list[nsort].addr.s_addr =
|
||||
(u_int32_t)0xffffffff;
|
||||
_res.sort_list[nsort].mask = (u_int32_t)0xffffffff;
|
||||
nsort++;
|
||||
}
|
||||
*cp = n;
|
||||
|
Loading…
Reference in New Issue
Block a user