nft46: recognize ipv6-mapped ipv4

closes #81
This commit is contained in:
ppom 2024-03-04 12:00:00 +01:00
parent 0b4030905b
commit 86bd75b926

View File

@ -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<len; i++) {
if (!isdigit(tab[i]) && tab[i] != ':' && !(tab[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;
}
}