From: "Linus Lüssing" <linus.luessing@web.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix aggregation direct-link bug
Date: Sat, 20 Mar 2010 04:31:48 +0100 [thread overview]
Message-ID: <1269055908-20369-2-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1269055908-20369-1-git-send-email-linus.luessing@web.de>
So far, neighbour's secondary interface OGMs can involuntarily
piggyback on primary interface OGMs that arrived on the same secondary
interface before. Secondary interface OGMs should NEVER leave their
direct neighbour broadcast domain! This patch ensures that secondary
interface OGMs can only be aggregated to other secondary interface OGMs.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
aggregation.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/batman-adv-kernelland/aggregation.c b/batman-adv-kernelland/aggregation.c
index 0635b5a..567c31a 100644
--- a/batman-adv-kernelland/aggregation.c
+++ b/batman-adv-kernelland/aggregation.c
@@ -81,9 +81,15 @@ static bool can_aggregate_with(struct batman_packet *new_batman_packet,
* interface only - we still can aggregate */
if ((directlink) &&
(new_batman_packet->ttl == 1) &&
- (forw_packet->if_incoming == if_incoming))
+ (forw_packet->if_incoming == if_incoming) &&
+
+ /* packets from direct neighbors or
+ * own secondary interface packets
+ * (= secondary interface packets in general) */
+ (batman_packet->flags & DIRECTLINK ||
+ (forw_packet->own &&
+ forw_packet->if_incoming->if_num != 0)))
return true;
-
}
return false;
--
1.7.0
next prev parent reply other threads:[~2010-03-20 3:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-20 3:31 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix aggregation timing bug Linus Lüssing
2010-03-20 3:31 ` Linus Lüssing [this message]
2010-03-20 9:36 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix aggregation direct-link bug Linus Lüssing
2010-03-20 14:48 ` Marek Lindner
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=1269055908-20369-2-git-send-email-linus.luessing@web.de \
--to=linus.luessing@web.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