Skip to content

fix(netbios): Return interface address for NetBIOS name lookup #9885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci(pre-commit): Apply automatic fixes
  • Loading branch information
pre-commit-ci-lite[bot] authored Jun 18, 2024
commit 9832cfd258aa708008915249490b5e357823b36e
4 changes: 2 additions & 2 deletions libraries/NetBIOS/src/NetBIOS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <functional>
extern "C" {
#include <lwip/netif.h>
}; // extern "C"
}; // extern "C"

#define NBNS_PORT 137
#define NBNS_MAX_HOSTNAME_LEN 32
Expand Down Expand Up @@ -94,7 +94,7 @@ void NetBIOS::_onPacket(AsyncUDPPacket &packet) {
append_32((void *)&nbnsa.ttl, 300000);
append_16((void *)&nbnsa.data_len, 6);
append_16((void *)&nbnsa.flags, 0);
nbnsa.addr = packet.localIP(); // By default, should be overridden below
nbnsa.addr = packet.localIP(); // By default, should be overridden below
// Iterate over all netifs, see if the incoming address matches one of the netmaskes networks
for (auto netif = netif_list; netif; netif = netif->next) {
auto maskedip = ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif));
Expand Down
Loading