From 89a093a1f0a1816f0070c350cca8254911544f6b Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 21 Aug 2020 23:02:03 +0200 Subject: [PATCH] dawn: bump to latest version Includes: - dawn_uci: fix crashing when uci config is received - tcpsocket: add option to add server ip A new config option allows to add a server ip option server_ip '10.0.0.2' However, this server does not send anything back. Therefore it is not possible to change the node configuration. This will probably be added soon. The main goal of this commit is to allow monitoring of all nodes in a network with DAWN, e.g. clients, channel utilization, ... Also a network option (3) has been added which allows to use TCP but not to announce your daemon in the broadcast domain. This allows you to create a monitor-only node that holds only the local information and forwards it to the central server. A monitor-only node could be configured like option server_ip '10.0.0.1' option tcp_port '1026' option network_option '3' Another possible config is option server_ip '10.0.0.1' option tcp_port '1026' option network_option '2' Here, the node shares information with a central server, which can be located outside the broadcast domain. Nevertheless, it also shares information within its broadcast domain and can therefore perform client steering. Signed-off-by: Nick Hainke --- net/dawn/Makefile | 6 +++--- net/dawn/files/dawn.config | 1 + net/dawn/files/dawn.init | 13 +++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/net/dawn/Makefile b/net/dawn/Makefile index ef325b3ae..979369baa 100644 --- a/net/dawn/Makefile +++ b/net/dawn/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dawn -PKG_SOURCE_DATE:=2020-08-07 +PKG_SOURCE_DATE:=2020-08-21 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/berlin-open-wireless-lab/DAWN.git -PKG_SOURCE_VERSION:=50d54a625366cffd48f0ec3f23456d5a04c45fd3 -PKG_MIRROR_HASH:=cdea4f6ff0209afa0320e143043e0417fd6d65c349651e491f6023affd39fa10 +PKG_SOURCE_VERSION:=25a493c4384e00027cc0f38465ea19d2555b036e +PKG_MIRROR_HASH:=2f959d5ad60d14224c1dc1bb77fe998cc909c69480dc444c89a7071dc5c8dbea PKG_MAINTAINER:=Nick Hainke PKG_LICENSE:=GPL-2.0-only diff --git a/net/dawn/files/dawn.config b/net/dawn/files/dawn.config index ee9274348..ccbaa1c99 100644 --- a/net/dawn/files/dawn.config +++ b/net/dawn/files/dawn.config @@ -1,6 +1,7 @@ config network option broadcast_ip '10.0.0.255' option broadcast_port '1025' + option server_ip '' option tcp_port '1026' option network_option '2' # 0 udp broadcast, 1 multicast, 2 tcp option shared_key 'Niiiiiiiiiiiiiik' diff --git a/net/dawn/files/dawn.init b/net/dawn/files/dawn.init index 626b12fe5..4171b3c6b 100755 --- a/net/dawn/files/dawn.init +++ b/net/dawn/files/dawn.init @@ -38,11 +38,14 @@ service_triggers() start_service() { local _tcp_buffer + local _network_option + config_load dawn - load_tcp_port() { + load_tcp_config() { config_get _tcp_buffer "$1" tcp_port + config_get _network_option "$1" network_option } - config_foreach load_tcp_port network + config_foreach load_tcp_config network touch /tmp/dawn_mac_list @@ -51,9 +54,11 @@ start_service() procd_set_param command $PROG procd_set_param stdout 0 # here it is possible to remove the debug output... procd_set_param stderr 1 - procd_add_mdns "dawn" "tcp" "${_tcp_buffer}" + if [ ${_network_option} -eq 2 ]; then + procd_add_mdns "dawn" "tcp" "${_tcp_buffer}" + echo "UMDNS with port ${_tcp_buffer}" + fi procd_close_instance echo "Dawn instance started!" - echo "UMDNS with port ${_tcp_buffer}" }