nd6: fix copying more than one DNS server

See bug #55163

(cherry picked from commit dcb29c591f)
This commit is contained in:
Simon Goldschmidt 2018-12-05 19:56:48 +01:00
parent fe4395336a
commit 5cc46d7989

View File

@ -766,7 +766,7 @@ nd6_input(struct pbuf *p, struct netif *inp)
rdnss_opt = (struct rdnss_option *)buffer;
num = (rdnss_opt->length - 1) / 2;
for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++) {
for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++, copy_offset += sizeof(ip6_addr_p_t)) {
ip_addr_t rdnss_address;
/* Copy directly from pbuf to get an aligned, zoned copy of the prefix. */