Download raw body.
ip_mroute6: kill mrt6_mrouter_ver
Our MRT6 code has no compat fallback for the old (> 25year) mrt6msg
format. We only use the new version with the alignment fix.
So there is no need to track mrt6_mrouter_ver since it is always MRT6_INIT
and that will never change. So burn this bridge for good.
Even adding pim support would not require this. So there is really no need
to track this.
--
:wq Claudio
Index: netinet6/ip6_mroute.c
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_mroute.c,v
diff -u -p -r1.159 ip6_mroute.c
--- netinet6/ip6_mroute.c 17 Sep 2026 15:56:59 -0000 1.159
+++ netinet6/ip6_mroute.c 5 Nov 2026 10:03:12 -0000
@@ -133,7 +133,6 @@ struct rwlock mrt6_routerlock = RWLOCK_I
struct rttimer_queue mrt6_timer;
struct socket *mrt6_mrouter[RT_TABLEID_MAX + 1]; /* [R] */
-int mrt6_mrouter_ver[RT_TABLEID_MAX + 1]; /* [R] */
int ip6_mrtproto; /* [I] for netstat only */
struct cpumem *mrt6counters;
@@ -571,7 +570,6 @@ ip6_mrouter_init(struct socket *so, int
return (EADDRINUSE);
}
mrt6_mrouter[rtableid] = soref(so);
- mrt6_mrouter_ver[rtableid] = cmd;
rw_exit_write(&mrt6_routerlock);
@@ -631,7 +629,6 @@ ip6_mrouter_done(struct socket *so)
}
mrt6_mrouter[rtableid] = NULL;
- mrt6_mrouter_ver[rtableid] = 0;
sorele(so);
rw_exit_write(&mrt6_routerlock);
@@ -1072,18 +1069,10 @@ ip6_mforward(struct ip6_hdr *ip6, struct
rw_enter_read(&mrt6_routerlock);
- switch (mrt6_mrouter_ver[rtableid]) {
- case MRT6_INIT:
- im = mtod(mm, struct mrt6msg *);
- im->im6_msgtype = MRT6MSG_NOCACHE;
- im->im6_mbz = 0;
- im->im6_mif = mifp->m6_mifi;
- break;
- default:
- rw_exit_read(&mrt6_routerlock);
- m_freem(mm);
- return (EINVAL);
- }
+ im = mtod(mm, struct mrt6msg *);
+ im->im6_msgtype = MRT6MSG_NOCACHE;
+ im->im6_mbz = 0;
+ im->im6_mif = mifp->m6_mifi;
sin6.sin6_addr = ip6->ip6_src;
if (socket6_send(mrt6_mrouter[rtableid], mm,
ip_mroute6: kill mrt6_mrouter_ver