[Goodies-dev] [Bug 13853] Shows no activity on OpenBSD 6.1

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Thu Sep 21 16:47:47 CEST 2017


https://bugzilla.xfce.org/show_bug.cgi?id=13853

--- Comment #3 from Ed Hynan <edhynan at gmail.com> ---
Ah, interesting.  This is device specific bahavior.  As you
say, em(4) works (it does provide nul terminated sockaddr_dl.sdl_data),
but re(4) does not work (not nul terminated sockaddr_dl.sdl_data).

My (only) OpenBSD workstation is ...

% uname -a
OpenBSD benson.example.org 6.1 GENERIC.MP#21 amd64

... with all syspatch applied.  Obviously, with re(4).

I just converted the wormulon/openbsd.c file into a test program. I'll
attach it.  It has both original and fixed versions of get_stat().
Testing on this workstation with re(4), and my gateway with em(4), I can
confirm that the original code fails to find the interface with re, but 
succeeds with em. (Note lo0 is OK.)  The fixed code works with both.

Whether or not there is a bug in re(4), I would argue that my patch is 
more correct.  It makes re(4) work, and maybe there are others that
don't nul terminate sockaddr_dl.sdl_data.  An improvement in principle
is that a buffer on the stack, and the copy into it, is removed.  Also,
note that OpenBSD's netstat code does not rely on sockaddr_dl.sdl_data 
being nul terminated.

-Ed

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the Goodies-dev mailing list