* [PATCH] iproute2: Fix typo in get_prefix_1()
@ 2015-05-05 0:14 Thomas Graf
2015-05-11 16:12 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Graf @ 2015-05-05 0:14 UTC (permalink / raw)
To: stephen; +Cc: ebiederm, netdev
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/utils.c b/lib/utils.c
index 428ad8f..29b4f54 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -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;
--
2.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] iproute2: Fix typo in get_prefix_1()
2015-05-05 0:14 [PATCH] iproute2: Fix typo in get_prefix_1() Thomas Graf
@ 2015-05-11 16:12 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2015-05-11 16:12 UTC (permalink / raw)
To: Thomas Graf; +Cc: ebiederm, netdev
On Tue, 5 May 2015 02:14:16 +0200
Thomas Graf <tgraf@suug.ch> wrote:
> 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>
Applied thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-11 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05 0:14 [PATCH] iproute2: Fix typo in get_prefix_1() Thomas Graf
2015-05-11 16:12 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox