[Buildroot] [PATCH v3 11/13] package/dhcp: systemd: support IPv6 lease file

Maxime Hadjinlian maxime.hadjinlian at gmail.com
Thu Nov 12 10:42:52 UTC 2015


Hi Benoit, all

On Mon, Nov 9, 2015 at 11:49 AM, Benoît Thébaudeau <benoit at wsystem.com>
wrote:

> Hi Maxime, all,
>
> On 04/11/2015 12:31, Maxime Hadjinlian wrote:
> >>>     > A question though, from the manual page of dhcpd, by default it
> starts as an IPv6 server should we have, two services one with '-4' and one
> with '-6' ? And it's left to the user to specify it in the "$OPTIONS" ?
> Maybe this should be mentioned somewhere ?
> >>>
> >>>     '-4' is the default, not '-6'.
> >>>
> >>> If I look at ./server/dhcpd.8 in the sources of dhcp-4.1-ESVR12, it
> clearly states:
> >>>
> >>> -6 Run as a DHCPv6 server. This is the default and cannot be combined
> with -4.
> >>
> >> My bad: I had looked at the man page of another version.
>
> Actually, this dhcpd.8 is wrong. Looking at common/discover.c:
>     int local_family = AF_INET;
>
> So IPv4 really is the default, and this is confirmed by the behavior.
>
> This documentation issue is fixed in 4.3.3. A version bump would be great,
> all
> the more the EoL date of 4.1-ESV-R12 is Dec. 2015. I'll see if I can
> quickly add
> that to my series.
>
Ah, that explains everything. Indeed, a bump would be nice if you could
squeeze it, otherwise I'm sure it'll be done pretty quickly, DHCP is a
pretty used package after all :).

>
> >     >     A single instance of dhcpd cannot be run with
> >     >     both '-4' and '-6'. I don't know if it's possible (or
> desirable) to safely run
> >     >     simultaneously two instances of dhcpd, one with '-4' and the
> other one with
> >     >     '-6'.
> >     >
> >     > Well it could be useful if you are trying to build a network
> appliance and you want to support both stack. So you would want to start
> two processes with different options. Maybe that's something that should be
> left to the users to figure out.
> >
> >     Yes, but should everything be duplicated in Buildroot just for this
> purpose? For
> >     SysV, it's easy not to duplicate things, but how would you do that
> with systemd?
> >     How do distributions handle this?
> >
> > I only looked at Arch Linux, they duplicate the service file. It's also
> possible to use the template mechanisms in systemd, to have something like
> dhcpd at .service and when you enable it, you create a symlink called
> dhcpd at 4.service, and the '4' is passed as argument to the template and
> you can use it however you want it to.
>
> Ubuntu duplicates the service files too. And all the service files come
> from the
> same package.
>
> How do we want to handle that in Buildroot?
> 1/ Always start IPv4 and IPv6 instances like Ubuntu does. This is wasting
>    resources if one of them is actually unused.
> 2/ Add a Kconfig choice - common to all the selected DHCP daemons - between
>    "only IPv4", "only IPv6", and "IPv4 + IPv6".
> 3/ Use /etc/default/dhcpd and the like. We could detect the presence of
>    /etc/default/dhcpd vs. /etc/default/dhcpd6, or of some variables in
> them, or
>    of /etc/dhcp/dhcpd.conf vs. /etc/dhcp/dhcpd6.conf. Something like that
> seems
>    to be easier to use, but less obvious for users unless well documented.
>
> In my humble opinion, I would go for the Kconfig options as I find this
easier for the end user and to maintain.

> Best regards,
> Benoît
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151112/3f60a172/attachment.html>


More information about the buildroot mailing list