cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
11.16k stars 2.73k forks source link

ARP lookup fails when connection peer is the gateway #2857

Closed jstanzel closed 3 months ago

jstanzel commented 3 months ago

When trying to do an HTTP request to an IP that is the current gateway IP, the ARP lookup will always fail (timeout) because the connection peer matching is in an else clause after the gateway equality check in rx_arp() (line 357 in net_builtin.c). I can confirm that the easiest fix (commenting out the else, so that the peer check is always done) works fine.

Environment

scaprile commented 3 months ago

Thank you, but the else is there for a reason. So, to clarify, your scenario is:

jstanzel commented 3 months ago

Of course, that's why it wasn't necessarily a suggestion, merely a data point stating what I've already tried and tested :-) The scenario is: