-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
fix(netbios): Return interface address for NetBIOS name lookup #9885
Conversation
👋 Hello earlephilhower, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
When NetBIOS returns a match, it should return the IP address of the device. Presently, however, it returns the address of multicast IP for the subnet since the incoming NBNS packet's UDP target will be multicast (i.e. 192.168.1.255). Iterate over the active network interfaces and check netmasks to determine where the packet came from, and return the appropriate IP interface address instead.
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Test Results 56 files 56 suites 5m 16s ⏱️ Results for commit 9832cfd. ♻️ This comment has been updated with latest results. |
Tested Working! |
Description of Change
When NetBIOS returns a match, it should return the IP address of the device. Presently, however, it returns the address of multicast IP for the subnet since the incoming NBNS packet's UDP target will be multicast (i.e. 192.168.1.255).
Iterate over the active network interfaces and check netmasks to determine where the packet came from, and return the appropriate IP interface address instead.
Tests scenarios
Without this change, the address returned for NetBIOS lookups is the multicast
udpPacket
address:With this patch, the actual device address is returned