Re: Late start for IPv6
Jouke Witteveen
Thu May 29 10:38:49 2014
On Thu, May 29, 2014 at 9:13 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> On 27/05/2014 21:06, Jouke Witteveen wrote:
>>>
>>> I've been thinking that maybe we're over thinking this and drop the
>>> --per-protocol idea to make -4 and -6 protocol exclusive anyway.
>>
>>
>> I don't know why this was overlooked earlier, but indeed it makes a
>> lot of sense! You do need `-x -4` and `-x -6` functionality and decide
>> what `-x` would do when two instances are running. When a `-6`
>> instance is running, a "two prototcols, one instance"-instance should
>> not be able to start. Also `-4 -6` could come to mean "start both, but
>> as two instances". Just a few thoughts. Anyway, I don't see why `-4`
>> and `-6` would not use different pid files.
>
>
> Attached is a patch that enables this.
> If started with -4 $int, or -6 $int, any subsequent call to dhcpcd to
> rebind, reconfigure or exit must contain the same restrictive flags.
> This is now documented. I don't really want to add too much code for this,
> as it's entirely an operator decision and we should (although probably
> incorrectly) the operator has a brain.
>
> Although `dhcpcd -x $int` would stop -4 and -6 in the perfect world, dhcpcd
> doesn't check for existing per interface instances when starting in master
> mode so I'm not too bothered right now.
>
> Everyone happy with this?
>
After a quick inspection I only see a possible issue with
- char pidfile[sizeof(PIDFILE) + IF_NAMESIZE];
+ char pidfile[sizeof(PIDFILE) + IF_NAMESIZE + 1];
You probably want "+ 2", as you also write a dash. The rest looks good to me.
- Jouke
Archive administrator: postmaster@marples.name