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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1484984410-3304-3-git-send-email-roopa@cumulusnetworks.com>
Date:   Fri, 20 Jan 2017 23:40:08 -0800
From:   Roopa Prabhu <roopa@...ulusnetworks.com>
To:     davem@...emloft.net
Cc:     netdev@...r.kernel.org, ramanb@...ulusnetworks.com,
        stephen@...workplumber.org, jbenc@...hat.com, pshelar@....org
Subject: [PATCH cumulus-4.1.y 3/5] vxlan: enforce precedence for static over dynamic fdb entry

From: Wilson Kok <wkok@...ulusnetworks.com>

This patch enforces fdb state correctly when deciding
to add or update an existing fdb. It makes sure static fdb
entries are not replaced by dynamic fdb entries.

Signed-off-by: Wilson Kok <wkok@...ulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
---
 drivers/net/vxlan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 72b99ff..7300586 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -628,6 +628,10 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan,
 			return -EEXIST;
 		}
 		if (f->state != state) {
+			if ((f->state & NUD_PERMANENT) &&
+			    !(state & NUD_PERMANENT))
+				return -EINVAL;
+
 			f->state = state;
 			f->updated = jiffies;
 			notify = 1;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ