summaryrefslogtreecommitdiffhomepage
path: root/app/lib/backend.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-02-22 18:54:56 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-02-22 18:54:56 +0000
commitb357e668d82d9f002d8145c394b72bc593db3582 (patch)
tree41dc02b6ac4bec06cb32229a7fe208e6a0454042 /app/lib/backend.js
parentbeeebb46ac593f3d4c972fba537718aef5c5495b (diff)
downloadmullvadvpn-b357e668d82d9f002d8145c394b72bc593db3582.tar.xz
mullvadvpn-b357e668d82d9f002d8145c394b72bc593db3582.zip
Avoid 0 when generating IP
Diffstat (limited to 'app/lib/backend.js')
-rw-r--r--app/lib/backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js
index 095f1a9eba..73be82df75 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -108,7 +108,7 @@ export default class Backend extends EventEmitter {
refreshIp() {
let ip = [];
for(let i = 0; i < 4; i++) {
- ip.push(parseInt(Math.random() * 254));
+ ip.push(parseInt(Math.random() * 253 + 1));
}
this.emit(EventType.updatedIp, ip.join('.'));
}