Commit 211bc858 authored by Jan-Tarek Butt's avatar Jan-Tarek Butt
Browse files

hoodselector: add hoodfile bssid to molwm tbl for respondd

parent 7db80ce1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ local function molwm_to_file()
    file:write("\"md5hash\": " .. molwmtable["md5hash"] .. "\n")
    file:write("\"vpnrouter\": " .. molwmtable["vpnrouter"] .. "\n")
    file:write("\"hoodname\": " .. molwmtable["hoodname"] .. "\n")
    file:write("\"bssid\": " .. molwmtable["bssid"] .. "\n")
    file:close()
  end
end
@@ -230,6 +231,7 @@ local function write_molwm(hood)
  if hood ~= nil then
    molwmtable["md5hash"] = "\"" .. string.format(hash.md5(table.tostring(hood))) .. "\""
    molwmtable["hoodname"] = "\"" .. hood["name"] .. "\""
    molwmtable["bssid"] = "\"" .. hood["bssid"] .. "\""
  end
  molwm()
  molwm_to_file()
@@ -878,6 +880,7 @@ if batmanHasGateway() then
	  io.stderr:write('Hood set by batmanHasGateway mode, GW source is mesh on lan/wan\n')
	  molwmtable["md5hash"] = "\"" .. string.format(hash.md5(table.tostring(bssidHood))) .. "\""
	  molwmtable["hoodname"] = "\"" .. bssidHood["name"] .. "\""
	  molwmtable["bssid"] = "\"" .. bssidHood["bssid"] .. "\""
	  molwm_to_file()
	  exit(0)
	end
@@ -937,6 +940,7 @@ if next(mesh_inf) then
      io.stderr:write('Hood set by "Radio less router have mesh lan/wan neigborths"\n')
      molwmtable["md5hash"] = "\"" .. string.format(hash.md5(table.tostring(bssidHood)    )) .. "\""
      molwmtable["hoodname"] = "\"" .. bssidHood["name"] .. "\""
      molwmtable["bssid"] = "\"" .. bssidHood["bssid"] .. "\""
      molwm_to_file()
      exit(0)
    end