Advanced networking wan static fix (#976)

* Fix WAN static setup after using advancednetwork
This commit is contained in:
Tim Wilkinson 2023-12-06 12:21:52 -08:00 committed by GitHub
parent 09ed681311
commit da8ef31dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 10 deletions

View File

@ -197,20 +197,14 @@ function write_user_config(config, variables)
f:write("\toption ipaddr '<" .. network .. "_ip>'\n")
f:write("\toption netmask '255.0.0.0'\n")
else
if variables[network .. "_proto"] and variables[network .. "_proto"] ~= "" then
f:write("\toption proto '<" .. network .. "_proto>'\n")
end
if variables[network .. "_ip"] and variables[network .. "_ip"] ~= "" then
f:write("\toption ipaddr '<" .. network .. "_ip>'\n")
end
if variables[network .. "_mask"] and variables[network .. "_mask"] ~= "" then
f:write("\toption netmask '<" .. network .. "_mask>'\n")
end
f:write("\toption proto '<" .. network .. "_proto>'\n")
f:write("\toption ipaddr '<" .. network .. "_ip>'\n")
f:write("\toption netmask '<" .. network .. "_mask>'\n")
end
if network == "lan" then
f:write("\toption dns '<wan_dns1> <wan_dns2>'\n")
end
if network == "wan" and variables.wan_gw and variables.wan_gw ~= "" then
if network == "wan" then
f:write("\toption gateway '<wan_gw>'\n")
end
f:close()