From 86bd75b926d6a297c8c01a8ae7a03c943c0de68c Mon Sep 17 00:00:00 2001 From: ppom Date: Mon, 4 Mar 2024 12:00:00 +0100 Subject: [PATCH] nft46: recognize ipv6-mapped ipv4 closes #81 --- helpers_c/nft46.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers_c/nft46.c b/helpers_c/nft46.c index 1df7c15..fc84aa0 100644 --- a/helpers_c/nft46.c +++ b/helpers_c/nft46.c @@ -38,7 +38,7 @@ int isIPv6(char *tab, int len) { } // Each char must be a digit, :, a-f, or A-F for (i=0; i= 'a' && tab[i] <= 'f') && !(tab[i] >= 'A' && tab[i] <= 'F')) { + if (!isdigit(tab[i]) && tab[i] != ':' && tab[i] != '.' && !(tab[i] >= 'a' && tab[i] <= 'f') && !(tab[i] >= 'A' && tab[i] <= 'F')) { return 0; } }