On 30 May 2014 10:25, "Patrik Flykt" <patrik.fl...@linux.intel.com> wrote:
>
> On Thu, 2014-05-29 at 18:18 +0100, Tom Gundersen wrote:
> > + if (link->udev_device) {
> > +     const char *l2;
> > +
> > +     l2 = udev_device_get_sysattr_value(link->udev_device, "layer2");
> > +     if (l2) {
> > +             unsigned layer2;
> > +
> > +             r = safe_atou(l2, &layer2);
> > +             if (r < 0)
> > +                     return r;
> > +
> > +             if (!layer2) {
> > +                     r =
sd_dhcp_client_request_broadcast(link->dhcp_client);
> > +                     if (r < 0)
> > +                             return r;
> > +             }
>
> Am I now missing something if I can't find the
> file /sys/class/net/<device>/device/layer2 for a regular networking
> interface? The above enables broadcast only for virtual interfaces,
> right?

That's correct. My hope was that the interfaces that require broadcast
would expose that somehow. It appears that's not the case, so a scheme like
yours sounds more robust.

I'm wondering if the criterion should be to request broadcast if and only
if we have not configured an IP address (I.e. only in discovering,
requesting and init-reboot), as that seems to be the problem, or did I get
that wrong?

Cheers,

Tom
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to