mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Use current netif address in NetBIOS response (#8622)
* fix 8139 netbios in AP mode * take the current if addr * handle enabled ipv6 Co-authored-by: pablo <pablomartikian@hotmail.com>
This commit is contained in:
parent
678a477559
commit
a2c8a63360
@ -212,8 +212,7 @@ void ESP8266NetBIOS::_recv(udp_pcb *upcb, pbuf *pb, const ip_addr_t *addr, uint1
|
||||
nbnsa.NBNSA_TIMETOLIVE = LWIP_PLATFORM_HTONL(300000UL);// Time to live (30000 sekund)
|
||||
nbnsa.NBNSA_LENGTH = LWIP_PLATFORM_HTONS(6);
|
||||
nbnsa.NBNSA_NODEFLAGS = LWIP_PLATFORM_HTONS(0);
|
||||
nbnsa.NBNSA_NODEADDRESS = WiFi.localIP(); // ulozime nasi IP adresu
|
||||
|
||||
nbnsa.NBNSA_NODEADDRESS = ip_addr_get_ip4_u32(&ip_current_netif()->ip_addr);
|
||||
pbuf* pbt = pbuf_alloc(PBUF_TRANSPORT, sizeof(nbnsa), PBUF_RAM);
|
||||
if(pbt != NULL) {
|
||||
uint8_t* dst = reinterpret_cast<uint8_t*>(pbt->payload);
|
||||
|
Loading…
x
Reference in New Issue
Block a user