diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:37 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:26 -0400 |
commit | 9455e34cb2ded22e01abb6daa65ba1caeed8d7fe (patch) | |
tree | 56ac8dc90b5bcddcace5eea383b266e9654ecb2d /net/batman-adv/send.c | |
parent | 30d3c5113f9a3f162d65d01b771b122afac0ce79 (diff) |
batman-adv: Prefix send 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/send.c')
-rw-r--r-- | net/batman-adv/send.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 79f8973810c0..bceb3d72e5c3 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -33,8 +33,8 @@ static void send_outstanding_bcast_packet(struct work_struct *work); | |||
33 | 33 | ||
34 | /* send out an already prepared packet to the given address via the | 34 | /* send out an already prepared packet to the given address via the |
35 | * specified batman interface */ | 35 | * specified batman interface */ |
36 | int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, | 36 | int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, |
37 | const uint8_t *dst_addr) | 37 | const uint8_t *dst_addr) |
38 | { | 38 | { |
39 | struct ethhdr *ethhdr; | 39 | struct ethhdr *ethhdr; |
40 | 40 | ||
@@ -77,7 +77,7 @@ send_skb_err: | |||
77 | return NET_XMIT_DROP; | 77 | return NET_XMIT_DROP; |
78 | } | 78 | } |
79 | 79 | ||
80 | void schedule_bat_ogm(struct hard_iface *hard_iface) | 80 | void batadv_schedule_bat_ogm(struct hard_iface *hard_iface) |
81 | { | 81 | { |
82 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 82 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
83 | 83 | ||
@@ -133,8 +133,9 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv, | |||
133 | * | 133 | * |
134 | * The skb is not consumed, so the caller should make sure that the | 134 | * The skb is not consumed, so the caller should make sure that the |
135 | * skb is freed. */ | 135 | * skb is freed. */ |
136 | int add_bcast_packet_to_list(struct bat_priv *bat_priv, | 136 | int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv, |
137 | const struct sk_buff *skb, unsigned long delay) | 137 | const struct sk_buff *skb, |
138 | unsigned long delay) | ||
138 | { | 139 | { |
139 | struct hard_iface *primary_if = NULL; | 140 | struct hard_iface *primary_if = NULL; |
140 | struct forw_packet *forw_packet; | 141 | struct forw_packet *forw_packet; |
@@ -211,7 +212,8 @@ static void send_outstanding_bcast_packet(struct work_struct *work) | |||
211 | /* send a copy of the saved skb */ | 212 | /* send a copy of the saved skb */ |
212 | skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC); | 213 | skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC); |
213 | if (skb1) | 214 | if (skb1) |
214 | send_skb_packet(skb1, hard_iface, broadcast_addr); | 215 | batadv_send_skb_packet(skb1, hard_iface, |
216 | broadcast_addr); | ||
215 | } | 217 | } |
216 | rcu_read_unlock(); | 218 | rcu_read_unlock(); |
217 | 219 | ||
@@ -229,7 +231,7 @@ out: | |||
229 | atomic_inc(&bat_priv->bcast_queue_left); | 231 | atomic_inc(&bat_priv->bcast_queue_left); |
230 | } | 232 | } |
231 | 233 | ||
232 | void send_outstanding_bat_ogm_packet(struct work_struct *work) | 234 | void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work) |
233 | { | 235 | { |
234 | struct delayed_work *delayed_work = | 236 | struct delayed_work *delayed_work = |
235 | container_of(work, struct delayed_work, work); | 237 | container_of(work, struct delayed_work, work); |
@@ -253,7 +255,7 @@ void send_outstanding_bat_ogm_packet(struct work_struct *work) | |||
253 | * shutting down | 255 | * shutting down |
254 | */ | 256 | */ |
255 | if (forw_packet->own) | 257 | if (forw_packet->own) |
256 | schedule_bat_ogm(forw_packet->if_incoming); | 258 | batadv_schedule_bat_ogm(forw_packet->if_incoming); |
257 | 259 | ||
258 | out: | 260 | out: |
259 | /* don't count own packet */ | 261 | /* don't count own packet */ |
@@ -263,8 +265,8 @@ out: | |||
263 | forw_packet_free(forw_packet); | 265 | forw_packet_free(forw_packet); |
264 | } | 266 | } |
265 | 267 | ||
266 | void purge_outstanding_packets(struct bat_priv *bat_priv, | 268 | void batadv_purge_outstanding_packets(struct bat_priv *bat_priv, |
267 | const struct hard_iface *hard_iface) | 269 | const struct hard_iface *hard_iface) |
268 | { | 270 | { |
269 | struct forw_packet *forw_packet; | 271 | struct forw_packet *forw_packet; |
270 | struct hlist_node *tmp_node, *safe_tmp_node; | 272 | struct hlist_node *tmp_node, *safe_tmp_node; |