On Thu, Nov 26, 2026 at 09:07:51PM +0100, Alexander Bluhm wrote: > On Thu, Nov 26, 2026 at 08:46:08PM +0100, Theo Buehler wrote: > > If I understand ip_var.h 1.128 correctly, ips_rcvmemdrop was renamed > > to ips_fragnomem, breaking the bulid of shells/nsh. > > Oops, I was not aware that this is used outside of our base. > > > Is the below build fix correct? > > The old ips_rcvmemdrop was mixing the new ips_fragoverflow and > ips_fragnomem. That is the reason why I did this change. > > This patched file looks like a copy from src/usr.bin/netstat/inet.c > We should use our descriptions. As we add or modify counters from > time to time, the nsh program looks fragile. I just synced the IP > part. Upstream should sync all counters regulary.
Thanks. Given that the diff in the ip_stats() counters vanished, this will be as correct as our netstat as far as the fallout from the kernel change is concerned. ok tb > > bluhm > > Index: Makefile > =================================================================== > RCS file: /data/mirror/openbsd/cvs/ports/shells/nsh/Makefile,v > diff -u -p -r1.55 Makefile > --- Makefile 14 Oct 2026 11:44:22 -0000 1.55 > +++ Makefile 26 Nov 2026 20:01:13 -0000 > @@ -3,7 +3,7 @@ COMMENT = network switch style shell > CATEGORIES = shells net > HOMEPAGE = https://www.nmedia.net/nsh/ > V = 1.2.3 > -REVISION = 1 > +REVISION = 2 > DISTNAME = nsh-${V} > SITES = > https://github.com/yellowman/nsh/releases/download/v${V}/ > > Index: patches/patch-stats_c > =================================================================== > RCS file: /data/mirror/openbsd/cvs/ports/shells/nsh/patches/patch-stats_c,v > diff -u -p -r1.11 patch-stats_c > --- patches/patch-stats_c 25 Jun 2025 08:44:33 -0000 1.11 > +++ patches/patch-stats_c 26 Nov 2026 20:01:04 -0000 > @@ -1,10 +1,46 @@ > -fix 'show kernel mbuf' command on -current after mbuf.h,v r1.266 > +sync with src/usr.bin/netstat/inet.c > > +fix 'show kernel mbuf' command on -current after mbuf.h,v r1.266 > from upstream > + > Index: stats.c > --- stats.c.orig > +++ stats.c > -@@ -782,7 +782,7 @@ mbpr(void) > +@@ -298,9 +298,13 @@ ip_stats() > + p1(ips_badoptions, "\t%lu with bad options\n"); > + p1(ips_badvers, "\t%lu with incorrect version number\n"); > + p(ips_fragments, "\t%lu fragment%s received\n"); > +- p(ips_fragdropped, "\t%lu fragment%s dropped (duplicates or out of > space)\n"); > ++ p(ips_fragdropped, "\t%lu fragment%s dropped (duplicates or ECN)\n"); > + p(ips_badfrags, "\t%lu malformed fragment%s dropped\n"); > +- p(ips_fragtimeout, "\t%lu fragment%s dropped after timeout\n"); > ++ p(ips_fragoverflow, "\t%lu fragment%s dropped due to queue limit\n"); > ++ p(ips_fragnomem, "\t%lu fragment%s dropped due to memory shortage\n"); > ++ p(ips_fragtimeout, "\t%lu fragmented packet%s dropped after timeout\n"); > ++ p(ips_fragfail, > ++ "\t%lu fragmented packet%s dropped before reassembly\n"); > + p(ips_reassembled, "\t%lu packet%s reassembled ok\n"); > + p(ips_delivered, "\t%lu packet%s for this host\n"); > + p(ips_noproto, "\t%lu packet%s for unknown/unsupported protocol\n"); > +@@ -314,13 +318,16 @@ ip_stats() > + p(ips_fragmented, "\t%lu output datagram%s fragmented\n"); > + p(ips_ofragments, "\t%lu fragment%s created\n"); > + p(ips_cantfrag, "\t%lu datagram%s that can't be fragmented\n"); > +- p1(ips_rcvmemdrop, "\t%lu fragment floods\n"); > + p(ips_toolong, "\t%lu packet%s with ip length > max ip packet size\n"); > + p(ips_nogif, "\t%lu tunneling packet%s that can't find gif\n"); > + p(ips_badaddr, "\t%lu datagram%s with bad address in header\n"); > + p(ips_inswcsum, "\t%lu input datagram%s software-checksummed\n"); > + p(ips_outswcsum, "\t%lu output datagram%s software-checksummed\n"); > + p(ips_notmember, "\t%lu multicast packet%s which we don't join\n"); > ++ p1(ips_rtcachehit, "\t%lu route cache hit\n"); > ++ p1(ips_rtcachemiss, "\t%lu route cache miss\n"); > ++ p(ips_wrongif, "\t%lu packet%s received on wrong interface\n"); > ++ p(ips_idropped, "\t%lu input packet%s dropped due to no bufs, etc.\n"); > + #undef p > + #undef p1 > + } > +@@ -782,7 +789,7 @@ mbpr(void) > > memset(&seen, 0, sizeof(seen)); >
