-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARP frames are never set unreachable #502
Comments
@jelledevleeschouwer Is this something you can take a look at? |
Seems like it has something to do with DNS: |
@jelledevleeschouwer @danielinux DNS query causes an ARP requirement, but when there is no incoming ARP communication, the frame and allocated buffer isn't discarded (as the ARP has been postponed, but the 'pico_arp_queued_trigger' is never called). I keep trying the DNS query, so the memory is 'empty' very fast. |
@ThomasNauwelaerts, are you really sure that is your problem and not the postpone itself? I see something fishy in the |
@jelledevleeschouwer, I had a quick look at the solution you provided. I think it should work, but I'm unable to test this at the moment, sorry. I added 'PICO_MAX_FAILURE_COUNT', to make this max count more safe. |
In 'pico_arp_retry' in the file pico_arp.c, failure_count is being checked to be lower than 4.
Even when the ARP address is unreachable, the failure_count is never greater than 1 (after adding 1..). Seems like the code 'forgets' the failure_count and restarts again and again.
Also, in this process, memory is being leaked.
Extra info:
I'm printing the debug and this is the result when failing:
[Wed Oct 23 10:24:04.771 2019] Allocated buffer @20016630, len= 93 caller: 00000000
[Wed Oct 23 10:24:04.771 2019] DEBUG MEMORY: 114 frames in use.
[Wed Oct 23 10:24:04.771 2019] ================= ARP REQUIRED: 1 =============
[Wed Oct 23 10:24:04.771 2019]
[Wed Oct 23 10:24:04.771 2019] Allocated buffer @20016728, len= 42 caller: 00000000
[Wed Oct 23 10:24:04.787 2019] DEBUG MEMORY: 115 frames in use.
[Wed Oct 23 10:24:04.787 2019] QUERY: 0300000a
[Wed Oct 23 10:24:04.787 2019] Sending arp request.
[Wed Oct 23 10:24:04.787 2019] Discarded buffer @20016728, caller: 00000000
[Wed Oct 23 10:24:04.787 2019] DEBUG MEMORY: 114 frames in use.
Allocated buffer @20016630 is never discarded. As you can see, at the time of this print, there were already 114 frames allocated.
The text was updated successfully, but these errors were encountered: