Compare commits

...

31 Commits

Author SHA1 Message Date
Robin Stjerndorff
9ad0074feb ice-client: update to 5.1.9 2018-08-22 09:46:56 +02:00
Reidar Cederqvist
686d0136d7 inteno-netmodes: fix so that wet interface is brought down refs #15267 2018-06-11 14:03:39 +02:00
Reidar Cederqvist
2a1bd9f5fe inteno-netmodes: trigger a reload of icwmp hotplug iface script 2018-06-05 12:43:15 +02:00
Reidar Cederqvist
bf43c42979 icwmp & inteno-netmodes: dont reload icwmp if netmode-conf is running 2018-06-04 16:31:03 +02:00
Reidar Cederqvist
202bc9e3a0 icwmp: fix hotplug iface script (check device and restart) 2018-06-04 09:38:17 +02:00
Reidar Cederqvist
44c2a71e5d icwmp: install hotplug.d iface script 2018-05-29 15:43:05 +02:00
Reidar Cederqvist
658c4fb2c4 inteno-netmodes: libexec script can't run scripts in background fixed by extra-script
by starting a script that starts netmode-conf in the background refs #14901
2018-05-09 11:37:09 +02:00
Reidar Cederqvist
f5ffbc4b1f Update feed [ feed_inteno_packages ] package [ inteno-netmodes ]
-------------------------------------------------------------------------------
* fbd7dcf netmode: config: config_compare_wet: fix band comparison refs #14918 refs #14919 refs #14920
* 81f444e netmode: config: config_compare_wet: log the change for the wet interface
* acf96c5 fix some text in comments
* e43701f zero-out the buffer before initializing it
* b898924 ubus call netmode sync: make the call reentrant by adding a mutex
* bd47286 add ubus sync method: push credentials to all registered repeaters
* dfc2c63 netmoded: do not compare network for local ifaces refs #14339
-------------------------------------------------------------------------------
commit fbd7dcfab03df19b3c32675940e0aee708c7cf75
Author: Ionuț-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-05-07 14:17:55 +0200

    netmode: config: config_compare_wet: fix band comparison refs #14918 refs
    #14919 refs #14920

Base directory -> /
 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 81f444ef9c914d49c2896229e205302d449ecc24
Author: Ionuț-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-05-07 14:16:12 +0200

    netmode: config: config_compare_wet: log the change for the wet interface

Base directory -> /
 config.c | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
commit acf96c5272c763c355cda5f168de091f536b8ac7
Author: Ionuț-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-05-07 14:14:02 +0200

    fix some text in comments

Base directory -> /
 config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit e43701f76ba2a8699df797d88fffc3895a3bfeb8
Author: Ionuț-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-04-19 12:29:33 +0200

    zero-out the buffer before initializing it

Base directory -> /
 netmoded.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit b898924491c378ca09ab124991b27f54a336e4e9
Author: Ionut-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-03-02 15:34:22 +0100

    ubus call netmode sync: make the call reentrant by adding a mutex

    	if this ubus call is issued twice at the same time,
    only one will do the actual work and the other one will return with
    an error.

    	Can be tested with:
    	while true ; do ubus call netmode sync & done
    Most of the calls will fail
    (Done with return code 9 == UBUS_STATUS_UNKNOWN_ERROR),
    but still the maximum (continuosly) possible will run.

Base directory -> /
 netmoded.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit bd472860ff1fe71ebd066813dcebe8fd99553747
Author: Ionut-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-03-02 14:26:59 +0100

    add ubus sync method: push credentials to all registered repeaters

Base directory -> /
 netmoded.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit dfc2c634122f2b2eb9aad12125aa8d08fdf9e20a
Author: Ionut-Alex Oprea <ionutalexoprea@gmail.com>
Date: 2018-03-01 11:19:07 +0100

    netmoded: do not compare network for local ifaces refs #14339

Base directory -> /
 config.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2018-05-09 11:31:29 +02:00
Sukru Senli
f51d16c2eb questd updated 2018-04-19 17:01:08 +02:00
Sukru Senli
f7727f045c inteno-netmodes: testnet: log connection status when changed 2018-04-16 16:58:10 +02:00
Kenneth Johansson
c17344d56f uboot: Fix hang. variable is of array type not char.
Boot was hanging.
2018-04-12 13:25:08 +02:00
Erik Horemans
216ced880c new ice-client 5.0.3-RC5 2018-04-12 10:25:53 +02:00
Erik Horemans
39a004eb4b new ice-client 5.0.3-RC2 2018-04-12 10:25:48 +02:00
Sukru Senli
d41f784794 inteno-netmodes: testnet: fix typo 2018-03-27 09:42:50 +02:00
Sukru Senli
c7728860b4 inteno-netmodes: testnet: direct operstate check error to devnull 2018-03-27 09:42:46 +02:00
Sukru Senli
f109c662e0 inteno-netmodes: testnet: disable access to wireless only if uplink is wifi wan refs #14531 2018-03-23 21:41:38 +01:00
Sukru Senli
af708cad74 questd: allow getting assoclist for a specific vif 2018-03-19 19:15:08 +01:00
Erik Horemans
2135dead70 new ice-client 5.0.2-RC15 2018-03-05 18:19:09 +01:00
Sukru Senli
e4392950b0 questd: updated 2018-03-05 15:00:58 +01:00
Sukru Senli
cac8b6a97a inteno-netmodes: fix netmode-discover checking for wifi script running 2018-03-05 13:51:50 +01:00
Ionut-Alex Oprea
d0207ff6da inteno-netmodes: netmode-discover: prevent busy waiting 2018-03-05 11:49:43 +01:00
Sukru Senli
e45395560a inteno-netmodes: netmode-discover: fping network only if mask is equals or higher than 24 2018-02-27 14:06:35 +01:00
Sukru Senli
1bce24b26d questd: updated 2018-02-27 10:36:36 +01:00
Sukru Senli
6ef0eccab2 inteno-netmodes: fix netmode.sh 2018-02-21 14:40:54 +01:00
Sukru Senli
02bd873096 inteno-netmodes: try to send credentials to client only if it is ia valid wificontrol.txt file 2018-02-20 21:10:29 +01:00
Sukru Senli
0031a8a4e4 inteno-netmodes: activate netmode-client-detect in router mode 2018-02-20 20:58:47 +01:00
Sukru Senli
229f240c8a inteno-netmodes: testnet: give repeater more time to reconnect to master before retrying 2018-02-20 20:30:59 +01:00
Sukru Senli
d589e7034e icwmp-4.0-2018-02-12 2018-02-20 20:15:37 +01:00
Sukru Senli
344c9c4813 icwmp-4.0-2018-02-07 2018-02-20 20:15:25 +01:00
Sukru Senli
a9529bc199 inteno-netmodes: netmode-discover: fping wan network only if mask is 24 or less 2018-02-20 20:14:49 +01:00
Erik Horemans
2047bd7fbb new ice-client 5.0.2-RC5 2018-02-20 20:14:23 +01:00
13 changed files with 119 additions and 68 deletions

View File

@@ -19,14 +19,14 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
export LOGIN:=$(shell whoami)
BASE_PKG_VERSION:=5.0.2
PKG_RELEASE:=RC4
BASE_PKG_VERSION:=5.1.9
PKG_RELEASE:=RC5
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_VERSION:=d7102770d9a7bbd5e926a02391e221d947353544
PKG_SOURCE_VERSION:=3002de0a3511f7da0fe20c3f183212a84aa964bf
ifeq ($(CONFIG_ICE_OPEN),y)
TARGET_PROFILE=$(shell echo $(CONFIG_TARGET_BOARD) | sed s/\"//g)
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=4.0-2017-12-22
PKG_VERSION:=4.0-2018-02-12
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=30f47f79ef7d21e89a856f444f6f86ab9175d1ed
PKG_SOURCE_VERSION:=81a05e57b242a82781301d0bd132bd88a14c131e
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -160,6 +160,8 @@ define Package/icwmp-$(BUILD_VARIANT)/install
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(CP) ./files/icwmp.hotplug $(1)/etc/hotplug.d/iface/90-icwmp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmpd.init $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/90-cwmpfirewall
ifeq ($(CONFIG_CWMP_SCRIPTS_FULL),y)

View File

@@ -6,7 +6,16 @@
[ -f /etc/config/cwmp ] || exit 0
handle_icwmp_reload() {
handle_icwmp_restart() {
[ -f /tmp/70-shiftrange.lock ] && exit 0
[ -f /tmp/switching_mode ] && exit 0
[ -f /tmp/wificontrol.txt -a ! -f /tmp/netmode_done ] && exit 0
[ "$INTERFACE" == "loopback" ] && exit 0
local defwan=$(uci -q get cwmp.cpe.default_wan_interface)
[ -n "$defwan" -a "$(uci -q get network.$defwan)" == "interface" -a "$defwan" != "$INTERFACE" ] && exit 0
local islan="$(uci -q get network.$INTERFACE.is_lan)"
[ "$islan" == "1" ] && exit 0
@@ -18,6 +27,8 @@ handle_icwmp_reload() {
mkdir -p /tmp/ipv4
network_flush_cache
local previpaddr=""
local curipaddr=""
local ipaddrfile=/tmp/ipv4/$INTERFACE-ipaddr
@@ -39,10 +50,16 @@ handle_icwmp_reload() {
network_get_subnets cursubnets $INTERFACE
[ -n "$cursubnets" ] && echo $cursubnets > $subnetsfile || rm -f $subnetsfile
[ "$previpaddr" = "$curipaddr" -a "$prevgateway" = "$curgateway" -a "$prevsubnets" = "$cursubnets" ] && exit 0
local prevdev=""
local curdev=""
local devfile=/tmp/ipv4/$INTERFACE-dev
prevdev=$(cat $devfile 2>/dev/null)
network_get_device curdev $INTERFACE
[ -n "$curdev" ] && echo $curdev > $devfile || rm -f $devfile
[ "$prevdev" == "$curdev" -a "$previpaddr" = "$curipaddr" -a "$prevgateway" = "$curgateway" -a "$prevsubnets" = "$cursubnets" ] && exit 0
/etc/init.d/icwmpd reload &
}
handle_icwmp_reload
handle_icwmp_restart

View File

@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=inteno-netmodes
PKG_VERSION:=0.2.0
PKG_SOURCE_VERSION:=f6ad4becd96f9856f900cb9cdbdad730198b24e9
PKG_SOURCE_VERSION:=fbd7dcfab03df19b3c32675940e0aee708c7cf75
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/netmoded

View File

@@ -100,9 +100,11 @@ correct_uplink() {
if [ "$link" == "up" ]; then
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":true}"
ifconfig $WETIF down
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":false}"
else
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":false}"
ifconfig $WETIF up
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":true}"
ubus call led.internet set '{"state" : "notice"}'
fi
@@ -402,6 +404,7 @@ start_netmode_tools() {
config_get_bool repeaterready setup repeaterready 0
[ $repeaterready -eq 1 ] && {
/sbin/netmode-discover &
/sbin/wificontrol --repeater &
return
}
@@ -413,10 +416,14 @@ start_netmode_tools() {
/sbin/netmode-discover &
/sbin/wificontrol --repeater &
;;
*)
/sbin/netmode-client-detect &
;;
esac
}
stop_netmode_tools() {
/sbin/netmode-client-detect stop
killall -9 netmode-discover >/dev/null 2>&1
killall -9 wificontrol >/dev/null 2>&1
}

View File

@@ -3,6 +3,15 @@
# receive new client events
# and trigger wificontrol in --router mode for that client
NCDPF="/tmp/netmode-client-detector.pid"
if [ -f $NCDPF ]; then
kill -9 $(cat $NCDPF) 2>/dev/null
rm -f $NCDPF
fi
[ "$1" == "stop" ] && exit
. /usr/share/libubox/jshn.sh
action=
@@ -10,15 +19,6 @@ ipaddr=
macaddr=
network=
timed_check() {
while true; do
network=${network:-lan}
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
wificontrol --router
sleep $1
done
}
is_inteno_macaddr()
{
macaddr=$1
@@ -36,24 +36,23 @@ is_inteno_macaddr()
false
}
timed_check 60 &
ubus listen client | \
while read event ; do
#echo "netmode-client-detect got event: $event" >/dev/console
json_load "$event"
json_select client
json_get_var action action
[ "$action" == "connect" ] || continue
json_get_var macaddr macaddr
json_get_var ipaddr ipaddr
json_get_var network network "lan"
while true ; do
ubus listen client | \
while read event ; do
#echo "netmode-client-detect got event: $event" >/dev/console
json_load "$event"
json_select client
json_get_var action action
[ "$action" == "connect" ] || continue
json_get_var macaddr macaddr
json_get_var ipaddr ipaddr
json_get_var network network "lan"
if is_inteno_macaddr $macaddr; then
echo "netmode-client-detect: a new Inteno device detected on '$network' network (MACAddr:$macaddr IPAddr:$ipaddr)" >/dev/console
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}' >/dev/null
grep -q ssid /tmp/wificontrol.txt && /sbin/wificontrol --router --destination $ipaddr
fi
done &
echo $(($!-1)) $! > $NCDPF
if is_inteno_macaddr $macaddr; then
echo "netmode-client-detect: a new Inteno device detected on '$network' network (MACAddr:$macaddr IPAddr:$ipaddr)" >/dev/console
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
/sbin/wificontrol --router --destination $ipaddr
fi
done
done

View File

@@ -109,8 +109,10 @@ backup() {
file="$1"
from_gui="$2"
done_file="/tmp/netmode_done"
[ -f "$file" ] || exit
[ -f "$done_file" ] && rm $done_file
# let netmode-handler up to 20 seconds to finish switching mode
wait_for_netmode_handler
@@ -161,6 +163,7 @@ done
[ "$apcliband" == "$band" -o "$band" == "" ] || {
[ "$from_gui" == "true" ] && restore "back"
touch $done_file
exit
}
@@ -168,6 +171,7 @@ repeater_iface_num=$(uci -q show wireless | grep -e ".mode='wet'" -e ".mode='sta
[ -z "$repeater_iface_num" ] && {
[ "$from_gui" == "true" ] && restore "back"
touch $done_file
exit
}
@@ -197,6 +201,7 @@ while json_get_var dummy $i; do
a_num=$((a_num+1))
[ -z $iface_num ] && {
[ "$from_gui" == "true" ] && restore "back"
touch $done_file
exit
}
set_wireless_values "$iface_num" "$ssid" "$key" "$encryption" "$device"
@@ -205,6 +210,7 @@ while json_get_var dummy $i; do
b_num=$((b_num+1))
[ -z $iface_num ] && {
[ "$from_gui" == "true" ] && restore "back"
touch $done_file
exit
}
set_wireless_values "$iface_num" "$ssid" "$key" "$encryption" "$device"
@@ -222,6 +228,7 @@ while json_get_var dummy $i; do
esac
[ -z $iface_num ] && {
[ "$from_gui" == "true" ] && restore "back"
touch $done_file
exit
}
set_wireless_values "$iface_num" "$ssid" "$key" "$encryption" "$device"
@@ -269,6 +276,7 @@ if [ "$from_gui" == "true" ]; then
ping -w1 $ip
if [ $? -eq 0 ]; then
restore
touch $done_file
exit
else
i=$((i-10))
@@ -278,6 +286,7 @@ if [ "$from_gui" == "true" ]; then
restore "back"
else
if [ "$state" == "exit" ]; then
touch $done_file
return
fi
ubus call leds set '{"state":"allflash"}'
@@ -291,4 +300,7 @@ else
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
correct_uplink
ubus call leds set '{"state":"normal"}'
touch $done_file
# we need to trigger a reload of icwmp but ONLY if ip or device has changed
[ -f "/etc/hotplug.d/iface/90-icwmp" ] && INTERFACE=wan ACTION=ifup sh /etc/hotplug.d/iface/90-icwmp
fi

View File

@@ -21,9 +21,14 @@ mask_to_cidr() {
}
while true; do
[ -e /sys/class/net/br-wan ] || {
sleep 5
continue
}
unlisted=0
ps | grep -q wifi | grep -q reload || {
ps | grep wifi | grep -q reload || {
for mac in $(brctl showmacs br-wan 2>/dev/null | tail -n +2 | grep no | awk '{print$2}'); do
grep -q "$mac" /proc/net/arp || unlisted=$((unlisted+1))
done
@@ -33,10 +38,10 @@ while true; do
mask=$(mask_to_cidr $netmask)
}
if [ $unlisted -gt 0 -a -n "$ipaddr" -a -n "$netmask" ]; then
if [ $unlisted -gt 0 -a -n "$ipaddr" -a -n "$netmask" -a $mask -ge 24 ]; then
fping -c 1 -t 1000 -g $ipaddr/$mask -q >/dev/null 2>&1
fi
sleep 20
sleep 30
done

View File

@@ -0,0 +1,3 @@
#!/bin/sh
netmode-conf "$1" "$2" &

View File

@@ -7,6 +7,7 @@ TVCON=0
WANIP=0
LASTSTATUS=""
CURSTATUS=""
ETHWAN="$(db -q get hw.board.ethernetWanPort)"
SLEEP_TIME=30
enableCounter=0
@@ -48,7 +49,7 @@ ping_uplink()
if [ "$hasmode" == "1" ] && [ "$hasip" == "0" -o "$hasdev" == "0" ]; then
rv=0
elif [ "$hasmode" == "1" ]; then
ping $ipaddr -I $device -W 1 -c 1 -q >/dev/null 2>&1
ping $ipaddr -I $device -W 3 -c 1 -q >/dev/null 2>&1
[ $? -eq 1 ] && rv=0 || rv=1
else
SLEEP_TIME=5
@@ -57,7 +58,6 @@ ping_uplink()
fi
if [ $rv -eq 0 ]; then
echo "{ \"online\" : false }" > /tmp/internet_connection_status
SLEEP_TIME=10
@@ -65,11 +65,14 @@ ping_uplink()
wetif="$(uci -q get wireless.$(uci show wireless | grep 'mode=.*wet.*' | cut -d'.' -f2 | head -1).ifname)"
# If there is an uplink IP address but no connection for 5 minutes, reboot
if [ $enableCounter -gt 32 ]; then
logger -t "testnet" "No uplink connection; reboot"
ubus call led.internet set '{"state" : "error"}'
reboot &
elif [ $((enableCounter % 2)) -eq 0 -a $enableCounter -ge 2 -o $enableCounter -eq 0 ]; then
elif [ $((enableCounter % 8)) -eq 0 -a $enableCounter -ge 8 -o $enableCounter -eq 0 ]; then
ps | grep -v grep | grep -q 'wifi reload\|wifi import\|wifi.credentials\|iwpriv' && return
logger -t "testnet" "No uplink connection; try to re-connect"
if [ -f /usr/sbin/wlctl ]; then
assoclist="$(wlctl -i $wetif assoclist | head -1 | awk '{print$2}')"
wlctl -i $wetif reassoc $assoclsit
@@ -93,13 +96,13 @@ ping_uplink()
iwpriv $wetif set ApCliAutoConnect=1
fi
ubus call led.internet set '{"state" : "notice"}'
touch /tmp/netmodes/repeater_trying_to_connect
else
if [ -f /tmp/netmodes/repeater_trying_to_connect ]; then
rm -f /tmp/netmodes/repeater_trying_to_connect
else
ubus call led.internet set '{"state" : "error"}'
fi
# touch /tmp/netmodes/repeater_trying_to_connect
# else
# if [ -f /tmp/netmodes/repeater_trying_to_connect ]; then
# rm -f /tmp/netmodes/repeater_trying_to_connect
# else
# ubus call led.internet set '{"state" : "error"}'
# fi
fi
enableCounter=$((enableCounter+1))
@@ -110,16 +113,20 @@ ping_uplink()
AccessPolicy=1
if [ -f /usr/sbin/iwpriv ]; then
# Do not allow clients to connect on 2.4GHz radio
iwpriv ra0 set AccessPolicy=$AccessPolicy
# Do not allow clients to connect on 5GHz radio
iwpriv rai0 set AccessPolicy=$AccessPolicy
# Disconnect clients on 2.4GHz radio
iwpriv ra0 set DisConnectAllSta=2
# Disconnect clients on 5GHz radio
iwpriv rai0 set DisConnectAllSta=2
grep -q up /sys/class/net/$ETHWAN/operstate 2>/dev/null || {
logger -t "testnet" "Disconnect all stations and disable WiFi access on downlink wireless interfaces"
# Do not allow clients to connect on 2.4GHz radio
iwpriv ra0 set AccessPolicy=$AccessPolicy
# Do not allow clients to connect on 5GHz radio
iwpriv rai0 set AccessPolicy=$AccessPolicy
# Disconnect clients on 2.4GHz radio
iwpriv ra0 set DisConnectAllSta=2
# Disconnect clients on 5GHz radio
iwpriv rai0 set DisConnectAllSta=2
}
fi
else
else
grep -q "true" /tmp/internet_connection_status 2>/dev/null || logger -t "testnet" "Uplink connection is gained"
echo "{ \"online\" : true }" > /tmp/internet_connection_status
ubus call led.internet set '{"state" : "eok"}'
@@ -133,10 +140,10 @@ ping_uplink()
AccessPolicy=0
if [ -f /usr/sbin/iwpriv ]; then
logger -t "testnet" "Enable WiFi access on downlink wireless interfaces"
iwpriv ra0 set AccessPolicy=$AccessPolicy
iwpriv rai0 set AccessPolicy=$AccessPolicy
fi
fi
}
@@ -160,11 +167,10 @@ test_connection() {
}
wan_have_ip() {
[ -d /sys/class/net/$port ] || return
[ -d /sys/class/net/$ETHWAN ] || return
ubus list led.wan >/dev/null 2>&1 || return
local port="$(db -q get hw.board.ethernetWanPort)"
local addr=$(ip a show dev $port | grep "inet "| awk '{print $2}')
local addr=$(ip a show dev $ETHWAN | grep "inet "| awk '{print $2}')
if [ -n "$addr" ]; then
WANIP=1

View File

@@ -129,12 +129,12 @@ case "$1" in
json_load "`cat $file`" || write_error "invalid file content"
json_select "wifi_ifaces" || write_error "invalid file content"
start-netmode-conf "$file" "$from_gui" >/dev/null 2>/dev/null
json_init
json_add_string "status" success
json_dump
netmode-conf "$file" "$from_gui" >/dev/null 2>&1 &
;;
esac
;;

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.40
PKG_SOURCE_VERSION:=44852fcce18b5ceefa6b09bd5eb775d783ee6362
PKG_SOURCE_VERSION:=4bb88410200d26780dae58e624da23d32f48b942
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/questd
@@ -43,7 +43,7 @@ export QUESTD_CFLAGS
define Package/questd
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +ubus +libpthread +(TARGET_iopsys_ramips):swconfig +(TARGET_iopsys_ramips):libnl-tiny +libopenssl
DEPENDS:=+libuci +libubox +ubus +libpthread +TARGET_iopsys_ramips:swconfig +TARGET_iopsys_ramips:libnl-tiny +libopenssl
TITLE:=router info daemon
endef

View File

@@ -12,7 +12,7 @@ PKG_VERSION:=2016.08
PKG_RELEASE:=4
PKG_SOURCE_URL:=http://public.inteno.se:/uboot
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=37d00bb3d953518890191bd62c21b0046ee0f18d
PKG_SOURCE_VERSION:=b0a0b127f0848e191b80979ad7de5f10c3e01a1b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)