Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183969 - [PATCH] gnome-netstatus does not correctly list interfaces
Summary: [PATCH] gnome-netstatus does not correctly list interfaces
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-02 11:28 UTC by Roy Marples (RETIRED)
Modified: 2007-07-24 18:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
List interfaces correctly (gnome-netstatus-2.12-list-interfaces.patch,718 bytes, patch)
2007-07-02 11:29 UTC, Roy Marples (RETIRED)
Details | Diff
List interfaces correctly. (gnome-netstatus.patch,959 bytes, patch)
2007-07-16 11:50 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Marples (RETIRED) gentoo-dev 2007-07-02 11:28:44 UTC
gnome-netstatus doesn't correctly list the interfaces on FreeBSD.
This is because the ifreq structure length is not constant.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-07-02 11:29:23 UTC
Created attachment 123615 [details, diff]
List interfaces correctly
Comment 2 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-06 01:06:57 UTC
This appears to be fixed in 2.12.1.  The code in question looks like this:

 p += sizeof (if_req->ifr_name) + NETSTATUS_SA_LEN (&if_req->ifr_addr);

Does that work on fbsd?
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-07-06 07:24:25 UTC
(In reply to comment #2)
> This appears to be fixed in 2.12.1.  The code in question looks like this:
> 
>  p += sizeof (if_req->ifr_name) + NETSTATUS_SA_LEN (&if_req->ifr_addr);
> 
> Does that work on fbsd?

It does and it's the amd64 patch that just changes that line. Silly me for not reviewing our patches!

My amd64 is currently toasted, so I don't know if we still need that or not.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-07-16 11:50:58 UTC
Created attachment 125005 [details, diff]
List interfaces correctly.

OK, the issue is that Linux does not have sa_len, which is optional. If we don't have sa_len then we have to use the size of the ifreq struct and not the sockaddress struct added to the name length.

This patch works correctly on Linux x86 + amd64 and FreeBSD x86
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-24 14:26:33 UTC
Fixed.  Thanks, uber, and sorry for the delay.  New daughter, and all that.
Comment 6 Roy Marples (RETIRED) gentoo-dev 2007-07-24 18:15:45 UTC
Congrats! And no worries :)