From: Antonio Quartulli <antonio@meshcoding.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
Marek Lindner <mareklindner@neomailbox.ch>,
Antonio Quartulli <antonio@meshcoding.com>
Subject: [PATCH 06/12] batman-adv: update last seen field of single hop originators
Date: Wed, 16 Dec 2015 15:49:27 +0800 [thread overview]
Message-ID: <1450252173-20949-7-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1450252173-20949-1-git-send-email-antonio@meshcoding.com>
From: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
net/batman-adv/bat_iv_ogm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 1efdb5c..3738a2f 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1379,6 +1379,7 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
struct batadv_hard_iface *if_outgoing)
{
struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
+ struct batadv_hardif_neigh_node *hardif_neigh = NULL;
struct batadv_neigh_node *router = NULL;
struct batadv_neigh_node *router_router = NULL;
struct batadv_orig_node *orig_neigh_node;
@@ -1423,6 +1424,13 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
goto out;
}
+ if (is_single_hop_neigh) {
+ hardif_neigh = batadv_hardif_neigh_get(if_incoming,
+ ethhdr->h_source);
+ if (hardif_neigh)
+ hardif_neigh->last_seen = jiffies;
+ }
+
router = batadv_orig_router_get(orig_node, if_outgoing);
if (router) {
router_router = batadv_orig_router_get(router->orig_node,
@@ -1557,6 +1565,8 @@ out:
batadv_neigh_node_free_ref(router_router);
if (orig_neigh_router)
batadv_neigh_node_free_ref(orig_neigh_router);
+ if (hardif_neigh)
+ batadv_hardif_neigh_free_ref(hardif_neigh);
kfree_skb(skb_priv);
}
--
2.6.4
next prev parent reply other threads:[~2015-12-16 7:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1450252173-20949-1-git-send-email-antonio@meshcoding.com>
2015-12-16 7:49 ` [PATCH 01/12] MAINTAINERS: update email address Antonio Quartulli
2015-12-16 7:49 ` [PATCH 02/12] Doc: " Antonio Quartulli
2015-12-16 7:49 ` [PATCH 03/12] batman-adv: add list of unique single hop neighbors per hard-interface Antonio Quartulli
2015-12-16 7:49 ` [PATCH 04/12] batman-adv: add bat_hardif_neigh_init algo ops call Antonio Quartulli
2015-12-16 7:49 ` [PATCH 05/12] batman-adv: export single hop neighbor list via debugfs Antonio Quartulli
2015-12-16 7:49 ` Antonio Quartulli [this message]
2015-12-16 7:49 ` [PATCH 07/12] batman-adv: rename equiv/equal or better to similar or better Antonio Quartulli
2015-12-16 7:49 ` [PATCH 08/12] batman-adv: detect local excess vlans in TT request Antonio Quartulli
2015-12-16 7:49 ` [PATCH 09/12] batman-adv: unify flags access style in tt global add Antonio Quartulli
2015-12-16 7:49 ` [PATCH 10/12] batman-adv: Use chain pointer when purging fragments Antonio Quartulli
2015-12-16 7:49 ` [PATCH 11/12] batman-adv: Fix typo 'wether' -> 'whether' Antonio Quartulli
2015-12-16 7:49 ` [PATCH 12/12] batman-adv: lock crc access in bridge loop avoidance Antonio Quartulli
2015-12-16 16:10 ` pull request: batman-adv 20151216 David Miller
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=1450252173-20949-7-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.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).