summaryrefslogtreecommitdiff
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-16 20:23:22 +0200
committerAntonio Quartulli <ordex@autistici.org>2012-06-28 08:44:48 +0200
commit3e34819e0eafaa6c873e9704bb478c0cdd6bb481 (patch)
treeb8f8d24ca23a92bd235ae06342e33ddab7811508 /net/batman-adv/routing.c
parentee11ad61f232c201ba62990aa490264220f834cd (diff)
batman-adv: Prefix remaining function like macros with batadv_
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index e7ee40d6d609..1b8f67744e23 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -922,6 +922,7 @@ static int batadv_check_unicast_ttvn(struct bat_priv *bat_priv,
struct hard_iface *primary_if;
struct unicast_packet *unicast_packet;
bool tt_poss_change;
+ int is_old_ttvn;
/* I could need to modify it */
if (skb_cow(skb, sizeof(struct unicast_packet)) < 0)
@@ -945,7 +946,8 @@ static int batadv_check_unicast_ttvn(struct bat_priv *bat_priv,
}
/* Check whether I have to reroute the packet */
- if (seq_before(unicast_packet->ttvn, curr_ttvn) || tt_poss_change) {
+ is_old_ttvn = batadv_seq_before(unicast_packet->ttvn, curr_ttvn);
+ if (is_old_ttvn || tt_poss_change) {
/* check if there is enough data before accessing it */
if (pskb_may_pull(skb, sizeof(struct unicast_packet) +
ETH_HLEN) < 0)