From patchwork Sun Jun 24 21:21:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2] fff-hoods: Don't sort when getting hood file from ethernet From: Adrian Schmutzler X-Patchwork-Id: 867 Message-Id: <1529875275-38841-1-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Sun, 24 Jun 2018 23:21:15 +0200 There is no reason to sort MAC adresses, actually it is even making things worse as the original order might reflect the link quality. Signed-off-by: Adrian Schmutzler --- Changes in v2: - Also removed uniq --- src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile index 8c80802..c81ed23 100644 --- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile @@ -67,7 +67,7 @@ getEthernetHoodfile() { return 1 fi - neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq | grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u) + neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq | grep DUP | cut -d " " -f4 | sed s/:$//g) for addr in $neighbor_addrs; do wget -T2 -t1 -qO "$file" "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0