diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:36 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:25 -0400 |
commit | 30d3c5113f9a3f162d65d01b771b122afac0ce79 (patch) | |
tree | da443b3ff6ddcc0b9ffadd0b0626ac48cb1e8325 /net/batman-adv/bat_iv_ogm.c | |
parent | 925a6672fae532ba178b8d35686705b417aada3d (diff) |
batman-adv: Prefix routing 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/bat_iv_ogm.c')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index cd57cf2022c5..f48467ff6713 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -599,7 +599,7 @@ static void bat_iv_ogm_schedule(struct hard_iface *hard_iface) | |||
599 | else | 599 | else |
600 | batman_ogm_packet->gw_flags = NO_FLAGS; | 600 | batman_ogm_packet->gw_flags = NO_FLAGS; |
601 | 601 | ||
602 | slide_own_bcast_window(hard_iface); | 602 | batadv_slide_own_bcast_window(hard_iface); |
603 | bat_iv_ogm_queue_add(bat_priv, hard_iface->packet_buff, | 603 | bat_iv_ogm_queue_add(bat_priv, hard_iface->packet_buff, |
604 | hard_iface->packet_len, hard_iface, 1, | 604 | hard_iface->packet_len, hard_iface, 1, |
605 | bat_iv_ogm_emit_send_time(bat_priv)); | 605 | bat_iv_ogm_emit_send_time(bat_priv)); |
@@ -684,7 +684,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv, | |||
684 | neigh_node->last_ttl = batman_ogm_packet->header.ttl; | 684 | neigh_node->last_ttl = batman_ogm_packet->header.ttl; |
685 | } | 685 | } |
686 | 686 | ||
687 | bonding_candidate_add(orig_node, neigh_node); | 687 | batadv_bonding_candidate_add(orig_node, neigh_node); |
688 | 688 | ||
689 | /* if this neighbor already is our next hop there is nothing | 689 | /* if this neighbor already is our next hop there is nothing |
690 | * to change */ | 690 | * to change */ |
@@ -715,7 +715,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv, | |||
715 | goto update_tt; | 715 | goto update_tt; |
716 | } | 716 | } |
717 | 717 | ||
718 | update_route(bat_priv, orig_node, neigh_node); | 718 | batadv_update_route(bat_priv, orig_node, neigh_node); |
719 | 719 | ||
720 | update_tt: | 720 | update_tt: |
721 | /* I have to check for transtable changes only if the OGM has been | 721 | /* I have to check for transtable changes only if the OGM has been |
@@ -884,8 +884,8 @@ static int bat_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, | |||
884 | 884 | ||
885 | /* signalize caller that the packet is to be dropped. */ | 885 | /* signalize caller that the packet is to be dropped. */ |
886 | if (!hlist_empty(&orig_node->neigh_list) && | 886 | if (!hlist_empty(&orig_node->neigh_list) && |
887 | window_protected(bat_priv, seq_diff, | 887 | batadv_window_protected(bat_priv, seq_diff, |
888 | &orig_node->batman_seqno_reset)) | 888 | &orig_node->batman_seqno_reset)) |
889 | goto out; | 889 | goto out; |
890 | 890 | ||
891 | rcu_read_lock(); | 891 | rcu_read_lock(); |
@@ -1133,7 +1133,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, | |||
1133 | is_bidirectional = bat_iv_ogm_calc_tq(orig_node, orig_neigh_node, | 1133 | is_bidirectional = bat_iv_ogm_calc_tq(orig_node, orig_neigh_node, |
1134 | batman_ogm_packet, if_incoming); | 1134 | batman_ogm_packet, if_incoming); |
1135 | 1135 | ||
1136 | bonding_save_primary(orig_node, orig_neigh_node, batman_ogm_packet); | 1136 | batadv_bonding_save_primary(orig_node, orig_neigh_node, |
1137 | batman_ogm_packet); | ||
1137 | 1138 | ||
1138 | /* update ranking if it is not a duplicate or has the same | 1139 | /* update ranking if it is not a duplicate or has the same |
1139 | * seqno and similar ttl as the non-duplicate */ | 1140 | * seqno and similar ttl as the non-duplicate */ |
@@ -1201,7 +1202,7 @@ static int bat_iv_ogm_receive(struct sk_buff *skb, | |||
1201 | unsigned char *tt_buff, *packet_buff; | 1202 | unsigned char *tt_buff, *packet_buff; |
1202 | bool ret; | 1203 | bool ret; |
1203 | 1204 | ||
1204 | ret = check_management_packet(skb, if_incoming, BATMAN_OGM_HLEN); | 1205 | ret = batadv_check_management_packet(skb, if_incoming, BATMAN_OGM_HLEN); |
1205 | if (!ret) | 1206 | if (!ret) |
1206 | return NET_RX_DROP; | 1207 | return NET_RX_DROP; |
1207 | 1208 | ||