[systemd-devel] [systemd-commits] 8 commits - src/libsystemd src/network src/shared src/systemd

Tom Gundersen teg at jklm.no
Tue Dec 2 05:02:37 PST 2014


On Tue, Dec 2, 2014 at 1:42 PM, David Herrmann <dh.herrmann at gmail.com> wrote:
> Hi
>
> On Tue, Dec 2, 2014 at 1:18 PM, Lennart Poettering
> <lennart at poettering.net> wrote:
>> On Tue, 02.12.14 01:50, Tom Gundersen (tomegun at kemper.freedesktop.org) wrote:
>>> +        udev_list_entry_foreach(entry, udev_hwdb_get_properties_list_entry(hwdb, str, 0))
>>> +                if (strcmp(udev_list_entry_get_name(entry), "ID_OUI_FROM_DATABASE") == 0) {
>>> +                        description = strdup(udev_list_entry_get_value(entry));
>>> +                        if (!description)
>>> +                                return -ENOMEM;
>>> +
>>> +                        *ret = description;
>>> +                        return 0;
>>> +                }
>>
>> Hmm, why not just call udev_device_get_property_value()?
>
> That would require a udev_device, but we just have the RTNL
> information at this point.

More importantly it would require the udev_device from the remote
machine. So yeah, we are just matching the gateway's mac address
against the hwdb directly.

> That's why we have to query the hwdb
> directly, instead of a udev-device. We might wanna add a
> udev_hwdb_get_property_value() just like the udev-device equivalent,
> though.

Yeah, makes sense I guess.

-t


More information about the systemd-devel mailing list