mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
[master] fix ECS with family==0
4341. [bug] Correct the handling of ECS options with address family 0. [RT #41377]
This commit is contained in:
@@ -611,14 +611,14 @@ sendquery(struct query *query, isc_task_t *task)
|
||||
if (sa->sa_family == AF_INET) {
|
||||
family = 1;
|
||||
sin = (struct sockaddr_in *) sa;
|
||||
memcpy(addr, &sin->sin_addr, 4);
|
||||
memmove(addr, &sin->sin_addr, 4);
|
||||
if ((plen % 8) != 0)
|
||||
addr[addrl-1] &=
|
||||
~0 << (8 - (plen % 8));
|
||||
} else {
|
||||
family = 2;
|
||||
sin6 = (struct sockaddr_in6 *) sa;
|
||||
memcpy(addr, &sin6->sin6_addr, 16);
|
||||
memmove(addr, &sin6->sin6_addr, 16);
|
||||
}
|
||||
|
||||
/* Mask off last address byte */
|
||||
|
Reference in New Issue
Block a user