aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/vis.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:34 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:23 -0400
commit7d211efc5087bc8870fa3374da88b4bf8159e79b (patch)
tree1cd6c7b6543610f7e684ac20988735c7c6d1c8fa /net/batman-adv/vis.c
parent9039dc7e8a42864744665bf0905f48c2724f6e3e (diff)
batman-adv: Prefix originator non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r--net/batman-adv/vis.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index 99f1931472f3..1972a11aace1 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -574,7 +574,7 @@ static int find_best_vis_server(struct bat_priv *bat_priv,
574 574
575 rcu_read_lock(); 575 rcu_read_lock();
576 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { 576 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) {
577 router = orig_node_get_router(orig_node); 577 router = batadv_orig_node_get_router(orig_node);
578 if (!router) 578 if (!router)
579 continue; 579 continue;
580 580
@@ -584,7 +584,7 @@ static int find_best_vis_server(struct bat_priv *bat_priv,
584 memcpy(packet->target_orig, orig_node->orig, 584 memcpy(packet->target_orig, orig_node->orig,
585 ETH_ALEN); 585 ETH_ALEN);
586 } 586 }
587 neigh_node_free_ref(router); 587 batadv_neigh_node_free_ref(router);
588 } 588 }
589 rcu_read_unlock(); 589 rcu_read_unlock();
590 } 590 }
@@ -641,7 +641,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
641 641
642 rcu_read_lock(); 642 rcu_read_lock();
643 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { 643 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) {
644 router = orig_node_get_router(orig_node); 644 router = batadv_orig_node_get_router(orig_node);
645 if (!router) 645 if (!router)
646 continue; 646 continue;
647 647
@@ -665,7 +665,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
665 packet->entries++; 665 packet->entries++;
666 666
667next: 667next:
668 neigh_node_free_ref(router); 668 batadv_neigh_node_free_ref(router);
669 669
670 if (vis_packet_full(info)) 670 if (vis_packet_full(info))
671 goto unlock; 671 goto unlock;
@@ -757,7 +757,7 @@ static void broadcast_vis_packet(struct bat_priv *bat_priv,
757 if (!(orig_node->flags & VIS_SERVER)) 757 if (!(orig_node->flags & VIS_SERVER))
758 continue; 758 continue;
759 759
760 router = orig_node_get_router(orig_node); 760 router = batadv_orig_node_get_router(orig_node);
761 if (!router) 761 if (!router)
762 continue; 762 continue;
763 763
@@ -765,7 +765,7 @@ static void broadcast_vis_packet(struct bat_priv *bat_priv,
765 * this node. */ 765 * this node. */
766 if (recv_list_is_in(bat_priv, &info->recv_list, 766 if (recv_list_is_in(bat_priv, &info->recv_list,
767 orig_node->orig)) { 767 orig_node->orig)) {
768 neigh_node_free_ref(router); 768 batadv_neigh_node_free_ref(router);
769 continue; 769 continue;
770 } 770 }
771 771
@@ -773,7 +773,7 @@ static void broadcast_vis_packet(struct bat_priv *bat_priv,
773 hard_iface = router->if_incoming; 773 hard_iface = router->if_incoming;
774 memcpy(dstaddr, router->addr, ETH_ALEN); 774 memcpy(dstaddr, router->addr, ETH_ALEN);
775 775
776 neigh_node_free_ref(router); 776 batadv_neigh_node_free_ref(router);
777 777
778 skb = skb_clone(info->skb_packet, GFP_ATOMIC); 778 skb = skb_clone(info->skb_packet, GFP_ATOMIC);
779 if (skb) 779 if (skb)
@@ -798,7 +798,7 @@ static void unicast_vis_packet(struct bat_priv *bat_priv,
798 if (!orig_node) 798 if (!orig_node)
799 goto out; 799 goto out;
800 800
801 router = orig_node_get_router(orig_node); 801 router = batadv_orig_node_get_router(orig_node);
802 if (!router) 802 if (!router)
803 goto out; 803 goto out;
804 804
@@ -808,9 +808,9 @@ static void unicast_vis_packet(struct bat_priv *bat_priv,
808 808
809out: 809out:
810 if (router) 810 if (router)
811 neigh_node_free_ref(router); 811 batadv_neigh_node_free_ref(router);
812 if (orig_node) 812 if (orig_node)
813 orig_node_free_ref(orig_node); 813 batadv_orig_node_free_ref(orig_node);
814} 814}
815 815
816/* only send one vis packet. called from send_vis_packets() */ 816/* only send one vis packet. called from send_vis_packets() */