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 | |
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>
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 15 | ||||
-rw-r--r-- | net/batman-adv/gateway_client.c | 5 | ||||
-rw-r--r-- | net/batman-adv/main.c | 14 | ||||
-rw-r--r-- | net/batman-adv/originator.c | 5 | ||||
-rw-r--r-- | net/batman-adv/routing.c | 60 | ||||
-rw-r--r-- | net/batman-adv/routing.h | 52 | ||||
-rw-r--r-- | net/batman-adv/unicast.c | 3 |
7 files changed, 80 insertions, 74 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 | ||
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index e92055da5074..2bf330d16485 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c | |||
@@ -682,7 +682,8 @@ bool batadv_gw_out_of_range(struct bat_priv *bat_priv, | |||
682 | /* If the dhcp packet has been sent to a different gw, | 682 | /* If the dhcp packet has been sent to a different gw, |
683 | * we have to evaluate whether the old gw is still | 683 | * we have to evaluate whether the old gw is still |
684 | * reliable enough */ | 684 | * reliable enough */ |
685 | neigh_curr = find_router(bat_priv, curr_gw->orig_node, NULL); | 685 | neigh_curr = batadv_find_router(bat_priv, curr_gw->orig_node, |
686 | NULL); | ||
686 | if (!neigh_curr) | 687 | if (!neigh_curr) |
687 | goto out; | 688 | goto out; |
688 | 689 | ||
@@ -693,7 +694,7 @@ bool batadv_gw_out_of_range(struct bat_priv *bat_priv, | |||
693 | goto out; | 694 | goto out; |
694 | } | 695 | } |
695 | 696 | ||
696 | neigh_old = find_router(bat_priv, orig_dst_node, NULL); | 697 | neigh_old = batadv_find_router(bat_priv, orig_dst_node, NULL); |
697 | if (!neigh_old) | 698 | if (!neigh_old) |
698 | goto out; | 699 | goto out; |
699 | 700 | ||
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index eba5d2899b25..92f39b50de6c 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -272,19 +272,19 @@ static void recv_handler_init(void) | |||
272 | recv_packet_handler[i] = recv_unhandled_packet; | 272 | recv_packet_handler[i] = recv_unhandled_packet; |
273 | 273 | ||
274 | /* batman icmp packet */ | 274 | /* batman icmp packet */ |
275 | recv_packet_handler[BAT_ICMP] = recv_icmp_packet; | 275 | recv_packet_handler[BAT_ICMP] = batadv_recv_icmp_packet; |
276 | /* unicast packet */ | 276 | /* unicast packet */ |
277 | recv_packet_handler[BAT_UNICAST] = recv_unicast_packet; | 277 | recv_packet_handler[BAT_UNICAST] = batadv_recv_unicast_packet; |
278 | /* fragmented unicast packet */ | 278 | /* fragmented unicast packet */ |
279 | recv_packet_handler[BAT_UNICAST_FRAG] = recv_ucast_frag_packet; | 279 | recv_packet_handler[BAT_UNICAST_FRAG] = batadv_recv_ucast_frag_packet; |
280 | /* broadcast packet */ | 280 | /* broadcast packet */ |
281 | recv_packet_handler[BAT_BCAST] = recv_bcast_packet; | 281 | recv_packet_handler[BAT_BCAST] = batadv_recv_bcast_packet; |
282 | /* vis packet */ | 282 | /* vis packet */ |
283 | recv_packet_handler[BAT_VIS] = recv_vis_packet; | 283 | recv_packet_handler[BAT_VIS] = batadv_recv_vis_packet; |
284 | /* Translation table query (request or response) */ | 284 | /* Translation table query (request or response) */ |
285 | recv_packet_handler[BAT_TT_QUERY] = recv_tt_query; | 285 | recv_packet_handler[BAT_TT_QUERY] = batadv_recv_tt_query; |
286 | /* Roaming advertisement */ | 286 | /* Roaming advertisement */ |
287 | recv_packet_handler[BAT_ROAM_ADV] = recv_roam_adv; | 287 | recv_packet_handler[BAT_ROAM_ADV] = batadv_recv_roam_adv; |
288 | } | 288 | } |
289 | 289 | ||
290 | int recv_handler_register(uint8_t packet_type, | 290 | int recv_handler_register(uint8_t packet_type, |
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 93585132049f..12c2e1ed2560 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -307,7 +307,7 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv, | |||
307 | neigh_purged = true; | 307 | neigh_purged = true; |
308 | 308 | ||
309 | hlist_del_rcu(&neigh_node->list); | 309 | hlist_del_rcu(&neigh_node->list); |
310 | bonding_candidate_del(orig_node, neigh_node); | 310 | batadv_bonding_candidate_del(orig_node, neigh_node); |
311 | batadv_neigh_node_free_ref(neigh_node); | 311 | batadv_neigh_node_free_ref(neigh_node); |
312 | } else { | 312 | } else { |
313 | if ((!*best_neigh_node) || | 313 | if ((!*best_neigh_node) || |
@@ -334,7 +334,8 @@ static bool purge_orig_node(struct bat_priv *bat_priv, | |||
334 | } else { | 334 | } else { |
335 | if (purge_orig_neighbors(bat_priv, orig_node, | 335 | if (purge_orig_neighbors(bat_priv, orig_node, |
336 | &best_neigh_node)) | 336 | &best_neigh_node)) |
337 | update_route(bat_priv, orig_node, best_neigh_node); | 337 | batadv_update_route(bat_priv, orig_node, |
338 | best_neigh_node); | ||
338 | } | 339 | } |
339 | 340 | ||
340 | return false; | 341 | return false; |
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 77fe46065db6..631b40b65451 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -34,7 +34,7 @@ | |||
34 | static int route_unicast_packet(struct sk_buff *skb, | 34 | static int route_unicast_packet(struct sk_buff *skb, |
35 | struct hard_iface *recv_if); | 35 | struct hard_iface *recv_if); |
36 | 36 | ||
37 | void slide_own_bcast_window(struct hard_iface *hard_iface) | 37 | void batadv_slide_own_bcast_window(struct hard_iface *hard_iface) |
38 | { | 38 | { |
39 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 39 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
40 | struct hashtable_t *hash = bat_priv->orig_hash; | 40 | struct hashtable_t *hash = bat_priv->orig_hash; |
@@ -108,8 +108,8 @@ static void _update_route(struct bat_priv *bat_priv, | |||
108 | batadv_neigh_node_free_ref(curr_router); | 108 | batadv_neigh_node_free_ref(curr_router); |
109 | } | 109 | } |
110 | 110 | ||
111 | void update_route(struct bat_priv *bat_priv, struct orig_node *orig_node, | 111 | void batadv_update_route(struct bat_priv *bat_priv, struct orig_node *orig_node, |
112 | struct neigh_node *neigh_node) | 112 | struct neigh_node *neigh_node) |
113 | { | 113 | { |
114 | struct neigh_node *router = NULL; | 114 | struct neigh_node *router = NULL; |
115 | 115 | ||
@@ -127,8 +127,8 @@ out: | |||
127 | } | 127 | } |
128 | 128 | ||
129 | /* caller must hold the neigh_list_lock */ | 129 | /* caller must hold the neigh_list_lock */ |
130 | void bonding_candidate_del(struct orig_node *orig_node, | 130 | void batadv_bonding_candidate_del(struct orig_node *orig_node, |
131 | struct neigh_node *neigh_node) | 131 | struct neigh_node *neigh_node) |
132 | { | 132 | { |
133 | /* this neighbor is not part of our candidate list */ | 133 | /* this neighbor is not part of our candidate list */ |
134 | if (list_empty(&neigh_node->bonding_list)) | 134 | if (list_empty(&neigh_node->bonding_list)) |
@@ -143,8 +143,8 @@ out: | |||
143 | return; | 143 | return; |
144 | } | 144 | } |
145 | 145 | ||
146 | void bonding_candidate_add(struct orig_node *orig_node, | 146 | void batadv_bonding_candidate_add(struct orig_node *orig_node, |
147 | struct neigh_node *neigh_node) | 147 | struct neigh_node *neigh_node) |
148 | { | 148 | { |
149 | struct hlist_node *node; | 149 | struct hlist_node *node; |
150 | struct neigh_node *tmp_neigh_node, *router = NULL; | 150 | struct neigh_node *tmp_neigh_node, *router = NULL; |
@@ -204,7 +204,7 @@ void bonding_candidate_add(struct orig_node *orig_node, | |||
204 | goto out; | 204 | goto out; |
205 | 205 | ||
206 | candidate_del: | 206 | candidate_del: |
207 | bonding_candidate_del(orig_node, neigh_node); | 207 | batadv_bonding_candidate_del(orig_node, neigh_node); |
208 | 208 | ||
209 | out: | 209 | out: |
210 | spin_unlock_bh(&orig_node->neigh_list_lock); | 210 | spin_unlock_bh(&orig_node->neigh_list_lock); |
@@ -214,9 +214,10 @@ out: | |||
214 | } | 214 | } |
215 | 215 | ||
216 | /* copy primary address for bonding */ | 216 | /* copy primary address for bonding */ |
217 | void bonding_save_primary(const struct orig_node *orig_node, | 217 | void |
218 | struct orig_node *orig_neigh_node, | 218 | batadv_bonding_save_primary(const struct orig_node *orig_node, |
219 | const struct batman_ogm_packet *batman_ogm_packet) | 219 | struct orig_node *orig_neigh_node, |
220 | const struct batman_ogm_packet *batman_ogm_packet) | ||
220 | { | 221 | { |
221 | if (!(batman_ogm_packet->flags & PRIMARIES_FIRST_HOP)) | 222 | if (!(batman_ogm_packet->flags & PRIMARIES_FIRST_HOP)) |
222 | return; | 223 | return; |
@@ -229,8 +230,8 @@ void bonding_save_primary(const struct orig_node *orig_node, | |||
229 | * 0 if the packet is to be accepted | 230 | * 0 if the packet is to be accepted |
230 | * 1 if the packet is to be ignored. | 231 | * 1 if the packet is to be ignored. |
231 | */ | 232 | */ |
232 | int window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff, | 233 | int batadv_window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff, |
233 | unsigned long *last_reset) | 234 | unsigned long *last_reset) |
234 | { | 235 | { |
235 | if ((seq_num_diff <= -TQ_LOCAL_WINDOW_SIZE) || | 236 | if ((seq_num_diff <= -TQ_LOCAL_WINDOW_SIZE) || |
236 | (seq_num_diff >= EXPECTED_SEQNO_RANGE)) { | 237 | (seq_num_diff >= EXPECTED_SEQNO_RANGE)) { |
@@ -245,9 +246,9 @@ int window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff, | |||
245 | return 0; | 246 | return 0; |
246 | } | 247 | } |
247 | 248 | ||
248 | bool check_management_packet(struct sk_buff *skb, | 249 | bool batadv_check_management_packet(struct sk_buff *skb, |
249 | struct hard_iface *hard_iface, | 250 | struct hard_iface *hard_iface, |
250 | int header_len) | 251 | int header_len) |
251 | { | 252 | { |
252 | struct ethhdr *ethhdr; | 253 | struct ethhdr *ethhdr; |
253 | 254 | ||
@@ -387,7 +388,7 @@ out: | |||
387 | } | 388 | } |
388 | 389 | ||
389 | 390 | ||
390 | int recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if) | 391 | int batadv_recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if) |
391 | { | 392 | { |
392 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); | 393 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); |
393 | struct icmp_packet_rr *icmp_packet; | 394 | struct icmp_packet_rr *icmp_packet; |
@@ -569,7 +570,7 @@ static struct neigh_node *find_ifalter_router(struct orig_node *primary_orig, | |||
569 | return router; | 570 | return router; |
570 | } | 571 | } |
571 | 572 | ||
572 | int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) | 573 | int batadv_recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) |
573 | { | 574 | { |
574 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); | 575 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); |
575 | struct tt_query_packet *tt_query; | 576 | struct tt_query_packet *tt_query; |
@@ -644,7 +645,7 @@ out: | |||
644 | return NET_RX_DROP; | 645 | return NET_RX_DROP; |
645 | } | 646 | } |
646 | 647 | ||
647 | int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if) | 648 | int batadv_recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if) |
648 | { | 649 | { |
649 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); | 650 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); |
650 | struct roam_adv_packet *roam_adv_packet; | 651 | struct roam_adv_packet *roam_adv_packet; |
@@ -704,9 +705,9 @@ out: | |||
704 | /* find a suitable router for this originator, and use | 705 | /* find a suitable router for this originator, and use |
705 | * bonding if possible. increases the found neighbors | 706 | * bonding if possible. increases the found neighbors |
706 | * refcount.*/ | 707 | * refcount.*/ |
707 | struct neigh_node *find_router(struct bat_priv *bat_priv, | 708 | struct neigh_node *batadv_find_router(struct bat_priv *bat_priv, |
708 | struct orig_node *orig_node, | 709 | struct orig_node *orig_node, |
709 | const struct hard_iface *recv_if) | 710 | const struct hard_iface *recv_if) |
710 | { | 711 | { |
711 | struct orig_node *primary_orig_node; | 712 | struct orig_node *primary_orig_node; |
712 | struct orig_node *router_orig; | 713 | struct orig_node *router_orig; |
@@ -834,7 +835,7 @@ static int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
834 | goto out; | 835 | goto out; |
835 | 836 | ||
836 | /* find_router() increases neigh_nodes refcount if found. */ | 837 | /* find_router() increases neigh_nodes refcount if found. */ |
837 | neigh_node = find_router(bat_priv, orig_node, recv_if); | 838 | neigh_node = batadv_find_router(bat_priv, orig_node, recv_if); |
838 | 839 | ||
839 | if (!neigh_node) | 840 | if (!neigh_node) |
840 | goto out; | 841 | goto out; |
@@ -965,7 +966,7 @@ static int check_unicast_ttvn(struct bat_priv *bat_priv, | |||
965 | return 1; | 966 | return 1; |
966 | } | 967 | } |
967 | 968 | ||
968 | int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | 969 | int batadv_recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if) |
969 | { | 970 | { |
970 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); | 971 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); |
971 | struct unicast_packet *unicast_packet; | 972 | struct unicast_packet *unicast_packet; |
@@ -988,7 +989,8 @@ int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
988 | return route_unicast_packet(skb, recv_if); | 989 | return route_unicast_packet(skb, recv_if); |
989 | } | 990 | } |
990 | 991 | ||
991 | int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if) | 992 | int batadv_recv_ucast_frag_packet(struct sk_buff *skb, |
993 | struct hard_iface *recv_if) | ||
992 | { | 994 | { |
993 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); | 995 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); |
994 | struct unicast_frag_packet *unicast_packet; | 996 | struct unicast_frag_packet *unicast_packet; |
@@ -1025,7 +1027,7 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
1025 | } | 1027 | } |
1026 | 1028 | ||
1027 | 1029 | ||
1028 | int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | 1030 | int batadv_recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if) |
1029 | { | 1031 | { |
1030 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); | 1032 | struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); |
1031 | struct orig_node *orig_node = NULL; | 1033 | struct orig_node *orig_node = NULL; |
@@ -1077,8 +1079,8 @@ int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if) | |||
1077 | seq_diff = ntohl(bcast_packet->seqno) - orig_node->last_bcast_seqno; | 1079 | seq_diff = ntohl(bcast_packet->seqno) - orig_node->last_bcast_seqno; |
1078 | 1080 | ||
1079 | /* check whether the packet is old and the host just restarted. */ | 1081 | /* check whether the packet is old and the host just restarted. */ |
1080 | if (window_protected(bat_priv, seq_diff, | 1082 | if (batadv_window_protected(bat_priv, seq_diff, |
1081 | &orig_node->bcast_seqno_reset)) | 1083 | &orig_node->bcast_seqno_reset)) |
1082 | goto spin_unlock; | 1084 | goto spin_unlock; |
1083 | 1085 | ||
1084 | /* mark broadcast in flood history, update window position | 1086 | /* mark broadcast in flood history, update window position |
@@ -1114,7 +1116,7 @@ out: | |||
1114 | return ret; | 1116 | return ret; |
1115 | } | 1117 | } |
1116 | 1118 | ||
1117 | int recv_vis_packet(struct sk_buff *skb, struct hard_iface *recv_if) | 1119 | int batadv_recv_vis_packet(struct sk_buff *skb, struct hard_iface *recv_if) |
1118 | { | 1120 | { |
1119 | struct vis_packet *vis_packet; | 1121 | struct vis_packet *vis_packet; |
1120 | struct ethhdr *ethhdr; | 1122 | struct ethhdr *ethhdr; |
diff --git a/net/batman-adv/routing.h b/net/batman-adv/routing.h index d6bbbebb6567..4652f0c147f5 100644 --- a/net/batman-adv/routing.h +++ b/net/batman-adv/routing.h | |||
@@ -22,30 +22,32 @@ | |||
22 | #ifndef _NET_BATMAN_ADV_ROUTING_H_ | 22 | #ifndef _NET_BATMAN_ADV_ROUTING_H_ |
23 | #define _NET_BATMAN_ADV_ROUTING_H_ | 23 | #define _NET_BATMAN_ADV_ROUTING_H_ |
24 | 24 | ||
25 | void slide_own_bcast_window(struct hard_iface *hard_iface); | 25 | void batadv_slide_own_bcast_window(struct hard_iface *hard_iface); |
26 | bool check_management_packet(struct sk_buff *skb, | 26 | bool batadv_check_management_packet(struct sk_buff *skb, |
27 | struct hard_iface *hard_iface, | 27 | struct hard_iface *hard_iface, |
28 | int header_len); | 28 | int header_len); |
29 | void update_route(struct bat_priv *bat_priv, struct orig_node *orig_node, | 29 | void batadv_update_route(struct bat_priv *bat_priv, struct orig_node *orig_node, |
30 | struct neigh_node *neigh_node); | 30 | struct neigh_node *neigh_node); |
31 | int recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if); | 31 | int batadv_recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if); |
32 | int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if); | 32 | int batadv_recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if); |
33 | int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if); | 33 | int batadv_recv_ucast_frag_packet(struct sk_buff *skb, |
34 | int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if); | 34 | struct hard_iface *recv_if); |
35 | int recv_vis_packet(struct sk_buff *skb, struct hard_iface *recv_if); | 35 | int batadv_recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if); |
36 | int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if); | 36 | int batadv_recv_vis_packet(struct sk_buff *skb, struct hard_iface *recv_if); |
37 | int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if); | 37 | int batadv_recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if); |
38 | struct neigh_node *find_router(struct bat_priv *bat_priv, | 38 | int batadv_recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if); |
39 | struct orig_node *orig_node, | 39 | struct neigh_node *batadv_find_router(struct bat_priv *bat_priv, |
40 | const struct hard_iface *recv_if); | 40 | struct orig_node *orig_node, |
41 | void bonding_candidate_del(struct orig_node *orig_node, | 41 | const struct hard_iface *recv_if); |
42 | struct neigh_node *neigh_node); | 42 | void batadv_bonding_candidate_del(struct orig_node *orig_node, |
43 | void bonding_candidate_add(struct orig_node *orig_node, | 43 | struct neigh_node *neigh_node); |
44 | struct neigh_node *neigh_node); | 44 | void batadv_bonding_candidate_add(struct orig_node *orig_node, |
45 | void bonding_save_primary(const struct orig_node *orig_node, | 45 | struct neigh_node *neigh_node); |
46 | struct orig_node *orig_neigh_node, | 46 | void batadv_bonding_save_primary(const struct orig_node *orig_node, |
47 | const struct batman_ogm_packet *batman_ogm_packet); | 47 | struct orig_node *orig_neigh_node, |
48 | int window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff, | 48 | const struct batman_ogm_packet |
49 | unsigned long *last_reset); | 49 | *batman_ogm_packet); |
50 | int batadv_window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff, | ||
51 | unsigned long *last_reset); | ||
50 | 52 | ||
51 | #endif /* _NET_BATMAN_ADV_ROUTING_H_ */ | 53 | #endif /* _NET_BATMAN_ADV_ROUTING_H_ */ |
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 6117100c292c..894c6a416dac 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
@@ -310,8 +310,7 @@ find_router: | |||
310 | * - if orig_node is NULL it returns NULL | 310 | * - if orig_node is NULL it returns NULL |
311 | * - increases neigh_nodes refcount if found. | 311 | * - increases neigh_nodes refcount if found. |
312 | */ | 312 | */ |
313 | neigh_node = find_router(bat_priv, orig_node, NULL); | 313 | neigh_node = batadv_find_router(bat_priv, orig_node, NULL); |
314 | |||
315 | if (!neigh_node) | 314 | if (!neigh_node) |
316 | goto out; | 315 | goto out; |
317 | 316 | ||