Skip to content

Commit 1b7fd90

Browse files
tlancinaimhoffd
authored andcommitted
fix(serve): ignore link-local addresses (#3761)
1 parent 16360af commit 1b7fd90

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/ionic/src/lib/serve.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ export abstract class ServeRunner<T extends ServeOptions> implements Runner<T, S
326326
let chosenIP = options.address;
327327

328328
if (options.address === BIND_ALL_ADDRESS) {
329-
availableInterfaces = getExternalIPv4Interfaces();
329+
// ignore link-local addresses
330+
availableInterfaces = getExternalIPv4Interfaces().filter(i => !i.address.startsWith('169.254'));
330331

331332
if (availableInterfaces.length === 0) {
332333
if (options.externalAddressRequired) {

0 commit comments

Comments
 (0)