Commit 3709c80a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Protect against neighbours with id[0] = 0xFF.

parent 0d250f92
......@@ -73,6 +73,11 @@ add_neighbour(const unsigned char *id, const unsigned char *address,
struct neighbour *neigh;
int i;
if(id[0] == 0xFF) {
fprintf(stderr, "Received neighbour announcement with id[0] = FF.\n");
return NULL;
}
neigh = find_neighbour(address, net);
if(neigh) {
if(memcmp(neigh->id, id, 16) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment