public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix compile error on deactivated MCAST feature
@ 2015-06-18  4:47 Linus Lüssing
  2015-06-18  5:15 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Lüssing @ 2015-06-18  4:47 UTC (permalink / raw)
  To: b.a.t.m.a.n

Some members of "struct batadv_orig_node" are not available if compiling
without the multicast optimizations feature.

Fix this by moving their initialization into the right #ifdef's.

Fixes: 7f220ed1f063 ("batman-adv: Fix potential synchronization issues in mcast tvlv handler")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
 originator.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/originator.c b/originator.c
index a2ba182..a5276db 100644
--- a/originator.c
+++ b/originator.c
@@ -658,15 +658,11 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
 	INIT_HLIST_HEAD(&orig_node->neigh_list);
 	INIT_LIST_HEAD(&orig_node->vlan_list);
 	INIT_HLIST_HEAD(&orig_node->ifinfo_list);
-	INIT_HLIST_NODE(&orig_node->mcast_want_all_unsnoopables_node);
-	INIT_HLIST_NODE(&orig_node->mcast_want_all_ipv4_node);
-	INIT_HLIST_NODE(&orig_node->mcast_want_all_ipv6_node);
 	spin_lock_init(&orig_node->bcast_seqno_lock);
 	spin_lock_init(&orig_node->neigh_list_lock);
 	spin_lock_init(&orig_node->tt_buff_lock);
 	spin_lock_init(&orig_node->tt_lock);
 	spin_lock_init(&orig_node->vlan_list_lock);
-	spin_lock_init(&orig_node->mcast_handler_lock);
 
 	batadv_nc_init_orig(orig_node);
 
@@ -682,8 +678,13 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
 	orig_node->last_seen = jiffies;
 	reset_time = jiffies - 1 - msecs_to_jiffies(BATADV_RESET_PROTECTION_MS);
 	orig_node->bcast_seqno_reset = reset_time;
+
 #ifdef CONFIG_BATMAN_ADV_MCAST
 	orig_node->mcast_flags = BATADV_NO_FLAGS;
+	INIT_HLIST_NODE(&orig_node->mcast_want_all_unsnoopables_node);
+	INIT_HLIST_NODE(&orig_node->mcast_want_all_ipv4_node);
+	INIT_HLIST_NODE(&orig_node->mcast_want_all_ipv6_node);
+	spin_lock_init(&orig_node->mcast_handler_lock);
 #endif
 
 	/* create a vlan object for the "untagged" LAN */
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix compile error on deactivated MCAST feature
  2015-06-18  4:47 [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix compile error on deactivated MCAST feature Linus Lüssing
@ 2015-06-18  5:15 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2015-06-18  5:15 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

On Thursday, June 18, 2015 06:47:19 Linus Lüssing wrote:
> Some members of "struct batadv_orig_node" are not available if compiling
> without the multicast optimizations feature.
> 
> Fix this by moving their initialization into the right #ifdef's.
> 
> Fixes: 7f220ed1f063 ("batman-adv: Fix potential synchronization issues in
> mcast tvlv handler") Signed-off-by: Linus Lüssing
> <linus.luessing@c0d3.blue>
> ---
>  originator.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Applied in revision 256776e.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-18  5:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-18  4:47 [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix compile error on deactivated MCAST feature Linus Lüssing
2015-06-18  5:15 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox