After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 617191 - Export wired gateway's MAC address
Export wired gateway's MAC address
Status: RESOLVED WONTFIX
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2010-04-29 15:36 UTC by Bastien Nocera
Modified: 2012-07-26 11:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2010-04-29 15:36:38 UTC
When connected via wired, it would be useful to know what the MAC address of the router is, when available.

This would allow Geoclue to detect the router, and ask web services for information about the location:
https://bugs.freedesktop.org/show_bug.cgi?id=27894
Comment 1 Jiri Klimes 2010-06-03 13:26:31 UTC
Hmm, the MAC could be possible to get from ARP cache.
Not sure how that should be present, though. It should probably be available via D-Bus. So something like 'org.freedesktop.NetworkManager.LinkConfig' need to be created to present the MAC and probably other layer 2 values too.

How Geoclue would access the piece of information?

Btw, try:
ip neigh show <router IP>
to get the MAC.
Comment 2 Bastien Nocera 2010-06-03 14:06:39 UTC
(In reply to comment #1)
> Hmm, the MAC could be possible to get from ARP cache.
> Not sure how that should be present, though. It should probably be available
> via D-Bus. So something like 'org.freedesktop.NetworkManager.LinkConfig' need
> to be created to present the MAC and probably other layer 2 values too.
> 
> How Geoclue would access the piece of information?

It would usually use it only once per connection, for a particular provider. It would need to be available via D-Bus, or through nm-glib. This is the current NM using code in geoclue:
http://cgit.freedesktop.org/geoclue/tree/src/connectivity-networkmanager.c

> Btw, try:
> ip neigh show <router IP>
> to get the MAC.

That's much better than what we currently have, I'll look into integrating.
Comment 3 Pavel Simerda 2012-07-26 11:18:41 UTC
I think NetworkManager doesn't use the router MAC for its purposes at all. I don't know about other usecases. I think Geoclue should just ask the kernel
as above (or use netlink directly).