Skip to content

Commit

Permalink
Add default route on Raspbian in AP mode. (#2040)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstegeman authored and dhylands committed Jul 24, 2019
1 parent d5d9045 commit e8036d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/platforms/linux-raspbian.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,15 @@ function setWirelessMode(enabled, mode = 'ap', options = {}) {
if (proc.status !== 0) {
return false;
}

if (mode === 'ap') {
// set up a default route when running in AP mode. ignore errors here and
// just try to move on.
child_process.spawnSync(
'sudo',
['ip', 'route', 'add', 'default', 'via', options.ipaddr, 'dev', 'wlan0']
);
}
}

return true;
Expand Down

0 comments on commit e8036d0

Please sign in to comment.