aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/unicast.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:40 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:30 -0400
commit88ed1e7772bbedfd0bb013c209f61619eca0a781 (patch)
treea3a47bbec633ca411ba06cb0ab5177740ec5f387 /net/batman-adv/unicast.c
parent08c36d3e8ad1f73d3b0322842363b23f6d203630 (diff)
batman-adv: Prefix unicast 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/unicast.c')
-rw-r--r--net/batman-adv/unicast.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index 5e699db700b3..e9d3bdd4e3d6 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -101,7 +101,7 @@ static int frag_create_buffer(struct list_head *head)
101 for (i = 0; i < FRAG_BUFFER_SIZE; i++) { 101 for (i = 0; i < FRAG_BUFFER_SIZE; i++) {
102 tfp = kmalloc(sizeof(*tfp), GFP_ATOMIC); 102 tfp = kmalloc(sizeof(*tfp), GFP_ATOMIC);
103 if (!tfp) { 103 if (!tfp) {
104 frag_list_free(head); 104 batadv_frag_list_free(head);
105 return -ENOMEM; 105 return -ENOMEM;
106 } 106 }
107 tfp->skb = NULL; 107 tfp->skb = NULL;
@@ -151,7 +151,7 @@ mov_tail:
151 return NULL; 151 return NULL;
152} 152}
153 153
154void frag_list_free(struct list_head *head) 154void batadv_frag_list_free(struct list_head *head)
155{ 155{
156 struct frag_packet_list_entry *pf, *tmp_pf; 156 struct frag_packet_list_entry *pf, *tmp_pf;
157 157
@@ -172,8 +172,8 @@ void frag_list_free(struct list_head *head)
172 * or the skb could be reassembled (skb_new will point to the new packet and 172 * or the skb could be reassembled (skb_new will point to the new packet and
173 * skb was freed) 173 * skb was freed)
174 */ 174 */
175int frag_reassemble_skb(struct sk_buff *skb, struct bat_priv *bat_priv, 175int batadv_frag_reassemble_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
176 struct sk_buff **new_skb) 176 struct sk_buff **new_skb)
177{ 177{
178 struct orig_node *orig_node; 178 struct orig_node *orig_node;
179 struct frag_packet_list_entry *tmp_frag_entry; 179 struct frag_packet_list_entry *tmp_frag_entry;
@@ -216,8 +216,8 @@ out:
216 return ret; 216 return ret;
217} 217}
218 218
219int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, 219int batadv_frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
220 struct hard_iface *hard_iface, const uint8_t dstaddr[]) 220 struct hard_iface *hard_iface, const uint8_t dstaddr[])
221{ 221{
222 struct unicast_packet tmp_uc, *unicast_packet; 222 struct unicast_packet tmp_uc, *unicast_packet;
223 struct hard_iface *primary_if; 223 struct hard_iface *primary_if;
@@ -283,7 +283,7 @@ out:
283 return ret; 283 return ret;
284} 284}
285 285
286int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) 286int batadv_unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
287{ 287{
288 struct ethhdr *ethhdr = (struct ethhdr *)skb->data; 288 struct ethhdr *ethhdr = (struct ethhdr *)skb->data;
289 struct unicast_packet *unicast_packet; 289 struct unicast_packet *unicast_packet;
@@ -342,8 +342,9 @@ find_router:
342 neigh_node->if_incoming->net_dev->mtu) { 342 neigh_node->if_incoming->net_dev->mtu) {
343 /* send frag skb decreases ttl */ 343 /* send frag skb decreases ttl */
344 unicast_packet->header.ttl++; 344 unicast_packet->header.ttl++;
345 ret = frag_send_skb(skb, bat_priv, 345 ret = batadv_frag_send_skb(skb, bat_priv,
346 neigh_node->if_incoming, neigh_node->addr); 346 neigh_node->if_incoming,
347 neigh_node->addr);
347 goto out; 348 goto out;
348 } 349 }
349 350