ipmr/ip6mr: Initialize the last assert time of mfc entries.
authorTom Goff <thomas.goff@ll.mit.edu>
Thu, 23 Jun 2016 20:11:57 +0000 (16:11 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2016 08:14:09 +0000 (04:14 -0400)
This fixes wrong-interface signaling on 32-bit platforms for entries
created when jiffies > 2^31 + MFC_ASSERT_THRESH.

Signed-off-by: Tom Goff <thomas.goff@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c
net/ipv6/ip6mr.c

index 21a38e296fe2da2c4a095c94ab204362d9eacc89..5ad48ec7771007a0c01c8210001ecb17ab012863 100644 (file)
@@ -891,8 +891,10 @@ static struct mfc_cache *ipmr_cache_alloc(void)
 {
        struct mfc_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
 
-       if (c)
+       if (c) {
+               c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1;
                c->mfc_un.res.minvif = MAXVIFS;
+       }
        return c;
 }
 
index f2e2013f834621fe2598d9dd9b452b83cd4f9018..487ef3bc7bbcde7f3509b76b3a68aee9d2ab7e8b 100644 (file)
@@ -1074,6 +1074,7 @@ static struct mfc6_cache *ip6mr_cache_alloc(void)
        struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
        if (!c)
                return NULL;
+       c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1;
        c->mfc_un.res.minvif = MAXMIFS;
        return c;
 }