Download raw body.
dead code tells no tales, 15/16
OK florian
On 2026-09-20 21:12 UTC, Miod Vallat <miod@online.fr> wrote:
> These two IPv6 netmasks do not appear to be used anywhere anymore.
>
> Index: sys/netinet6/in6.c
> ===================================================================
> RCS file: /OpenBSD/src/sys/netinet6/in6.c,v
> diff -u -p -u -p -r1.279 in6.c
> --- sys/netinet6/in6.c 22 Mar 2026 23:14:00 -0000 1.279
> +++ sys/netinet6/in6.c 20 Sep 2026 16:47:44 -0000
> @@ -107,10 +107,8 @@ const struct in6_addr in6addr_linklocal_
> const struct in6_addr in6addr_linklocal_allrouters =
> IN6ADDR_LINKLOCAL_ALLROUTERS_INIT;
>
> -const struct in6_addr in6mask0 = IN6MASK0;
> const struct in6_addr in6mask32 = IN6MASK32;
> const struct in6_addr in6mask64 = IN6MASK64;
> -const struct in6_addr in6mask96 = IN6MASK96;
> const struct in6_addr in6mask128 = IN6MASK128;
>
> int in6_ioctl(u_long, caddr_t, struct ifnet *, int);
> Index: sys/netinet6/in6.h
> ===================================================================
> RCS file: /OpenBSD/src/sys/netinet6/in6.h,v
> diff -u -p -u -p -r1.125 in6.h
> --- sys/netinet6/in6.h 16 Sep 2025 09:19:16 -0000 1.125
> +++ sys/netinet6/in6.h 20 Sep 2026 16:47:44 -0000
> @@ -117,22 +117,17 @@ struct sockaddr_in6 {
> * Local definition for masks
> */
> #ifdef _KERNEL /* XXX nonstandard */
> -#define IN6MASK0 {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}}
> #define IN6MASK32 {{{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, \
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
> #define IN6MASK64 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
> -#define IN6MASK96 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
> - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
> #define IN6MASK128 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
> 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}}
>
> extern const struct sockaddr_in6 sa6_any;
>
> -extern const struct in6_addr in6mask0;
> extern const struct in6_addr in6mask32;
> extern const struct in6_addr in6mask64;
> -extern const struct in6_addr in6mask96;
> extern const struct in6_addr in6mask128;
> #endif /* _KERNEL */
>
>
--
In my defence, I have been left unsupervised.
dead code tells no tales, 15/16