Thread (4 messages) 4 messages, 3 authors, 2012-10-29

[PATCH] vxlan nits

flat view
STALE5096d

From: David L Stevens <hidden>
Date: 2012-10-19 11:49:54
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

This patch fixes a couple problems with vxlan.

1) Improper check of NUD_PERMANENT makes permanent forwarding table
	entries timeout too.

2) Check for "0.0.0.0" as gaddr and allow to mean "no group". The
	iproute2 patch sends gaddr even if not specified, which
	fails the IN_MULTICAST() test. This patch allows static-only
	forwarding and dropping everything else.

Signed-Off-By: David L Stevens <redacted>
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 607976c..3fac9f3 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -816,7 +816,7 @@ static void vxlan_cleanup(unsigned long arg)
 				= container_of(p, struct vxlan_fdb, hlist);
 			unsigned long timeout;
 
-			if (f->state == NUD_PERMANENT)
+			if (f->state & NUD_PERMANENT)
 				continue;
 
 			timeout = f->used + vxlan->age_interval * HZ;
@@ -1047,7 +1047,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[])
 
 	if (data[IFLA_VXLAN_GROUP]) {
 		__be32 gaddr = nla_get_be32(data[IFLA_VXLAN_GROUP]);
-		if (!IN_MULTICAST(ntohl(gaddr))) {
+		if (gaddr && !IN_MULTICAST(ntohl(gaddr))) {
 			pr_debug("group address is not IPv4 multicast\n");
 			return -EADDRNOTAVAIL;
 		}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help