mirror of https://github.com/hak5/openwrt.git
base-files: utilize uci_get_state to read the previous dhcp router address in udhcpc default script. The setup_switch() procedure provided by swconfig calls config_load() during network restart and thus confuses udhcpc's uci state keeping resulting in a missing default route on each second network restart. Bypass the cached state vars and query uci directly to make the script immune against unwanted runtime changes.
SVN-Revision: 23211lede-17.01
parent
7eb2c8959c
commit
0fda5f7507
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=56
|
||||
PKG_RELEASE:=57
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
PKG_BUILD_DEPENDS:=opkg/host
|
||||
|
|
|
@ -41,8 +41,8 @@ setup_interface () {
|
|||
# Default Route
|
||||
[ -n "$ifc" ] && {
|
||||
change_state network "$ifc" lease_gateway "$router"
|
||||
config_get old_router "$ifc" gateway
|
||||
user_router=$(uci_get "network.$ifc.gateway")
|
||||
old_router="$(uci_get_state network "$ifc" gateway)"
|
||||
user_router="$(uci_get network "$ifc" gateway)"
|
||||
[ -n "$user_router" ] && router="$user_router"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue