From: Claudio Jeker Subject: Re: Small mrouted improvements To: Alexander Bluhm Cc: Russell Howe , tech@openbsd.org Date: Thu, 16 Jul 2026 08:54:57 +0200 On Wed, Jul 15, 2026 at 04:39:11PM +0200, Alexander Bluhm wrote: > On Sun, Jun 28, 2026 at 12:48:34PM +0100, Russell Howe wrote: > > I saw a couple of opportunities to improve mrouted's output. > > > > First, if SIOCGETVIFCNT fails, it's useful to know the error code and > > which vif it failed for: > > > > diff --git usr.sbin/mrouted/vif.c usr.sbin/mrouted/vif.c > > index 82c2f1b481b..b25f33150d4 100644 > > --- usr.sbin/mrouted/vif.c > > +++ usr.sbin/mrouted/vif.c > > @@ -1333,8 +1333,7 @@ dump_vifs(FILE *fp) > > } > > v_req.vifi = vifi; > > if (ioctl(udp_socket, SIOCGETVIFCNT, (char *)&v_req) == -1) { > > - logit(LOG_WARNING, 0, > > - "SIOCGETVIFCNT fails"); > > + logit(LOG_WARNING, errno, "SIOCGETVIFCNT fails for vif %d", vifi); > > } > > else { > > fprintf(fp, " pkts in : %ld\n", > > > > I have commited this part. > > > Second, when logging the ratelimit for a multicast peer, include the > > units. > > > > diff --git usr.sbin/mrouted/config.c usr.sbin/mrouted/config.c > > index 9ba913f577f..a3394f2660c 100644 > > --- usr.sbin/mrouted/config.c > > +++ usr.sbin/mrouted/config.c > > @@ -101,7 +101,7 @@ config_vifs_from_kernel(void) > > v->uv_acl = NULL; > > v->uv_addrs = NULL; > > > > - logit(LOG_INFO,0,"installing %s (%s on subnet %s) as vif #%u - rate=%d", > > + logit(LOG_INFO,0,"installing %s (%s on subnet %s) as vif #%u - rate=%dbit/s", > > v->uv_name, inet_fmt(addr, s1), inet_fmts(subnet, mask, s2), > > numvifs, v->uv_rate_limit); > > > > Man page says unit is kilo bit per second. > Kernel feature was removed here: > https://github.com/openbsd/src/commit/9500e0064b973fbd2fac185909ed03e90413f2e2 > > Would it be better to remove the remains of rate limit in the daemon? Agreed. We will most probably not bring this feature back. -- :wq Claudio