Commit graph

71 commits

Author SHA1 Message Date
root 8301fee189 Fixes a bug that will add a node with upercase letters in its id to the state.json each time the script is called 2015-03-30 21:03:58 +02:00
Stefan Laudemann b3c629264a Changes try-except-blocks around maybe_nody_by_*() calls to only catch KeyError exceptions.
Semantically, all the implemented error handling for the try-except-
blocks around calls to "maybe_node_by_mac()" or "maybe_node_by_id()" in
nodedb.py only handle the case that a particular MAC address cannot be
found in the list of known nodes. If such a MAC address cannot be found
in this list, the methods properly indicate this by raising a KeyError.
However, all the try-except-block generically catch all exceptions and
thus may cover other problems. But not only that problems might be
covered by this, generic try-except-blocks make finding errors and de-
bugging quite painful.
Hence, these try-except-blocks should only catch KeyErrors or at least
have an error handling that differs from other exceptions.
2015-02-01 13:50:01 +01:00
Stefan Laudemann 94f7256564 Adds missing comma to pass (x['neighbor'], ) as tuple (not as str).
As Python interprets "(elem)" as string and not as tuple,
maybe_node_by_mac() iterates over the single characters in the MAC-
addressed passed as parameter when called parse_vis_data(). Most of the
calls already use the "(elem, )" syntax to indicate that a tuple is
passed. However, there is still one call for which this is not the case
causing a noticable longer runtime due to calls to maybe_node_by_mac()
that cannot yield any useful result.
2015-02-01 13:47:07 +01:00
Nils Schneider ee8bbd8b3e simplify clientcount 2014-09-23 09:23:27 +02:00
Nils Schneider 6e101bc6de simplify mark_gateway 2014-09-23 09:23:27 +02:00
Nils Schneider b7a079d418 remove dead code 2014-09-20 21:37:00 +02:00
Nils Schneider 48a1744639 firstseen 2014-09-20 21:17:15 +02:00
Nils Schneider a5cb5f0fdb remove fuzzy matching 2014-08-17 19:10:32 +02:00
Nils Schneider 0d71de7091 fix rrd 2014-08-17 19:10:19 +02:00
Nils Schneider 2dfd11189d count clients, instead of nodes 2014-08-17 18:53:09 +02:00
Nils Schneider 663539c206 Revert "remove fuzzy matching"
This reverts commit a88b207cf1.
2014-08-12 20:51:36 +02:00
Nils Schneider a88b207cf1 remove fuzzy matching 2014-08-10 09:36:29 +02:00
Nils Schneider 9f546be0c7 persistent state (mostly for gluon nodes), prune after 30d 2014-06-29 22:47:29 +02:00
Nils Schneider f18d0b38a9 bugs 2014-05-31 14:53:38 +02:00
Nils Schneider 26fc2a9aef alfred: use network.mac as ID if present 2014-05-02 10:49:32 +02:00
Linus Lüssing 605765cd12 try non-fuzzy prior fuzzy mac matching
Fuzzy matching should only be tried if there's no exact match. Otherwise
a node in the map might get the wrong label.
2014-05-02 04:10:39 +02:00
Nils Schneider ac3366ff13 count clients and add clientcount attribute to each node 2014-04-10 17:17:11 +02:00
Daniel Ehlers 613fa425ed nodedb.py: stop similar mac address check when parts are not equal 2014-02-04 15:54:04 +01:00
Nils Schneider 914836eb9a alfred.py: pass firmware version to nodes.json 2014-02-02 23:30:16 +01:00
Andreas Baldeau ddf7e4f8db Fixed variable name and catches only KeyErrors to not hide other errors. 2014-01-31 22:15:30 +01:00
Andreas Baldeau cd743ff46c Fixes client mac obfuscation. Node to node links stay untouched now. 2014-01-31 22:15:30 +01:00
Daniel Ehlers d9451e2ea7 alfred: Mark all nodes from legacy support. 2014-01-30 22:12:33 +01:00
Daniel Ehlers 53d8f4bcf2 Fix exception handling and remove debug output 2013-12-29 20:20:33 +01:00
Andreas Baldeau a0c234ea05 Add client mac obscuring methods. 2013-12-29 13:11:53 +01:00
Daniel Ehlers 90106313eb Method for searching a node by id. 2013-12-29 04:14:07 +01:00
Daniel Ehlers 44c92ff65f Refactor batctl calls into python class.
This drastically reduces the logic implement in mkmap.sh and also
supports multiple batman mesh interfaces.
2013-11-21 01:27:13 +01:00
Nils Schneider ec03ffe810 use fuzzy mac matching when importing aliases 2013-02-02 02:44:49 +01:00
Nils Schneider db4dec7270 handle aliases without names 2013-02-02 01:27:49 +01:00
Nils Schneider 3ffbac8136 remove wikiimport from nodedb, move to ffhlwiki.py and call it from mkmap.sh 2013-02-02 01:21:29 +01:00
Nils Schneider 5613fa2f61 include offline nodes from aliases.json in output 2012-11-22 02:35:14 +01:00
Nils Schneider c8a4882f38 fix handling of wiki entries with multiple nodes 2012-09-05 00:59:13 +02:00
Nils Schneider 1ed42ab9ee Nick -> Knotenname 2012-08-22 20:47:17 +02:00
Nils Schneider 51701dfde8 use copy of mac, not reference 2012-08-21 00:10:37 +02:00
Nils Schneider f67b8df1bc add wiki mac to macs 2012-08-20 23:45:35 +02:00
Nils Schneider a6d7e4e1f3 modulo 255 when incrementing macs 2012-08-20 23:44:31 +02:00
Nils Schneider 92b454f1cc much better mac matching 2012-08-20 23:00:39 +02:00
Nils Schneider ac10d7aabc Revert "better mac matching"
This reverts commit ac5c4b5693.
2012-08-20 22:59:32 +02:00
Nils Schneider ac5c4b5693 better mac matching 2012-08-20 22:05:01 +02:00
Nils Schneider ecc7aed694 actually fix fuzzy matching 2012-07-08 02:09:00 +02:00
Nils Schneider 8aa71d62e5 fuzzy mac matching for wiki imports 2012-07-08 01:30:21 +02:00
Nils Schneider a8a9ed9c8d refactor mac similarity check into its own function 2012-07-07 23:11:37 +02:00
Nils Schneider f7f8225d1f allow setting gps from aliases.json 2012-06-30 16:49:45 +02:00
Nils Schneider a10ad4baf2 do not fail on non-mac node IDs 2012-06-30 16:46:53 +02:00
Nils Schneider c6e1cf2acd hide neighbors without primary/secondary entry 2012-06-15 18:23:03 +02:00
Nils Schneider 5484c34581 don't hide vpn hosts, only hide links 2012-06-12 02:26:41 +02:00
Nils Schneider a0adb74269 move vpn flag to aliases 2012-06-12 02:12:48 +02:00
Nils Schneider 0d24e4518f fix link loops 2012-06-12 00:32:13 +02:00
Nils Schneider b1eaf86d30 lots of changes to support inter-node vpn links 2012-06-11 23:53:45 +02:00
Nils Schneider 80c2cd394b remove link.distance/strength, tweak parameters 2012-06-07 22:58:45 +02:00
Nils Schneider 523384d64c remove group foo and replace it with flags 2012-06-07 22:21:50 +02:00