Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit@wsystem.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 11/13] package/dhcp: systemd: support IPv6 lease file
Date: Mon, 9 Nov 2015 11:49:20 +0100	[thread overview]
Message-ID: <56407A30.1050404@wsystem.com> (raw)
In-Reply-To: <CAGduivz2ChrAgNgxM-a33JN_Eh7aFsfSKpq_vT0hRd7sNTt_zw@mail.gmail.com>

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.

>     >     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.

Best regards,
Beno?t

  reply	other threads:[~2015-11-09 10:49 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25  0:59 [Buildroot] [PATCH v3 01/13] package/dhcp: fix SysV init scripts option passing Benoît Thébaudeau
2015-10-25  0:59 ` [Buildroot] [PATCH v3 02/13] package/dhcp: systemd: rename environment file Benoît Thébaudeau
2015-11-04  9:52   ` Maxime Hadjinlian
2015-11-04  9:54     ` Maxime Hadjinlian
2015-11-04 10:01       ` Benoît Thébaudeau
2015-11-04 10:04         ` Maxime Hadjinlian
2015-11-04 10:07           ` Benoît Thébaudeau
2015-11-04 10:13             ` Maxime Hadjinlian
2015-11-04 10:18     ` Thomas Petazzoni
2015-11-04 10:24       ` Benoît Thébaudeau
2015-11-04 10:25       ` Maxime Hadjinlian
2015-11-04 18:42       ` Gabe Evans
2015-12-24 14:00   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 03/13] package/dhcp/S80dhcp-server: support extra options Benoît Thébaudeau
2015-12-24 14:00   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 04/13] package/dhcp: systemd: " Benoît Thébaudeau
2015-11-04 10:09   ` Maxime Hadjinlian
2015-12-24 14:01   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 05/13] package/dhcp/S80dhcp-server: allow empty INTERFACES Benoît Thébaudeau
2015-12-24 14:02   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 06/13] package/dhcp: systemd: allow missing environment file Benoît Thébaudeau
2015-11-04 10:14   ` Maxime Hadjinlian
2015-12-24 14:03   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 07/13] package/dhcp: fix SysV init scripts output text Benoît Thébaudeau
2015-12-24 14:05   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 08/13] package/dhcp: remove sleep from SysV init scripts restart Benoît Thébaudeau
2015-12-24 14:06   ` Thomas Petazzoni
2015-10-25  0:59 ` [Buildroot] [PATCH v3 09/13] package/dhcp: SysV init scripts: remove PID files after stop Benoît Thébaudeau
2015-12-24 14:26   ` Thomas Petazzoni
2016-01-07 20:40     ` Benoît Thébaudeau
2015-10-25  0:59 ` [Buildroot] [PATCH v3 10/13] package/dhcp/S80dhcp-server: support IPv6 lease file Benoît Thébaudeau
2015-10-25  0:59 ` [Buildroot] [PATCH v3 11/13] package/dhcp: systemd: " Benoît Thébaudeau
2015-11-04 10:21   ` Maxime Hadjinlian
2015-11-04 10:36     ` Benoît Thébaudeau
2015-11-04 10:53       ` Maxime Hadjinlian
2015-11-04 11:15         ` Benoît Thébaudeau
2015-11-04 11:31           ` Maxime Hadjinlian
2015-11-09 10:49             ` Benoît Thébaudeau [this message]
2015-11-12 10:42               ` Maxime Hadjinlian
2015-11-15 17:55                 ` Benoît Thébaudeau
2015-10-25  0:59 ` [Buildroot] [PATCH v3 12/13] package/dhcp: SysV init scripts: refactor using functions Benoît Thébaudeau
2015-10-25  0:59 ` [Buildroot] [PATCH v3 13/13] package/dhcp: systemd: add dhcrelay service file Benoît Thébaudeau
2015-11-04 11:24   ` Maxime Hadjinlian
2015-11-04 13:35     ` Benoît Thébaudeau
2015-11-04 21:26       ` Arnout Vandecappelle
2015-11-15 17:36       ` Benoît Thébaudeau
2015-12-24 13:59 ` [Buildroot] [PATCH v3 01/13] package/dhcp: fix SysV init scripts option passing Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56407A30.1050404@wsystem.com \
    --to=benoit@wsystem.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox