On 26/03/15(Thu) 17:46, Henning Brauer wrote: > * Mike Belopuhov <m...@belopuhov.com> [2015-03-26 14:36]: > > On 26 March 2015 at 14:27, Stuart Henderson <st...@openbsd.org> wrote: > > > seems reasonable. (I'd quite like that for v4 too, though it wouldn't > > > cope with non-contiguous netmask ;) > > non-contiguous netmasks for IPv4 addresses configured on an interface? > > is that possible? what's the use case? > > perhaps you're confusing this with non-contiguous netmasks in the radix > > tree that are entered by the ipsec flows containing port numbers? > > I don't think we need to worry about non-contiguous netmasks here.
My plan is to stop supporting them in the routing table first... Does that ring any bell? :o) So let's start simple, CIDR notation for IPv6, ok? Index: ifconfig.c =================================================================== RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.296 diff -u -p -r1.296 ifconfig.c --- ifconfig.c 5 Feb 2015 10:30:25 -0000 1.296 +++ ifconfig.c 26 Mar 2015 17:15:54 -0000 @@ -3192,7 +3192,7 @@ in6_alias(struct in6_ifreq *creq) warn("SIOCGIFNETMASK_IN6"); } else { sin6 = (struct sockaddr_in6 *)&ifr6.ifr_addr; - printf(" prefixlen %d", prefix(&sin6->sin6_addr, + printf("/%d", prefix(&sin6->sin6_addr, sizeof(struct in6_addr))); }