Merge pull request #2068 from freifunk-gluon/radv-filterd

gluon-radv-filterd: minor cleanup
This commit is contained in:
David Bauer 2020-07-04 21:02:40 +02:00 committed by GitHub
commit b099b3ceba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -559,14 +559,13 @@ static int parse_tt_local(struct nl_msg *msg,
}
static void update_tqs(void) {
static const struct ether_addr unspec = {};
struct router *router;
bool update_originators = false;
struct ether_addr unspec;
struct batadv_nlquery_opts opts;
int ret;
// reset TQs
memset(&unspec, 0, sizeof(unspec));
foreach(router, G.routers) {
router->tq = 0;
if (ether_addr_equal(router->originator, unspec))
@ -609,12 +608,12 @@ static void update_tqs(void) {
foreach(router, G.routers) {
if (router->tq == 0) {
if (ether_addr_equal(router->originator, unspec))
fprintf(stderr,
"Unable to find router " F_MAC " in transtable_{global,local}\n",
DEBUG_MSG(
"Unable to find router " F_MAC " in transtable_{global,local}",
F_MAC_VAR(router->src));
else
fprintf(stderr,
"Unable to find TQ for originator " F_MAC " (router " F_MAC ")\n",
DEBUG_MSG(
"Unable to find TQ for originator " F_MAC " (router " F_MAC ")",
F_MAC_VAR(router->originator),
F_MAC_VAR(router->src));
}

View File

@ -1,4 +1,7 @@
#pragma once
#include <stdint.h>
#include <string.h>
#include <linux/if_ether.h>
#define F_MAC "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"