]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip/vxlan: fix display of maxaddress option
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 9 Sep 2014 14:55:11 +0000 (16:55 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 28 Sep 2014 23:19:31 +0000 (16:19 -0700)
Parenthesis are required else maxaddr value is a bool and thus output is always
1 when the option is set.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip/iplink_vxlan.c

index 8aa25cd5fe52faea13002c592fca49afbd874949..d92cfe8156e478426755ded5868ed2b50ff79cd0 100644 (file)
@@ -361,7 +361,7 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
        }
 
        if (tb[IFLA_VXLAN_LIMIT] &&
-           (maxaddr = rta_getattr_u32(tb[IFLA_VXLAN_LIMIT]) != 0))
+           ((maxaddr = rta_getattr_u32(tb[IFLA_VXLAN_LIMIT])) != 0))
                    fprintf(f, "maxaddr %u ", maxaddr);
 }