dhcpcd-discuss

Re: [dhcpcd-6.9.2] share these resources leak issues patch

Roy Marples

Wed Jul 27 16:52:38 2016

Hi

On 27/07/2016 13:18, Okamoto, Koichi wrote:
> I am trying to update dhcpcd-6.11.1 from 6.9.2 so that I can use
6.11.2 short term
> when you will release dhcpcd-6.11.2.
>
> However I met one issue which always remained in waiting for carrier
condition.
>
> The attached patch
(0001-Candidated-modification-way-to-meet-our-operation.patch)
> can resolve this issue.
>
> If possible, could you give me your advice whether it is reasonable
modification?
>
> I try to explain what I would like to do with some assumption.
>
> [Background]
> As the cause of issue may be not appropriate our operation, we have to
control
> dhcpcd functionality with master mode which always stays in one
process during
> CPU on.
>
> In addition, we have to choose network interface one by one with
master mode.
> (Network interface are changed according to our system condition)
>
> To realize the above on dhcpcd-6.9.2, the following way is adopted:
>
> 1. First start up time
>    $ dhcpcd -M -b <network node name, e.g) eth0>
>    $ dhcpcd --exit <same as the above network node name, e.g) eth0>
>    Please note that we need only daemonised dhcpcd one process without
DHCP function
>
> 2. When DHCP function is needed
>    $ dhcpcd -M -b <network node name, e.g) eth0>
>
>
> 3. When DHCP function isn't needed
>    $ dhcpcd --exit <same as the above no.2 network node name, e.g) eth0>
>
> Repeat No.2 and No.3 accordingly. When CPU turns off, "$ dhcpcd
--exit" performs.

I could not replicate this at all, at least, not on NetBSD. Which OS are
you using?

Also, I dislike the way you want to start dhcpcd .... it's not clean!
So I made this patch to add an --inactive option:
http://roy.marples.name/projects/dhcpcd/info/6e2698370eaa3aad

So you can do this:
# Start dhcpcd in master mode, but waiting for our instruction
# to start each interface.
dhcpcd -M -b --inactive

# Start iwn0
dhcpcd -n iwn0

# Wait some time
# We could use dhcpcd-online(8) instead
sleep 10

# Release all addresses from iwn0
dhcpcd -k iwn0

# Restart
dhcpcd -n iwn0

Hope this helps!

Roy

Follow-Ups:
RE: [dhcpcd-6.9.2] share these resources leak issues patchOkamoto, Koichi
RE: [dhcpcd-6.9.2] share these resources leak issues patchOkamoto, Koichi
RE: [dhcpcd-6.9.2] share these resources leak issues patchOkamoto, Koichi
References:
[dhcpcd-6.9.2] share these resources leak issues patchOkamoto, Koichi
Re: [dhcpcd-6.9.2] share these resources leak issues patchRoy Marples
RE: [dhcpcd-6.9.2] share these resources leak issues patchOkamoto, Koichi
Re: [dhcpcd-6.9.2] share these resources leak issues patchRoy Marples
RE: [dhcpcd-6.9.2] share these resources leak issues patchOkamoto, Koichi
Archive administrator: postmaster@marples.name