resolved: when answer A or AAAA questions, order responses by whether addresses are link-local or not

This commit is contained in:
Lennart Poettering
2014-07-30 00:48:59 +02:00
parent 2442b93d15
commit af93291cc4
7 changed files with 51 additions and 5 deletions
+2 -2
View File
@@ -243,7 +243,7 @@ static int address_acquire(Link *link, Address *original, Address **ret) {
assert(ret);
/* Something useful was configured? just use it */
if (in_addr_null(original->family, &original->in_addr) <= 0)
if (in_addr_is_null(original->family, &original->in_addr) <= 0)
return 0;
/* The address is configured to be 0.0.0.0 or [::] by the user?
@@ -345,7 +345,7 @@ int address_configure(Address *address, Link *link,
return r;
}
if (!in_addr_null(address->family, &address->in_addr_peer)) {
if (!in_addr_is_null(address->family, &address->in_addr_peer)) {
if (address->family == AF_INET)
r = sd_rtnl_message_append_in_addr(req, IFA_ADDRESS, &address->in_addr_peer.in);
else if (address->family == AF_INET6)
+1 -1
View File
@@ -283,7 +283,7 @@ static Address* link_find_dhcp_server_address(Link *link) {
if (address->family != AF_INET)
continue;
if (in_addr_null(address->family, &address->in_addr))
if (in_addr_is_null(address->family, &address->in_addr))
continue;
return address;