aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-12 07:48:56 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-24 12:41:41 -0400
commitda641193dd3117ccd408dc589a131f16286b0da0 (patch)
treeb819cd7c61837e6c7c889e76fb9a38f6c83d4f54 /net/batman-adv/routing.c
parentc0a559295eb2601602f7dc88f4240afcd666f73a (diff)
batman-adv: Prefix originator static inline functions with batadv_
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 9c6edc23bfc4..0888f1e39fdc 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -298,7 +298,7 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
298 298
299 /* answer echo request (ping) */ 299 /* answer echo request (ping) */
300 /* get routing information */ 300 /* get routing information */
301 orig_node = orig_hash_find(bat_priv, icmp_packet->orig); 301 orig_node = batadv_orig_hash_find(bat_priv, icmp_packet->orig);
302 if (!orig_node) 302 if (!orig_node)
303 goto out; 303 goto out;
304 304
@@ -353,7 +353,7 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
353 goto out; 353 goto out;
354 354
355 /* get routing information */ 355 /* get routing information */
356 orig_node = orig_hash_find(bat_priv, icmp_packet->orig); 356 orig_node = batadv_orig_hash_find(bat_priv, icmp_packet->orig);
357 if (!orig_node) 357 if (!orig_node)
358 goto out; 358 goto out;
359 359
@@ -437,7 +437,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if)
437 return recv_icmp_ttl_exceeded(bat_priv, skb); 437 return recv_icmp_ttl_exceeded(bat_priv, skb);
438 438
439 /* get routing information */ 439 /* get routing information */
440 orig_node = orig_hash_find(bat_priv, icmp_packet->dst); 440 orig_node = batadv_orig_hash_find(bat_priv, icmp_packet->dst);
441 if (!orig_node) 441 if (!orig_node)
442 goto out; 442 goto out;
443 443
@@ -684,7 +684,7 @@ int batadv_recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if)
684 if (batadv_bla_is_backbone_gw_orig(bat_priv, roam_adv_packet->src)) 684 if (batadv_bla_is_backbone_gw_orig(bat_priv, roam_adv_packet->src))
685 goto out; 685 goto out;
686 686
687 orig_node = orig_hash_find(bat_priv, roam_adv_packet->src); 687 orig_node = batadv_orig_hash_find(bat_priv, roam_adv_packet->src);
688 if (!orig_node) 688 if (!orig_node)
689 goto out; 689 goto out;
690 690
@@ -721,6 +721,7 @@ struct neigh_node *batadv_find_router(struct bat_priv *bat_priv,
721 struct neigh_node *router; 721 struct neigh_node *router;
722 static uint8_t zero_mac[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; 722 static uint8_t zero_mac[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
723 int bonding_enabled; 723 int bonding_enabled;
724 uint8_t *primary_addr;
724 725
725 if (!orig_node) 726 if (!orig_node)
726 return NULL; 727 return NULL;
@@ -743,20 +744,22 @@ struct neigh_node *batadv_find_router(struct bat_priv *bat_priv,
743 if ((!recv_if) && (!bonding_enabled)) 744 if ((!recv_if) && (!bonding_enabled))
744 goto return_router; 745 goto return_router;
745 746
747 primary_addr = router_orig->primary_addr;
748
746 /* if we have something in the primary_addr, we can search 749 /* if we have something in the primary_addr, we can search
747 * for a potential bonding candidate. 750 * for a potential bonding candidate.
748 */ 751 */
749 if (compare_eth(router_orig->primary_addr, zero_mac)) 752 if (compare_eth(primary_addr, zero_mac))
750 goto return_router; 753 goto return_router;
751 754
752 /* find the orig_node which has the primary interface. might 755 /* find the orig_node which has the primary interface. might
753 * even be the same as our router_orig in many cases 756 * even be the same as our router_orig in many cases
754 */ 757 */
755 if (compare_eth(router_orig->primary_addr, router_orig->orig)) { 758 if (compare_eth(primary_addr, router_orig->orig)) {
756 primary_orig_node = router_orig; 759 primary_orig_node = router_orig;
757 } else { 760 } else {
758 primary_orig_node = orig_hash_find(bat_priv, 761 primary_orig_node = batadv_orig_hash_find(bat_priv,
759 router_orig->primary_addr); 762 primary_addr);
760 if (!primary_orig_node) 763 if (!primary_orig_node)
761 goto return_router; 764 goto return_router;
762 765
@@ -839,7 +842,7 @@ static int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
839 } 842 }
840 843
841 /* get routing information */ 844 /* get routing information */
842 orig_node = orig_hash_find(bat_priv, unicast_packet->dest); 845 orig_node = batadv_orig_hash_find(bat_priv, unicast_packet->dest);
843 846
844 if (!orig_node) 847 if (!orig_node)
845 goto out; 848 goto out;
@@ -922,7 +925,8 @@ static int check_unicast_ttvn(struct bat_priv *bat_priv,
922 tt_poss_change = bat_priv->tt_poss_change; 925 tt_poss_change = bat_priv->tt_poss_change;
923 curr_ttvn = (uint8_t)atomic_read(&bat_priv->ttvn); 926 curr_ttvn = (uint8_t)atomic_read(&bat_priv->ttvn);
924 } else { 927 } else {
925 orig_node = orig_hash_find(bat_priv, unicast_packet->dest); 928 orig_node = batadv_orig_hash_find(bat_priv,
929 unicast_packet->dest);
926 930
927 if (!orig_node) 931 if (!orig_node)
928 return 0; 932 return 0;
@@ -1078,7 +1082,7 @@ int batadv_recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1078 if (bcast_packet->header.ttl < 2) 1082 if (bcast_packet->header.ttl < 2)
1079 goto out; 1083 goto out;
1080 1084
1081 orig_node = orig_hash_find(bat_priv, bcast_packet->orig); 1085 orig_node = batadv_orig_hash_find(bat_priv, bcast_packet->orig);
1082 1086
1083 if (!orig_node) 1087 if (!orig_node)
1084 goto out; 1088 goto out;