shithub: drawterm

Download patch

ref: 176099bb8164a5b9f7bb7d98db480e08d0b5c5e2
parent: 4631102321da63a1959ceccaa1b1091b09c112f1
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Feb 12 22:05:46 EST 2019

libip: don't reject ipmask in v6 form for v4 address

--- a/libip/parseip.c	Tue Feb 12 16:00:46 2019
+++ b/libip/parseip.c	Tue Feb 12 22:05:46 2019
@@ -156,7 +156,7 @@
 		x = parseip(to, from);
 		if(memcmp(to, v4prefix, IPv4off) == 0)
 			memset(to, 0xff, IPv4off);
-		else if(v4)
+		else if(v4 && memcmp(to, IPallbits, IPv4off) != 0)
 			x = -1;
 	}
 	return x;