From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: fix orig_node multiif regression in network coding
Date: Fri, 22 Nov 2013 13:02:07 +0100 [thread overview]
Message-ID: <1385121727-12847-2-git-send-email-sw@simonwunderlich.de> (raw)
In-Reply-To: <1385121727-12847-1-git-send-email-sw@simonwunderlich.de>
From: Simon Wunderlich <simon@open-mesh.com>
A previous commit for the multi interface optimization did not
change the member access for orig_node to their respective new ifinfo
structures for the network coding implementation.
This was introduced by change de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b
("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
---
network-coding.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/network-coding.c b/network-coding.c
index 8678448..b2fde56 100644
--- a/network-coding.c
+++ b/network-coding.c
@@ -715,9 +715,21 @@ static bool batadv_can_nc_with_orig(struct batadv_priv *bat_priv,
struct batadv_orig_node *orig_node,
struct batadv_ogm_packet *ogm_packet)
{
- if (orig_node->last_real_seqno != ntohl(ogm_packet->seqno))
+ struct batadv_orig_ifinfo *orig_ifinfo;
+ uint32_t last_real_seqno;
+ uint8_t last_ttl;
+
+ orig_ifinfo = batadv_orig_ifinfo_get(orig_node, BATADV_IF_DEFAULT);
+ if (!orig_ifinfo)
return false;
- if (orig_node->last_ttl != ogm_packet->header.ttl + 1)
+
+ last_ttl = orig_ifinfo->last_ttl;
+ last_real_seqno = orig_ifinfo->last_real_seqno;
+ batadv_orig_ifinfo_free_ref(orig_ifinfo);
+
+ if (last_real_seqno != ntohl(ogm_packet->seqno))
+ return false;
+ if (last_ttl != ogm_packet->header.ttl + 1)
return false;
if (!batadv_compare_eth(ogm_packet->orig, ogm_packet->prev_sender))
return false;
--
1.7.10.4
next prev parent reply other threads:[~2013-11-22 12:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 12:02 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix neigh_node multiif regression in network coding Simon Wunderlich
2013-11-22 12:02 ` Simon Wunderlich [this message]
2013-11-23 16:35 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: fix orig_node " Marek Lindner
2013-11-23 16:33 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix neigh_node " 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=1385121727-12847-2-git-send-email-sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=simon@open-mesh.com \
/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