shithub: riscv

Download patch

ref: 0ed8f6ff5f45045f487304428af106c769582dea
parent: 45213ee6c72347fd31dc2d999742f632d508a132
author: cinap_lenrek <[email protected]>
date: Tue Feb 12 23:04:33 EST 2019

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

--- a/sys/src/libip/parseip.c
+++ b/sys/src/libip/parseip.c
@@ -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;