Re: Arping Bug
Piers O'Hanlon
Mon Dec 05 15:40:29 2016
Hi again,
It seems that there’s still issues with my fix below as dhcp_arp_probed() then fails to function normally, as does dhcp_arp_conflicted(). So one could add state->arping_index++ just before dhcpcd_startinterface() is called in both functions.
Best,
Piers
> On 2 Dec 2016, at 11:03, Piers O'Hanlon <p.ohanlon@xxxxxxxxx> wrote:
>
> 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
>
Archive administrator: postmaster@marples.name