From 20c9345155a27be1d9d5994bc81c172060344841 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sat, 2 May 2020 22:22:54 -0400 Subject: [PATCH] fix for abbreviated ipv6 --- p0f-client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/p0f-client.c b/p0f-client.c index d53bda6..ea815fd 100644 --- a/p0f-client.c +++ b/p0f-client.c @@ -73,10 +73,15 @@ static void parse_addr6(char* str, u8* ret) { while (isxdigit(*str)) str++; if (*str) str++; + // ian: added this to get beyond :: + if (*str && !isxdigit(*str)) str++; } - if (seg != 8) FATAL("Malformed IPv6 address (don't abbreviate)."); + // iank: commented. exim abbreviates but its consistent. and ip addr is only used + // to identify host, some misplaced leading zeros will not end up making 2 + // ipv6 addresses from the internet be the same in practice. + //if (seg != 8) FATAL("Malformed IPv6 address (don't abbreviate)."); } -- 2.25.1