]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
iproute2: Fix typo in get_prefix_1()
authorThomas Graf <tgraf@suug.ch>
Tue, 5 May 2015 00:14:16 +0000 (02:14 +0200)
committerStephen Hemminger <shemming@brocade.com>
Mon, 11 May 2015 16:11:53 +0000 (09:11 -0700)
Fixes a typo in get_prefix_1() which broke the prefix default
names { default | any | all }.

The most obvious fallout from this bug was:

$ ip route add default via 1.1.1.1
Error: an inet prefix is expected rather than "default".

Fixes: dacc5d4197c1 ("add basic mpls support to iproute")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
lib/utils.c

index 428ad8f9dd61739bca7ca71e3e375ddc070cb878..29b4f548acf39599a472ae454a978788d895ea8c 100644 (file)
@@ -496,7 +496,7 @@ int get_prefix_1(inet_prefix *dst, char *arg, int family)
        if (strcmp(arg, "default") == 0 ||
            strcmp(arg, "any") == 0 ||
            strcmp(arg, "all") == 0) {
-               if ((family == AF_DECnet) || (family = AF_MPLS))
+               if ((family == AF_DECnet) || (family == AF_MPLS))
                        return -1;
                dst->family = family;
                dst->bytelen = 0;