]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
bridge: vni: Remove dead code in group argument parsing
authorBenjamin Poirier <bpoirier@nvidia.com>
Mon, 11 Dec 2023 14:07:14 +0000 (09:07 -0500)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 22 Dec 2023 17:54:23 +0000 (09:54 -0800)
is_addrtype_inet_not_multi(&daddr) may read an uninitialized "daddr". Even
if that is fixed, the error message that follows cannot be reached because
the situation would be caught by the previous test (group_present).
Therefore, remove this test on daddr.

Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
bridge/vni.c

index 6c0e35cdaf3a4ce469ada9cbaeb3556105e7b400..33e50d18c8ccee4a2b728cd63eaa9427d75eabb6 100644 (file)
@@ -109,11 +109,6 @@ static int vni_modify(int cmd, int argc, char **argv)
                } else if (strcmp(*argv, "group") == 0) {
                        if (group_present)
                                invarg("duplicate group", *argv);
-                       if (is_addrtype_inet_not_multi(&daddr)) {
-                               fprintf(stderr, "vxlan: both group and remote");
-                               fprintf(stderr, " cannot be specified\n");
-                               return -1;
-                       }
                        NEXT_ARG();
                        get_addr(&daddr, *argv, AF_UNSPEC);
                        if (!is_addrtype_inet_multi(&daddr))