Commit f7dd7e5e authored by Thomas Graf's avatar Thomas Graf Committed by Stephen Hemminger

iproute2: Fix typo in get_prefix_1()

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: dacc5d41 ("add basic mpls support to iproute")
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
parent 906cafe3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment