File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,13 @@ void LWIP::Interface::netif_status_irq(struct netif *netif)
227
227
228
228
if (interface->has_addr_state & HAS_ANY_ADDR) {
229
229
interface->connected = NSAPI_STATUS_GLOBAL_UP;
230
+ #if LWIP_IPV6
231
+ if (ip_addr_islinklocal (get_ipv6_addr (netif))) {
232
+ interface->connected = NSAPI_STATUS_LOCAL_UP;
233
+ }
234
+ #endif
230
235
}
236
+
231
237
} else if (!netif_is_up (&interface->netif ) && netif_is_link_up (&interface->netif )) {
232
238
interface->connected = NSAPI_STATUS_DISCONNECTED;
233
239
}
Original file line number Diff line number Diff line change @@ -92,6 +92,12 @@ const ip_addr_t *LWIP::get_ipv6_addr(const struct netif *netif)
92
92
return netif_ip_addr6 (netif, i);
93
93
}
94
94
}
95
+
96
+ for (int i = 0 ; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
97
+ if (ip6_addr_isvalid (netif_ip6_addr_state (netif, i))) {
98
+ return netif_ip_addr6 (netif, i);
99
+ }
100
+ }
95
101
#endif
96
102
return NULL ;
97
103
}
You can’t perform that action at this time.
0 commit comments