Skip to content

Commit

Permalink
fix(serve): ignore link-local addresses (#3761)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina authored and imhoffd committed Nov 27, 2018
1 parent 16360af commit 1b7fd90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ionic/src/lib/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ export abstract class ServeRunner<T extends ServeOptions> implements Runner<T, S
let chosenIP = options.address;

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

if (availableInterfaces.length === 0) {
if (options.externalAddressRequired) {
Expand Down

0 comments on commit 1b7fd90

Please sign in to comment.