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>
This commit is contained in:

committed by
Antonio Quartulli

parent
925a6672fa
commit
30d3c5113f
@@ -272,19 +272,19 @@ static void recv_handler_init(void)
|
||||
recv_packet_handler[i] = recv_unhandled_packet;
|
||||
|
||||
/* batman icmp packet */
|
||||
recv_packet_handler[BAT_ICMP] = recv_icmp_packet;
|
||||
recv_packet_handler[BAT_ICMP] = batadv_recv_icmp_packet;
|
||||
/* unicast packet */
|
||||
recv_packet_handler[BAT_UNICAST] = recv_unicast_packet;
|
||||
recv_packet_handler[BAT_UNICAST] = batadv_recv_unicast_packet;
|
||||
/* fragmented unicast packet */
|
||||
recv_packet_handler[BAT_UNICAST_FRAG] = recv_ucast_frag_packet;
|
||||
recv_packet_handler[BAT_UNICAST_FRAG] = batadv_recv_ucast_frag_packet;
|
||||
/* broadcast packet */
|
||||
recv_packet_handler[BAT_BCAST] = recv_bcast_packet;
|
||||
recv_packet_handler[BAT_BCAST] = batadv_recv_bcast_packet;
|
||||
/* vis packet */
|
||||
recv_packet_handler[BAT_VIS] = recv_vis_packet;
|
||||
recv_packet_handler[BAT_VIS] = batadv_recv_vis_packet;
|
||||
/* Translation table query (request or response) */
|
||||
recv_packet_handler[BAT_TT_QUERY] = recv_tt_query;
|
||||
recv_packet_handler[BAT_TT_QUERY] = batadv_recv_tt_query;
|
||||
/* Roaming advertisement */
|
||||
recv_packet_handler[BAT_ROAM_ADV] = recv_roam_adv;
|
||||
recv_packet_handler[BAT_ROAM_ADV] = batadv_recv_roam_adv;
|
||||
}
|
||||
|
||||
int recv_handler_register(uint8_t packet_type,
|
||||
|
Reference in New Issue
Block a user