Zusammen mit Lorenz und Stefan haben wir gerade festgestellt, das die fastd namen viel zu lang sind und gluon diese nicht übernimmt.
Alt:
mesh_vpn_backbone_peer_<srv> ist zu lang für gluon
Neu:
vpn_<srv>
Daher hier ein Vorschlag zum drastischen einkürzen. Es ist nur ein Bezeichner von daher nix weltbewegendes.
Der Merge Request:
https://git.nordwest.freifunk.net/ffnw-firmware/packages/merge_requests/14
und für Tarek als Patch zum anschauen:
From e4ec14e6f43ad43d927fa49c0e4ae827005d4e2e Mon Sep 17 00:00:00 2001 From: Johannes Rudolph johannes.rudolph@ffnw.de Date: Thu, 26 May 2016 15:56:56 +0200 Subject: [PATCH] Make fastd peer names shorter at the moment they are to Long
--- hoodselector/luasrc/hoodselector | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hoodselector/luasrc/hoodselector b/hoodselector/luasrc/hoodselector index 1b27b87..7c3e1a3 100755 --- a/hoodselector/luasrc/hoodselector +++ b/hoodselector/luasrc/hoodselector @@ -275,7 +275,7 @@ end local function directVPN() -- escape special chars "[]-" for outgoingIF in io.open("/sys/kernel/debug/batman_adv/bat0/originators", 'r'):lines() do - if outgoingIF:match(string.gsub("%[ " .. uci:get('fastd', 'mesh_vpn_backbone', 'net') .. "%]","%_",'-'):gsub("%-", "%%-")) then + if outgoingIF:match(string.gsub("%[ " .. uci:get('fastd', 'vpn', 'net') .. "%]","%_",'-'):gsub("%-", "%%-")) then return true end end @@ -297,7 +297,7 @@ local function getCurrentPeers() for prefix,peer in pairs(index) do local tmpPeer = {} if prefix:match(".name") then - if peer:match("mesh_vpn_backbone_peer_") then + if peer:match("vpn_") then local tmpRemote = uci:get('fastd', peer, 'remote') tmpRemote = tmpRemote[1]:split(" ") local remote = {} @@ -368,7 +368,7 @@ local function vpn_reconfiguration_needed(hood_serverlist) for local_server_config_name, local_server in pairs(local_serverlist) do local local_server_exists_in_hoodfile = false for hood_server_index,hood_server in pairs(hood_serverlist) do - if (local_server_config_name == 'mesh_vpn_backbone_peer_'.. hood_server["host"]:split('.')[1]) then + if (local_server_config_name == 'vpn_'.. hood_server["host"]:split('.')[1]) then local_server_exists_in_hoodfile = true if ( local_server.key ~= hood_server['publickey'] ) then return true @@ -389,7 +389,7 @@ local function vpn_reconfiguration_needed(hood_serverlist) for hood_server_index,hood_server in pairs(hood_serverlist) do local hood_server_exists_locally = false for local_server_config_name, local_server in pairs(local_serverlist) do - if (local_server_config_name == 'mesh_vpn_backbone_peer_'.. hood_server["host"]:split('.')[1]) then + if (local_server_config_name == 'vpn_'.. hood_server["host"]:split('.')[1]) then hood_server_exists_locally = true end end @@ -408,9 +408,9 @@ local function vpn_reconfigure(hood_serverlist) end
-- add servers from hoodfile - local group = 'mesh_vpn_backbone' + local group = 'vpn_' for i,hood_server in pairs(hood_serverlist) do - uci:section('fastd', 'peer', group .. '_peer_' .. hood_server.host:split('.')[1], + uci:section('fastd', 'peer', group .. hood_server.host:split('.')[1], { enabled = 1, net = 'mesh_vpn', -- libgit2 0.24.0
Gruß Johannes