n->key = k;
n->adj_index = ADJ_INDEX_INVALID;
}
+ else
+ {
+ /*
+ * prevent a DoS attack from the data-plane that
+ * spams us with no-op updates to the MAC address
+ */
+ if (0 == memcmp(n->link_layer_address,
+ link_layer_address,
+ n_bytes_link_layer_address))
+ return -1;
+ }
/* Update time stamp and ethernet address. */
clib_memcpy (n->link_layer_address,
a->seed = random_default_seed();
/* for generating random interface ids */
- a->randomizer = 0x1119194911191949;
+ a->randomizer = 0x1119194911191949ULL;
a->randomizer = random_u64 ((u32 *)&a->randomizer);
a->initial_adverts_count = MAX_INITIAL_RTR_ADVERTISEMENTS ;