Skip to content

Commit

Permalink
Fix crash if DHCP does not return a gateway
Browse files Browse the repository at this point in the history
Signed-off-by: Stefano Babic <[email protected]>
  • Loading branch information
sbabic committed Sep 25, 2018
1 parent 575b212 commit a2d22a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SWUpdateGUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ end
function loadnetinterfaces()
local runintf = sw:ipv4()
local gw = getgatewayip()

runintf[INTF_GATEWAY] = gw .. " 0.0.0.0"

if gw then
runintf[INTF_GATEWAY] = gw .. " 0.0.0.0"
end

if NETWORK_INTERFACES then
for cnt=1, #NETWORK_INTERFACES do
Expand Down

0 comments on commit a2d22a1

Please sign in to comment.