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

Signed-off-by: Jiri Benc <jb...@redhat.com>
---
 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

Reply via email to