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

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Fri Oct 6 21:34:53 CEST 2017


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

Landry Breuil <landry at xfce.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|frivoal at xfce.org            |landry at xfce.org

--- Comment #10 from Landry Breuil <landry at xfce.org> ---
Created attachment 7345
  --> https://bugzilla.xfce.org/attachment.cgi?id=7345&action=edit
simpler (?) fix

So, i finally had time to properly look into this bug, as it puzzled me -
there's indeed a problem on the kernel side where sysctl() doesnt
null-terminate some strings but for specific drivers. This is a separate issue
that has to be dealt with.

But in the end, sdl_nlen should be used - it is correctly used in fact in
checkinterface() (here:
https://git.xfce.org/panel-plugins/xfce4-netload-plugin/tree/panel-plugin/wormulon/openbsd.c#n80)
, but *not* in get_stats() when the interface name check is done *before*
uselessly copying it to s (in
https://git.xfce.org/panel-plugins/xfce4-netload-plugin/tree/panel-plugin/wormulon/openbsd.c#n152).

So yes, your second patch works and fixes the issue, but there's a simpler
solution to me: only fix get_stats, and compare the right strings at the right
moment - which is what your first patch did more or less. Whether checking for
nlen > 0 is needed is separate (and cargo-culting code from netstat isnt a
reason :) - using IFNAMSIZ also makes sense.

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


More information about the Goodies-dev mailing list