Thread (5 messages) 5 messages, 3 authors, 2016-09-20

[PATCH iproute2 2/2] vxlan: group address requires net device

flat view
STALE3677d

From: Jiri Benc <hidden>
Date: 2016-09-05 09:35:51
Subsystem: the rest · Maintainer: Linus Torvalds

This is now enforced in the kernel, check also in iproute to get a better
error message.

Signed-off-by: Jiri Benc <redacted>
---
 ip/iplink_vxlan.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c
index 251d3f1cfb0b..93af979a1e97 100644
--- a/ip/iplink_vxlan.c
+++ b/ip/iplink_vxlan.c
@@ -266,6 +266,11 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
 		return -1;
 	}
 
+	if ((gaddr || !IN6_IS_ADDR_UNSPECIFIED(&gaddr6)) && !link) {
+		fprintf(stderr, "vxlan: 'group' requires 'dev' to be specified\n");
+		return -1;
+	}
+
 	if (!dst_port_set && gpe) {
 		dstport = 4790;
 	} else if (!dst_port_set) {
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help