mirror of
https://github.com/openwrt/luci.git
synced 2025-07-24 10:42:02 +00:00
Returning a device via getDevice() doesn't work out for tunnel configs,
like wireguard-wg0. Its dev property (for determining dev.getType()) is
always empty, but device is 'wireguard-wg0' and network is 'wg0'.
getDevice() returns an instantiated prototype which is not up, defeating
the purpose of querying its 'up' status.
When dealing with firewall zones and device widgets, what's interesting
is the dev. And getL3Device() is intended for this.
This effectively reverts commit f17ae7fd96
which attempted to address the problem of 'up' status; now calls via
getL3Device() get the correct up status.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>