Bug#556974: parser error trying to set up an ipv6 multipath route
also sprach Andreas Henriksson andr...@fatal.se [2009.11.18.2212 +0100]: # ip -6 route add default nexthop via 2001:470:25:94::1 weight 1 nexthop via 2001:41e0:ff00:47::1 weight 1 Error: an IP address is expected rather than 2001:470:25:94::1 I think the problematic function has been located but I don't know if the attached patch is the correct solution, your testing would be appreciated. One step further, but not there yet: # ip -6 route add default nexthop via 2001:470:25:95::1 dev HE weight 1 nexthop via 2001:41e0:ff00:d2::1 dev sixxs weight 1 RTNETLINK answers: No such device (with or without the two dev * keywords) -- .''`. martin f. krafft madd...@d.o Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduckhttp://vcs-pkg.org `- Debian - when you have better things to do than fixing systems in the country of the blind, the one-eyed man is not king. he is taken to be a hallucinating lunatic. -marshall mcluhan digital_signature_gpg.asc Description: Digital signature (see http://martin-krafft.net/gpg/)
Bug#556974: parser error trying to set up an ipv6 multipath route
Package: iproute Version: 20090324-1 Severity: normal Tags: ipv6 The following is correct syntax according to manpage and http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN298, but it doesn't seem to work for ipv6: # ip -6 route add default nexthop via 2001:470:25:94::1 weight 1 nexthop via 2001:41e0:ff00:47::1 weight 1 Error: an IP address is expected rather than 2001:470:25:94::1 -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.31-1-amd64 (SMP w/1 CPU core) Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages iproute depends on: ii libc6 2.10.1-6 GNU C Library: Shared libraries ii libdb4.7 4.7.25-8 Berkeley v4.7 Database Libraries [ Versions of packages iproute recommends: ii libatm1 2.4.1-17.2 shared library for ATM (Asynchrono Versions of packages iproute suggests: pn iproute-doc none (no description available) -- debconf-show failed -- .''`. martin f. krafft madd...@d.o Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduckhttp://vcs-pkg.org `- Debian - when you have better things to do than fixing systems digital_signature_gpg.asc Description: Digital signature (see http://martin-krafft.net/gpg/)
Bug#556974: parser error trying to set up an ipv6 multipath route
Hello Martin! Thanks for your bug report. On Wed, Nov 18, 2009 at 06:56:10PM +0100, martin f krafft wrote: The following is correct syntax according to manpage and http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN298, but it doesn't seem to work for ipv6: # ip -6 route add default nexthop via 2001:470:25:94::1 weight 1 nexthop via 2001:41e0:ff00:47::1 weight 1 Error: an IP address is expected rather than 2001:470:25:94::1 I think the problematic function has been located but I don't know if the attached patch is the correct solution, your testing would be appreciated. -- Andreas Henriksson diff --git a/ip/iproute.c b/ip/iproute.c index bf0f31b..20fce76 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -609,9 +609,14 @@ int parse_one_nh(struct rtattr *rta, struct rtnexthop *rtnh, int *argcp, char ** while (++argv, --argc 0) { if (strcmp(*argv, via) == 0) { + inet_prefix addr; + NEXT_ARG(); - rta_addattr32(rta, 4096, RTA_GATEWAY, get_addr32(*argv)); - rtnh-rtnh_len += sizeof(struct rtattr) + 4; + + get_addr(addr, *argv, AF_UNSPEC); + rta_addattr_l(rta, 4096, RTA_GATEWAY, + addr.data, addr.bytelen); + rtnh-rtnh_len += sizeof(struct rtattr) + addr.bytelen; } else if (strcmp(*argv, dev) == 0) { NEXT_ARG(); if ((rtnh-rtnh_ifindex = ll_name_to_index(*argv)) == 0) { signature.asc Description: Digital signature