Fix off-by-one in print of wrandom algo. From: Norbert Buchmuller 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 Debian bug #428440 - http://bugs.debian.org/428440 diff -Naur iproute-20061002/ip/iproute.c iproute-20061002.fixed/ip/iproute.c --- iproute-20061002/ip/iproute.c 2007-06-11 19:26:52.000000000 +0200 +++ iproute-20061002.fixed/ip/iproute.c 2007-06-11 19:27:29.000000000 +0200 @@ -358,7 +358,7 @@ __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"); } }