aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/gateway_client.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon@open-mesh.com>2013-11-13 13:14:47 -0500
committerAntonio Quartulli <antonio@meshcoding.com>2014-01-12 08:41:11 -0500
commit7351a4822d42827ba0110677c0cbad88a3d52585 (patch)
treecc3e4200c1f1ff0b27f370c451b6a36493b74d79 /net/batman-adv/gateway_client.c
parent89652331c00f43574515059ecbf262d26d885717 (diff)
batman-adv: split out router from orig_node
For the network wide multi interface optimization there are different routers for each outgoing interface (outgoing from the OGM perspective, incoming for payload traffic). To reflect this, change the router and associated data to a list of routers. While at it, rename batadv_orig_node_get_router() to batadv_orig_router_get() to follow the new naming scheme. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
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