up upnp 修复不能自动更新IP问题。

This commit is contained in:
SirPdboy 2023-02-26 14:43:24 +08:00 committed by GitHub
parent 8f99e9ed5c
commit e30b58020b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,6 @@
-- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local uci = require 'luci.model.uci'.cursor()
local gateip="http://"..uci:get_first('network', 'lan', 'ipaddr')
require("luci.tools.webadmin")
m = Map("upnpd", luci.util.pcdata(translate("Universal Plug & Play")),
translate("UPnP allows clients in the local network to automatically configure the router."))
@ -45,7 +44,7 @@ s:taboption("general", Flag, "igdv1", translate("Enable IGDv1 mode"),
translate("Advertise as IGDv1 device instead of IGDv2")).default = "1"
pu = s:taboption("general", Value, "presentation_url", translate("Presentation URL"))
pu..default=gateip
pu.default = "http://" .. uci:get('network', 'lan', 'ipaddr')
s:taboption("general", Flag, "log_output", translate("Enable additional logging"),
translate("Puts extra debugging information into the system log"))