Commit b1dc0f29 by Juliusz Chroboczek

Fix martian handling for IPv4.

1 parent 3223774e
Showing 1 changed file with 3 additions and 2 deletions
......@@ -319,8 +319,9 @@ martian_prefix(const unsigned char *prefix, int plen)
(plen >= 10 && prefix[0] == 0xFE && (prefix[1] & 0xC0) == 0x80) ||
(plen >= 128 && memcmp(prefix, zeroes, 16) == 0) ||
(plen >= 96 && v4mapped(prefix) &&
(prefix[12] == 127 || prefix[12] == 0 ||
(prefix[12] & 0xF0) == 0xF0 || (prefix[12] & 0xF0) == 0xE0));
((plen >= 104 && (prefix[12] == 127 || prefix[12] == 0)) ||
(plen >= 100 &&
((prefix[12] & 0xF0) == 0xF0 || (prefix[12] & 0xF0) == 0xE0))));
}
int
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!