Check that table is non-NULL in nbr_table_add_lladdr

This commit is contained in:
Simon Duquennoy 2019-02-18 15:21:59 +01:00
parent 3642dee5dd
commit 4a76191626
1 changed files with 4 additions and 0 deletions

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) {