dhcpcd-discuss

Re: Arping Bug

Piers O'Hanlon

Fri Dec 02 11:04:07 2016

Hi Roy,

Thanks for verifying the issue. I had another look this appears to fix the assert:
http://roy.marples.name/projects/dhcpcd/artifact/d0ced6943d15bffcd8415b37d092504dc1e923f1?txt=1&ln=1993
  1993  	if (state->arping_index < ifo->arping_len) {
Update:
  1993  	if (state->arping_index <= ifo->arping_len) {

Best,

Piers

> On 1 Dec 2016, at 22:47, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> 
> Hi Piers
> 
> On 30/11/16 14:01, Piers O'Hanlon wrote:
>> I’ve been looking at the dhcpcd codebase and I appear to have come across a bug: The code in dhcp.c is currently skipping the last or only arping entry as it increments the index counter before sending the ARP Probe out (from Artifact d0ced6943d15bffcd8415b37d092504dc1e923f1):
>> dhcp.c:1997   		if (++state->arping_index < ifo->arping_len) {
>> The fix appears to be simple (unless I’m missing something):
>> dhcp.c:1997   		if (state->arping_index++ < ifo->arping_len) {
> 
> It's not quite that simple :)
> assertions trigger.
> I am looking into a fix.
> If I don't respond in a suitable timeframe, please file a ticket on the
> project page.
> 
> Roy


Follow-Ups:
Re: Arping BugPiers O'Hanlon
References:
Arping BugPiers O'Hanlon
Re: Arping BugRoy Marples
Archive administrator: postmaster@marples.name