@@ -648,15 +648,18 @@ String DNSGetIPStr(uint32_t idx)
648648
649649//
650650#include " lwip/dns.h"
651+ #include " esp_netif_net_stack.h"
651652void WifiDumpAddressesIPv6 (void )
652653{
653654 for (netif* intf = netif_list; intf != nullptr ; intf = intf->next ) {
654- if (!ip_addr_isany_val (intf->ip_addr )) AddLog (LOG_LEVEL_DEBUG , " WIF: '%c%c%i' IPv4 %s" , intf->name [0 ], intf->name [1 ], intf->num , IPAddress (&intf->ip_addr ).toString (true ).c_str ());
655+ esp_netif_t *esp_netif = esp_netif_get_handle_from_netif_impl (intf);
656+ int32_t route_prio = esp_netif ? esp_netif_get_route_prio (esp_netif) : -1 ;
657+ if (!ip_addr_isany_val (intf->ip_addr )) AddLog (LOG_LEVEL_DEBUG , " WIF: '%c%c%i' IPv4 %s (%i)" , intf->name [0 ], intf->name [1 ], intf->num , IPAddress (&intf->ip_addr ).toString (true ).c_str (), route_prio);
655658 for (uint32_t i = 0 ; i < LWIP_IPV6_NUM_ADDRESSES ; i++) {
656659 if (!ip_addr_isany_val (intf->ip6_addr [i]))
657- AddLog (LOG_LEVEL_DEBUG , " IP : '%c%c%i' IPv6 %s %s" , intf->name [0 ], intf->name [1 ], intf->num ,
660+ AddLog (LOG_LEVEL_DEBUG , " IP : '%c%c%i' IPv6 %s %s (%i) " , intf->name [0 ], intf->name [1 ], intf->num ,
658661 IPAddress (&intf->ip6_addr [i]).toString (true ).c_str (),
659- ip_addr_islinklocal (&intf->ip6_addr [i]) ? " local" : " " );
662+ ip_addr_islinklocal (&intf->ip6_addr [i]) ? " local" : " " , route_prio );
660663 }
661664 }
662665 AddLog (LOG_LEVEL_DEBUG , " IP : DNS: %s %s" , IPAddress (dns_getserver (0 )).toString ().c_str (), IPAddress (dns_getserver (1 )).toString (true ).c_str ());
0 commit comments