Hi,
While writing my ifconfig regress test I realized that IPv6 netmasks
are parsed, but silently ignored. Ignoring commandline parameters
feels wrong and is inconsistent to IPv4.
Of course I don't expect anyone to use something like this:
ifconfig vether0 inet6 fdd7:e83e:66bc:ffff::17 netmask
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
But current implementation sets a prefixlen 64 in this case.
ok?
bluhm
Index: sbin/ifconfig/ifconfig.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.414
diff -u -p -r1.414 ifconfig.c
--- sbin/ifconfig/ifconfig.c 24 Oct 2019 18:54:10 -0000 1.414
+++ sbin/ifconfig/ifconfig.c 14 Nov 2019 21:27:47 -0000
@@ -1301,6 +1301,7 @@ void
setifnetmask(const char *addr, int ignored)
{
afp->af_getaddr(addr, MASK);
+ explicit_prefix = 1;
}
/* ARGSUSED */