[Gratuitous ARP] Check that IF has both LINK_UP and UP flags

See this comment and further discussion in the issue:
https://github.com/xoseperez/espurna/pull/1877#issuecomment-525597314

Use the same condition as esp-lwip.
This commit is contained in:
Maxim Prokhorov
2019-08-30 03:37:31 +03:00
parent eb3cc6cd84
commit 72483fac87
+1 -1
View File
@@ -946,7 +946,7 @@ void sendGratuitousARP() {
while (n) {
if ((n->hwaddr_len == ETH_HWADDR_LEN) &&
(n->flags & NETIF_FLAG_ETHARP) &&
((n->flags & NETIF_FLAG_LINK_UP) || (n->flags & NETIF_FLAG_UP))) {
((n->flags & NETIF_FLAG_LINK_UP) && (n->flags & NETIF_FLAG_UP))) {
#ifdef ESP32
etharp_gratuitous_r(n);
#else