Fix neighbor discovery bug

return value of memcmp is positive or negative or null
and should not be cast in an uint8_t

make -C "tests/09-ipv6" works now on 64bits
This commit is contained in:
Rehan MALAK 2018-04-26 18:27:23 +02:00
parent 4581785134
commit 8cae7a9a91
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ na_input(void)
if(nd6_opt_llao != NULL) {
is_llchange =
memcmp(&nd6_opt_llao[UIP_ND6_OPT_DATA_OFFSET], lladdr,
UIP_LLADDR_LEN);
UIP_LLADDR_LEN) ? 1 : 0;
}
if(nbr->state == NBR_INCOMPLETE) {
if(nd6_opt_llao == NULL || !extract_lladdr_from_llao_aligned(&lladdr_aligned)) {