[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1192179407-22461-10-git-send-email-andreas@fatal.se>
Date: Fri, 12 Oct 2007 10:56:45 +0200
From: Andreas Henriksson <andreas@...al.se>
To: shemminger@...ux-foundation.org
Cc: netdev@...r.kernel.org, Norbert Buchmuller <norbi@....hu>,
Andreas Henriksson <andreas@...al.se>
Subject: [PATCH 10/12] Fix off-by-one in print of wrandom algo.
From: Norbert Buchmuller <norbi@....hu>
The 'wrandom' multipath algo is recognised when adding the route, but
not resolved when it is printed (prints 'unknown'):
ianus:~# ip ro add 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2
ianus:~# ip ro get to 1.2.3.4
1.2.3.4 mpath unknown dev ppp0 src 62.77.192.67
cache mtu 1492 advmss 1452 hoplimit 64
ianus:~# ip ro del 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2
See http://bugs.debian.org/428440 for more information.
Signed-off-by: Andreas Henriksson <andreas@...al.se>
---
ip/iproute.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ip/iproute.c b/ip/iproute.c
index d3a3243..3b5c4b1 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -365,7 +365,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
__u32 mp_alg = *(__u32*) RTA_DATA(tb[RTA_MP_ALGO]);
if (mp_alg > IP_MP_ALG_NONE) {
fprintf(fp, "mpath %s ",
- mp_alg < IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
+ mp_alg <= IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
}
}
--
1.5.3.4
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists