dhcpcd-discuss

RE: dhcpcd-6 branched for support only

Okamoto, Koichi

Wed Nov 02 13:13:15 2016

Hi Roy,

Thank you for your comment and indications!

> 
> I'm not sure the patch is fully correct. Consider a second interface,
> 
>    Step1. dhcpcd -M -b wlan0
>    Step2. dhcpcd --exit wlan0
>    Step3. dhcpcd -M -S ip_address=192.168.XX.YY/24
>             -S routers=192.168.XX.1
>             -S domain_name_servers="192.168.XX.ZZ 192.168.XX.AA"
>             wlan0
>    Step4. dhcpcd -M -n eth0
> 
> In step 4, we don't want the options from step 3 to be applied, but I think
> your patch changes it so they will.
> 

After Step4, my patched dhcpcd-6.11.2 can work for eth0 as a DHCP client.

Step3. $ dhcpcd -M -S ip_address=192.168.33.5/24 -S routers=192.168.33.1 -S domain_name_servers="192.168.33.1 192.168.33.2" wlan0
Step4. $ dhcpcd -M -n eth0

Result
===== [omit MAC and some interfaces]
wlan1    DOWN                                   0.0.0.0/0   0x00001002
wlan0    UP                                192.168.33.5/24  0x00001043
eth0     UP                              192.168.10.100/24  0x00001043
ap0      DOWN                                   0.0.0.0/0   0x00001002
ap1      DOWN                                   0.0.0.0/0   0x00001002
lo       UP                                   127.0.0.1/8   0x00000049
=====

> The control socket will be a compilable option - it's sole reason for existance
> was to to allow starting/stopping of an interface for the master daemon.
> 
> Accepting extra options on it has been problematic since it was first
> written ...... mainly because the syntax is not powerful enough to fully turn
> off what was turned on and also introduces some potential conflicts with what
> was set earlier.
> 

That's a shocking fact. 
I am also aware of keeping turn on in case of "-M" option flag, which is saved
in dhcpcd_ctx one of member.


> For example, if dhcpcd was started with -4, should it allow a subseqent call
> with -6 to work? (ok, that's quite easy to answer, but you get the idea).
> 

My expectation is dhcpcd controls IPv4 only with "-4" option and IPv6 only
with "-6" option each command time.

> Anyway, neither the control socket nor dhcpcd.conf are going away in
> dhcpcd-7 so the reported issue still applies.
> I'm really busy with other things, so if I don't reply back in a suitable
> time-frame feel free to file a ticket here so I don't forget:
> http://roy.marples.name/projects/dhcpcd/login?g=/projects/dhcpcd/tktnew&an
> on
> 

I see, thank you for your explanations and advice.
I put the following ticket:
http://roy.marples.name/projects/dhcpcd/tktview?name=b2cd9cb536

Best Regards,
Koichi Okamoto

References:
dhcpcd-6 branched for support onlyRoy Marples
Re: dhcpcd-6 branched for support onlyRoy Marples
Archive administrator: postmaster@marples.name