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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1368723943.14093.4.camel@sridhar.usor.ibm.com>
Date:	Thu, 16 May 2013 10:05:43 -0700
From:	Sridhar Samudrala <sri@...ibm.com>
To:	stephen@...workplumber.org, dlstevens@...ibm.com,
	davem@...emloft.net
Cc:	netdev@...r.kernel.org
Subject: [PATCH] vxlan: Update vxlan fdb 'used' field after each usage.

Fix some instances where vxlan fdb 'used' field is not updated after the entry 
is used.

Signed-off-by: Sridhar Samudrala <sri@...ibm.com>

---

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ba81f3c..3bfa6c4 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -814,6 +814,7 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb)
 
 		f = vxlan_find_mac(vxlan, n->ha);
 		if (f && f->remote.remote_ip == htonl(INADDR_ANY)) {
+			f->used = jiffies;
 			/* bridge-local neighbor */
 			neigh_release(n);
 			goto out;
@@ -1118,6 +1119,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	if (f && (f->flags & NTF_ROUTER) && (vxlan->flags & VXLAN_F_RSC) &&
 	    ntohs(eth->h_proto) == ETH_P_IP) {
+		f->used = jiffies;
 		did_rsc = route_shortcircuit(dev, skb);
 		if (did_rsc)
 			f = vxlan_find_mac(vxlan, eth->h_dest);
@@ -1130,8 +1132,10 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 		    (vxlan->flags & VXLAN_F_L2MISS) &&
 		    !is_multicast_ether_addr(eth->h_dest))
 			vxlan_fdb_miss(vxlan, eth->h_dest);
-	} else
+	} else {
+		f->used = jiffies;
 		rdst0 = &f->remote;
+	}
 
 	rc = NETDEV_TX_OK;
 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ