Commit 167be8b8 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Be more precise when rejecting martians.

parent eebb9b96
......@@ -290,8 +290,10 @@ update_route(const unsigned char *d, int seqno, int refmetric,
struct destination *dest;
int i, metric;
if(d[0] == 0xFF || d[0] == 0) {
fprintf(stderr, "Ignoring martian route.\n");
if(d[0] == 0xFF || (d[0] == 0xFE && ((d[1] & 0xC0) == 0x80)) ||
(memcmp(d, zeroes, 15) == 0 && (d[15] == 0 || d[15] == 1))) {
fprintf(stderr, "Rejecting martian route to %s.\n",
format_address(d));
return NULL;
}
......
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