From patchwork Thu Oct 5 22:14:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fff-hoods: Fix resetting interfaces during connection drop From: Adrian Schmutzler X-Patchwork-Id: 531 Message-Id: <1507241691-21754-1-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Fri, 6 Oct 2017 00:14:51 +0200 This addresses the following case: A mesh router has been connected to an uplink router and downloaded the json. Now the uplink goes down and the mesh router deletes (!) all interfaces to put up only w2sta. If now the connection is reestablished, the new json is downloaded and compared to the still present old one. If the new json does not differ from the old one, no recreation of wXap and wXmesh is triggered. Thus I delete the old file if connection is lost, so comparison always enters the clause then. Apply only after the keyV2 patch set! Signed-off-by: Adrian Schmutzler Tested-by: Adrian Schmutzler Reviewed-by: Christian Dresel --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 8155111..6dc1b68 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -66,6 +66,8 @@ else if ! isGatewayAvailable ; then #now we haven't a gateway in Range, we search for a hidden AP to get a keyxchangev2data file! #first we delete all wifi settings + rm /www/public/keyxchangev2data # delete this, so interfaces are recreated if reconnect with unchanged hood file takes place + if ! wifiDelAll; then echo "Can't delete current wifi setup" exit 1