Skip to content

Commit

Permalink
fix: response records with link-local addresses from non link-local n…
Browse files Browse the repository at this point in the history
…etwork interfaces are ignored
  • Loading branch information
amydevs committed Oct 16, 2023
1 parent ba68fb1 commit cd63a41
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/MDNS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,13 @@ class MDNS {
partialService.hosts = [];
}
let host = responseRecord.data;
if (host.startsWith('fe80:') && remoteNetworkInterfaceIndex != null) {
host = `${host}%${remoteNetworkInterfaceIndex}` as Host;
if (host.startsWith('fe80')) {
if (remoteNetworkInterfaceIndex != null) {
host = `${host}%${remoteNetworkInterfaceIndex}` as Host;
}
else {
continue;
}
}
partialService.hosts.push(host);
}
Expand Down

0 comments on commit cd63a41

Please sign in to comment.