]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
vxlan: group address requires net device
authorJiri Benc <jbenc@redhat.com>
Mon, 5 Sep 2016 09:35:28 +0000 (11:35 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 20 Sep 2016 16:46:41 +0000 (09:46 -0700)
This is now enforced in the kernel, check also in iproute to get a better
error message.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
ip/iplink_vxlan.c

index 7ba68bc14c78b5a38e0bf47f76459c5a90b6bc24..bff583a729f764ba1a52e082497293cf7dab6983 100644 (file)
@@ -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) {