dhcpcd-discuss

Re: dhcpcd 6.11.3 core dumps on FreeBSD with link disconnect/connect sequence

Guy Yur

Tue Aug 30 17:47:56 2016

Hi Roy,

On Tue, Aug 30, 2016 at 7:47 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> Hi Guy
>
> On 27/08/2016 11:57, Guy Yur wrote:
>> dhcpcd 6.11.3 crashed on my machine running FreeBSD during a
>> link disconnect/connect sequence.
>>
>> I was able to replicate the crash with the following sequence:
>> ifconfig lan0 down
>> disconnect link
>> ifconfig lan0 up
>>
>> ... (trimmed)
>
> The attached patch should resolve it.
> I have a techincal issue with my FreeBSD image right now so can't test
> it directly, but will memory test it on Linux later as the code path is
> similar.
>
> Let me know if it works for you!
>
> Roy

dhcpcd with the patch no longer crashes on the above sequence.

What should happen to the IPv4 address when the interface
goes down or when the link is lost?

Before the patch,
1. ifconfig lan0 down
ifconfig lan0 -> ipv4 address from dhcp was removed
2. ifconfig lan0 up
ifconfig lan0 -> ipv4 address from dhcp was not restored (waited one minute)

1. link disconnected on lan0
ifconfig lan0 -> ipv4 address from dhcp was removed
2. link reconnected on lan0
ifconfig lan0 -> ipv4 address from dhcp was added after a few seconds


After the patch,
1. ifconfig lan0 down
ifconfig lan0 -> ipv4 address from dhcp was not removed
2. ifconfig lan0 up

1. link disconnected on lan0
ifconfig lan0 -> ipv4 address from dhcp was not removed
2. link reconnected on lan0


Thanks,
Guy

Follow-Ups:
Re: dhcpcd 6.11.3 core dumps on FreeBSD with link disconnect/connect sequenceRoy Marples
References:
dhcpcd 6.11.3 core dumps on FreeBSD with link disconnect/connect sequenceGuy Yur
Re: dhcpcd 6.11.3 core dumps on FreeBSD with link disconnect/connect sequenceRoy Marples
Archive administrator: postmaster@marples.name