From 3193e8fdfa355289892661d206d1954114a7be95 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 12 May 2012 02:09:42 +0200 Subject: batman-adv: Prefix main 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 Signed-off-by: Sven Eckelmann --- net/batman-adv/vis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'net/batman-adv/vis.c') diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 24040c300636..83c931fa5c21 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c @@ -462,7 +462,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv, /* Make it a broadcast packet, if required */ if (make_broadcast) - memcpy(packet->target_orig, broadcast_addr, ETH_ALEN); + memcpy(packet->target_orig, batadv_broadcast_addr, ETH_ALEN); /* repair if entries is longer than packet. */ if (packet->entries * sizeof(struct vis_info_entry) > vis_info_len) @@ -524,7 +524,7 @@ void batadv_receive_client_update_packet(struct bat_priv *bat_priv, /* Are we the target for this VIS packet? */ if (vis_server == VIS_TYPE_SERVER_SYNC && - is_my_mac(vis_packet->target_orig)) + batadv_is_my_mac(vis_packet->target_orig)) are_target = 1; spin_lock_bh(&bat_priv->vis_hash_lock); @@ -543,7 +543,7 @@ void batadv_receive_client_update_packet(struct bat_priv *bat_priv, send_list_add(bat_priv, info); /* ... we're not the recipient (and thus need to forward). */ - } else if (!is_my_mac(packet->target_orig)) { + } else if (!batadv_is_my_mac(packet->target_orig)) { send_list_add(bat_priv, info); } @@ -623,7 +623,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv) info->first_seen = jiffies; packet->vis_type = atomic_read(&bat_priv->vis_mode); - memcpy(packet->target_orig, broadcast_addr, ETH_ALEN); + memcpy(packet->target_orig, batadv_broadcast_addr, ETH_ALEN); packet->header.ttl = TTL; packet->seqno = htonl(ntohl(packet->seqno) + 1); packet->entries = 0; @@ -978,6 +978,6 @@ void batadv_vis_quit(struct bat_priv *bat_priv) static void start_vis_timer(struct bat_priv *bat_priv) { INIT_DELAYED_WORK(&bat_priv->vis_work, send_vis_packets); - queue_delayed_work(bat_event_workqueue, &bat_priv->vis_work, + queue_delayed_work(batadv_event_workqueue, &bat_priv->vis_work, msecs_to_jiffies(VIS_INTERVAL)); } -- cgit v1.2.3