Skip to content
Snippets Groups Projects
Unverified Commit b099b3ce authored by David Bauer's avatar David Bauer Committed by GitHub
Browse files

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

gluon-radv-filterd: minor cleanup
parents 9be7a5ca e32fa5bc
Branches
Tags
No related merge requests found
...@@ -559,14 +559,13 @@ static int parse_tt_local(struct nl_msg *msg, ...@@ -559,14 +559,13 @@ static int parse_tt_local(struct nl_msg *msg,
} }
static void update_tqs(void) { static void update_tqs(void) {
static const struct ether_addr unspec = {};
struct router *router; struct router *router;
bool update_originators = false; bool update_originators = false;
struct ether_addr unspec;
struct batadv_nlquery_opts opts; struct batadv_nlquery_opts opts;
int ret; int ret;
// reset TQs // reset TQs
memset(&unspec, 0, sizeof(unspec));
foreach(router, G.routers) { foreach(router, G.routers) {
router->tq = 0; router->tq = 0;
if (ether_addr_equal(router->originator, unspec)) if (ether_addr_equal(router->originator, unspec))
...@@ -609,12 +608,12 @@ static void update_tqs(void) { ...@@ -609,12 +608,12 @@ static void update_tqs(void) {
foreach(router, G.routers) { foreach(router, G.routers) {
if (router->tq == 0) { if (router->tq == 0) {
if (ether_addr_equal(router->originator, unspec)) if (ether_addr_equal(router->originator, unspec))
fprintf(stderr, DEBUG_MSG(
"Unable to find router " F_MAC " in transtable_{global,local}\n", "Unable to find router " F_MAC " in transtable_{global,local}",
F_MAC_VAR(router->src)); F_MAC_VAR(router->src));
else else
fprintf(stderr, DEBUG_MSG(
"Unable to find TQ for originator " F_MAC " (router " F_MAC ")\n", "Unable to find TQ for originator " F_MAC " (router " F_MAC ")",
F_MAC_VAR(router->originator), F_MAC_VAR(router->originator),
F_MAC_VAR(router->src)); F_MAC_VAR(router->src));
} }
......
#pragma once
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#define F_MAC "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" #define F_MAC "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment