Skip to content

Commit 70a0dec

Browse files
Tom Goffdavem330
authored andcommitted
ipmr/ip6mr: Initialize the last assert time of mfc entries.
This fixes wrong-interface signaling on 32-bit platforms for entries created when jiffies > 2^31 + MFC_ASSERT_THRESH. Signed-off-by: Tom Goff <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4192f67 commit 70a0dec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

net/ipv4/ipmr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,10 @@ static struct mfc_cache *ipmr_cache_alloc(void)
891891
{
892892
struct mfc_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
893893

894-
if (c)
894+
if (c) {
895+
c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1;
895896
c->mfc_un.res.minvif = MAXVIFS;
897+
}
896898
return c;
897899
}
898900

net/ipv6/ip6mr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ static struct mfc6_cache *ip6mr_cache_alloc(void)
10741074
struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
10751075
if (!c)
10761076
return NULL;
1077+
c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1;
10771078
c->mfc_un.res.minvif = MAXMIFS;
10781079
return c;
10791080
}

0 commit comments

Comments
 (0)