Skip to content

Commit

Permalink
server: filter link local addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 27, 2023
1 parent 3fce083 commit 4246e3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions server/src/services/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export class AddressSettings {
const nif = networkInterfaces[addressOrInterface];
if (!raw && nif) {
for (const addr of nif) {
if (!addr.address || addr.address.startsWith('169.254.') || addr.address.toLowerCase().startsWith('fe80:'))
continue;
ret.push(addr.address);
}
}
Expand Down

0 comments on commit 4246e3c

Please sign in to comment.