Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-01-27 Thread Christos Zoulas
Thanks. Yes, I have the core-dump, no we should not remove the line...

Best,

christos

> On Jan 27, 2020, at 8:03 AM, Roy Marples  wrote:
> 
> On 27/01/2020 09:03, Roy Marples wrote:
>> On 26/01/2020 22:57, Christos Zoulas wrote:
>>> Module Name:src
>>> Committed By:christos
>>> Date:Sun Jan 26 22:57:52 UTC 2020
>>> 
>>> Modified Files:
>>> src/external/bsd/dhcpcd/dist/src: script.c
>>> 
>>> Log Message:
>>> prevent coredump when state == NULL
>>> 
>>> 
>>> To generate a diff of this commit:
>>> cvs rdiff -u -r1.1.1.12 -r1.2 src/external/bsd/dhcpcd/dist/src/script.c
>> A quick perusal through the code shows that this should not happen. Every 
>> time IPV4LL is given as a reason, the state should exist.
> 
> There is one code path where there may be no state  when an IPv4LL 
> address exists and dhcpcd no longer controlls it (ie dhcpcd restarted or a 
> 3rd party added it) then we delete it anyway (for say when we obtain a DHCP 
> address).
> We should still run the IPV4LL hook script, but it will be empty.
> 
> I've accepted this patch upstream.
> 
> Roy



signature.asc
Description: Message signed with OpenPGP


Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-01-27 Thread Roy Marples

On 27/01/2020 09:03, Roy Marples wrote:

On 26/01/2020 22:57, Christos Zoulas wrote:

Module Name:    src
Committed By:    christos
Date:    Sun Jan 26 22:57:52 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/src: script.c

Log Message:
prevent coredump when state == NULL


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.2 src/external/bsd/dhcpcd/dist/src/script.c


A quick perusal through the code shows that this should not happen. Every time 
IPV4LL is given as a reason, the state should exist.


There is one code path where there may be no state  when an IPv4LL address 
exists and dhcpcd no longer controlls it (ie dhcpcd restarted or a 3rd party 
added it) then we delete it anyway (for say when we obtain a DHCP address).

We should still run the IPV4LL hook script, but it will be empty.

I've accepted this patch upstream.

Roy


Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-01-27 Thread Roy Marples

On 26/01/2020 22:57, Christos Zoulas wrote:

Module Name:src
Committed By:   christos
Date:   Sun Jan 26 22:57:52 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/src: script.c

Log Message:
prevent coredump when state == NULL


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.2 src/external/bsd/dhcpcd/dist/src/script.c


A quick perusal through the code shows that this should not happen. Every time 
IPV4LL is given as a reason, the state should exist.
If there really is no state then the script should not be called at all - we 
wouldn't want to pass the error down to dhcpcd listeners who would expect either 
an old address or new address to be present.


Hopefully you still have the coredump so this can be analysed more?

Should we also remove this line fromm 3RDPARTY?
http://anonhg.netbsd.org/src/file/tip/doc/3RDPARTY#l340

Roy