b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@saxnet.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "Linus Lüssing" <linus.luessing@saxnet.de>
Subject: [B.A.T.M.A.N.] [PATCH 16/20] batman-adv: Forward multicast data in proact_tracking mode
Date: Tue,  7 Dec 2010 23:32:26 +0100	[thread overview]
Message-ID: <1291761150-29818-16-git-send-email-linus.luessing@saxnet.de> (raw)
In-Reply-To: <20101207221351.GA19474@Sellars>

This patch enables the forwarding of multicast data and uses the same
methods for deciding to forward via broad- or unicast(s) as the local
packet encapsulation already did.

Signed-off-by: Linus Lüssing <linus.luessing@saxnet.de>
---
 multicast.c |    2 +-
 multicast.h |    1 +
 routing.c   |    4 ++++
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/multicast.c b/multicast.c
index 72249ef..042d392 100644
--- a/multicast.c
+++ b/multicast.c
@@ -1059,7 +1059,7 @@ int mcast_forw_table_seq_print_text(struct seq_file *seq, void *offset)
 	return 0;
 }
 
-static void route_mcast_packet(struct sk_buff *skb, struct bat_priv *bat_priv)
+void route_mcast_packet(struct sk_buff *skb, struct bat_priv *bat_priv)
 {
 	struct sk_buff *skb1;
 	struct mcast_packet *mcast_packet;
diff --git a/multicast.h b/multicast.h
index 06dd398..6dcf537 100644
--- a/multicast.h
+++ b/multicast.h
@@ -32,6 +32,7 @@ void route_mcast_tracker_packet(
 			int tracker_packet_len, struct bat_priv *bat_priv);
 void purge_mcast_forw_table(struct bat_priv *bat_priv);
 int mcast_forw_table_seq_print_text(struct seq_file *seq, void *offset);
+void route_mcast_packet(struct sk_buff *skb, struct bat_priv *bat_priv);
 int mcast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv);
 int mcast_init(struct bat_priv *bat_priv);
 void mcast_free(struct bat_priv *bat_priv);
diff --git a/routing.c b/routing.c
index b1aad26..f9582be 100644
--- a/routing.c
+++ b/routing.c
@@ -1390,6 +1390,7 @@ int recv_bcast_packet(struct sk_buff *skb, struct batman_if *recv_if)
 
 int recv_mcast_packet(struct sk_buff *skb, struct batman_if *recv_if)
 {
+	struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface);
 	struct ethhdr *ethhdr;
 	MC_LIST *mc_entry;
 	unsigned long flags;
@@ -1401,6 +1402,9 @@ int recv_mcast_packet(struct sk_buff *skb, struct batman_if *recv_if)
 	    check_broadcast_packet(skb, hdr_size) < 0)
 		return NET_RX_DROP;
 
+	/* forward multicast packet if necessary */
+	route_mcast_packet(skb, bat_priv);
+
 	ethhdr = (struct ethhdr *)(skb->data + sizeof(struct mcast_packet));
 
 	/* multicast for me? */
-- 
1.7.1


  parent reply	other threads:[~2010-12-07 22:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 22:13 [B.A.T.M.A.N.] B.A.T.M.A.N.-Advanced Multicast Optimizations Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 01/20] batman-adv: Add packet structures for multicast optimizations Linus Lüssing
2010-12-08  8:18   ` Andrew Lunn
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 02/20] batman-adv: Adding configurable variables " Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 03/20] batman-adv: compat macros/defines for local multicast group fetching Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 04/20] batman-adv: Attach local MCAs to OGMs Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 05/20] batman-adv: Add periodic multicast tracker timer Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 06/20] batman-adv: Buffer other originator's received MCA entries Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 07/20] batman-adv: Prepare and send own multicast tracker packets Linus Lüssing
2010-12-08  9:06   ` Andrew Lunn
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 08/20] batman-adv: Add length check for (received) " Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 09/20] batman-adv: Route multicast " Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 10/20] batman-adv: Add/refresh entries to/in mcast forwarding table Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 11/20] batman-adv: Output mcast forw table in debugfs Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 12/20] batman-adv: Purge timeouted entries in mcast forw table Linus Lüssing
2010-12-08 18:08   ` Andrew Lunn
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 13/20] batman-adv: Send own BAT_MCAST packets in proact_tracking multicast mode Linus Lüssing
2010-12-08 18:12   ` Andrew Lunn
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 14/20] batman-adv: Export broadcast packet ethernet header checks Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 15/20] batman-adv: Receive multicast data packets BAT_MCAST Linus Lüssing
2010-12-07 22:32 ` Linus Lüssing [this message]
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 17/20] batman-adv: Add duplicate checks for multicast data Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 18/20] batman-adv: Still flood multicast packets we are not a receiver of Linus Lüssing
2010-12-10 13:07   ` Andrew Lunn
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 19/20] batman-adv: Make number of (re)broadcasts configurable via sysfs Linus Lüssing
2010-12-07 22:32 ` [B.A.T.M.A.N.] [PATCH 20/20] batman-adv: Do not disable irqs for spinlocks in multicast specific code Linus Lüssing
2010-12-08  7:29 ` [B.A.T.M.A.N.] B.A.T.M.A.N.-Advanced Multicast Optimizations Andrew Lunn
2010-12-09 21:02   ` Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291761150-29818-16-git-send-email-linus.luessing@saxnet.de \
    --to=linus.luessing@saxnet.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).