GNOME Bugzilla – Bug 617191
Export wired gateway's MAC address
Last modified: 2012-07-26 11:18:41 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
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.
(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.
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).