lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1469550861-13032-1-git-send-email-nikolay@cumulusnetworks.com>
Date:	Tue, 26 Jul 2016 18:34:21 +0200
From:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:	netdev@...r.kernel.org
Cc:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
	Roopa Prabhu <roopa@...ulusnetworks.com>,
	Donald Sharp <sharpd@...ulusnetworks.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: [PATCH net-next] net: ipmr/ip6mr: update lastuse on entry change

Currently lastuse is updated on entry creation and cache hit, but it should
also be updated on entry change.

Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
CC: Roopa Prabhu <roopa@...ulusnetworks.com>
CC: Donald Sharp <sharpd@...ulusnetworks.com>
CC: David S. Miller <davem@...emloft.net>
---
 net/ipv4/ipmr.c  | 1 +
 net/ipv6/ip6mr.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index eec234161b89..8f032428c14c 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1135,6 +1135,7 @@ static int ipmr_mfc_add(struct net *net, struct mr_table *mrt,
 		if (!mrtsock)
 			c->mfc_flags |= MFC_STATIC;
 		write_unlock_bh(&mrt_lock);
+		c->mfc_un.res.lastuse = jiffies;
 		mroute_netlink_event(mrt, c, RTM_NEWROUTE);
 		return 0;
 	}
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 7adce139d92a..45c5b30a3a8a 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1485,6 +1485,7 @@ static int ip6mr_mfc_add(struct net *net, struct mr6_table *mrt,
 		if (!mrtsock)
 			c->mfc_flags |= MFC_STATIC;
 		write_unlock_bh(&mrt_lock);
+		c->mfc_un.res.lastuse = jiffies;
 		mr6_netlink_event(mrt, c, RTM_NEWROUTE);
 		return 0;
 	}
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ