aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/gateway_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/gateway_client.c')
-rw-r--r--net/batman-adv/gateway_client.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 4e8f5b1eedfc..9ece204d3a00 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -146,7 +146,7 @@ batadv_gw_get_best_gw_node(struct batadv_priv *bat_priv)
146 continue; 146 continue;
147 147
148 orig_node = gw_node->orig_node; 148 orig_node = gw_node->orig_node;
149 router = batadv_orig_node_get_router(orig_node); 149 router = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT);
150 if (!router) 150 if (!router)
151 continue; 151 continue;
152 152
@@ -266,7 +266,8 @@ void batadv_gw_election(struct batadv_priv *bat_priv)
266 if (next_gw) { 266 if (next_gw) {
267 sprintf(gw_addr, "%pM", next_gw->orig_node->orig); 267 sprintf(gw_addr, "%pM", next_gw->orig_node->orig);
268 268
269 router = batadv_orig_node_get_router(next_gw->orig_node); 269 router = batadv_orig_router_get(next_gw->orig_node,
270 BATADV_IF_DEFAULT);
270 if (!router) { 271 if (!router) {
271 batadv_gw_reselect(bat_priv); 272 batadv_gw_reselect(bat_priv);
272 goto out; 273 goto out;
@@ -335,7 +336,7 @@ void batadv_gw_check_election(struct batadv_priv *bat_priv,
335 if (!curr_gw_orig) 336 if (!curr_gw_orig)
336 goto reselect; 337 goto reselect;
337 338
338 router_gw = batadv_orig_node_get_router(curr_gw_orig); 339 router_gw = batadv_orig_router_get(curr_gw_orig, BATADV_IF_DEFAULT);
339 if (!router_gw) 340 if (!router_gw)
340 goto reselect; 341 goto reselect;
341 342
@@ -348,7 +349,7 @@ void batadv_gw_check_election(struct batadv_priv *bat_priv,
348 if (curr_gw_orig == orig_node) 349 if (curr_gw_orig == orig_node)
349 goto out; 350 goto out;
350 351
351 router_orig = batadv_orig_node_get_router(orig_node); 352 router_orig = batadv_orig_router_get(orig_node, BATADV_IF_DEFAULT);
352 if (!router_orig) 353 if (!router_orig)
353 goto out; 354 goto out;
354 355
@@ -576,7 +577,7 @@ static int batadv_write_buffer_text(struct batadv_priv *bat_priv,
576 struct batadv_neigh_ifinfo *router_ifinfo = NULL; 577 struct batadv_neigh_ifinfo *router_ifinfo = NULL;
577 int ret = -1; 578 int ret = -1;
578 579
579 router = batadv_orig_node_get_router(gw_node->orig_node); 580 router = batadv_orig_router_get(gw_node->orig_node, BATADV_IF_DEFAULT);
580 if (!router) 581 if (!router)
581 goto out; 582 goto out;
582 583