Merge pull request #847 from simonduq/contrib/nbr-table-sanity-check

Check that table is non-NULL in nbr_table_add_lladdr
This commit is contained in:
Simon Duquennoy 2019-02-26 08:47:23 +01:00 committed by GitHub
commit 7ca4b088f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -354,6 +354,10 @@ nbr_table_add_lladdr(nbr_table_t *table, const linkaddr_t *lladdr, nbr_table_rea
nbr_table_item_t *item;
nbr_table_key_t *key;
if(table == NULL) {
return NULL;
}
/* Allow lladdr-free insertion, useful e.g. for IPv6 ND.
* Only one such entry is possible at a time, indexed by linkaddr_null. */
if(lladdr == NULL) {