dhcpcd-discuss

Re: dhcpcd ticket 5e9661e84e

Philipp Gesang

Tue Jan 24 16:15:36 2017

-<| Quoting Philipp Gesang <philipp.gesang@xxxxxxxxxxxxx>, on Tuesday, 2017-01-24 11:40:39 |>-
> > >> As you even went out of your way to supply a patch, it implies this is a
> > >> behavior you want. This is not the way dhcpcd has been designed (it's
> > >> been designed to share the same IP on different interfaces and only have
> > >> one "active"), so it's probably best to move it to a new option.
> > > 
> > > Sounds reasonable. (Though you might run out of option bits in
> > > the process.)
> > 
> > I'm painfully aware I'm near the limit .....
> 
> Still one bit left! I’ll revise the patch to make this into an
> option and resubmit.

Fyi I decided against this since the other patch already
sufficiently covers our use case. I’d prefer the behavior to be
documented, e. g.

    diff --git a/dhcpcd.8.in b/dhcpcd.8.in
    index 6fccbdc..4c9fc4a 100644
    --- a/dhcpcd.8.in
    +++ b/dhcpcd.8.in
    @@ -193,6 +193,11 @@ To force starting in Master mode with only one interface, the
     .Fl M , Fl Fl master
     option can be used.
     .Pp
    +Note that when active on a single interface or a list of interfaces,
    +.Nm
    +will still affect interfaces not specified to prevent conflicts of a lease
    +with their configuration.
    +.Pp
     Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric.
     For systems that support route metrics, each route will be tagged with the
     metric, otherwise

With that I think the issue can be closed.

> > > I’ll attach the working draft of the patch for b). Note that I
> > > lack familiarity with dhcpcd’s code base so this is likely to be
> > > incomplete. My tests were mainly performed by sniffing Netlink
> > > for events caused by dhcpcd: With the patch applied it is all
> > > silent which is exactly what I need.
> > 
> > It is incomplete - there are no IPv6 alterations nor man page adjustments.

I’ll happily add the description to the man page though I would
like some more feedback first. Above all regarding whether you
plan on incorporating the feature at all ;)

> Indeed. The DHCP server and client used for testing don’t have
> CONFIG_IPV6 defined. (Don’t ask.) Considering that the IPv6
> handling is structured rather differently, I don’t think I’m in a
> good position to extend the patch in that direction.
> 
> I will prepare a v2 patch that addresses the other points.

> > Also, you may wish to consider that dhcpcd may adjust sysctl values to
> > suit (for example disabling IPv6 RA handling in the kernel). I don't
> > know how that affects your use case.
> 
> Regarding IPv4 this appears to be relevant for Linux only so I
> added code that intercepts it in the platform specific part.
> 
> I also hadn’t noticed dhcpcd sets the link MTU via conventional
> ioctl() so I prevented that as well.

The second version covers mtu and promote_secondaries.

Best,
Philipp

Attachment: signature.asc
Description: PGP signature


References:
Re: dhcpcd ticket 5e9661e84eRoy Marples
Re: dhcpcd ticket 5e9661e84ePhilipp Gesang
Archive administrator: postmaster@marples.name