All of lore.kernel.org
 help / color / mirror / Atom feed
From: bert hubert <ahu@ds9a.nl>
To: lartc@vger.kernel.org
Subject: [LARTC] bug fixed: equal cost multipath shows first hop as dead
Date: Thu, 20 Dec 2001 13:58:59 +0000	[thread overview]
Message-ID: <marc-lartc-100885677229167@msgid-missing> (raw)

This had been bugging me for a while:

  # ip ro add dev eth0 default nexthop via 10.0.0.1 dev eth0 nexthop via
    10.0.0.202 dev eth0
  # ip ro ls
  10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.11
  default
> 	nexthop via 10.0.0.1  dev eth0 weight 1 dead
  	nexthop via 10.0.0.202  dev eth0 weight 1

Some people did not see this bug, other people did. Note how the first
nexthop is 'dead', even though it isn't.

It turns out that this is due to a bug in 'ip' which only occurs with some
versions of gcc, amongst which gcc-2.95.

I posted a detailed bugreport, and our great friend Julian Anastasov replied
within minutes with this patch:

--- iproute2/ip/iproute.c.orig	Mon Aug  6 03:31:52 2001
+++ iproute2/ip/iproute.c	Thu Dec 20 13:14:06 2001
@@ -620,6 +620,8 @@
 		}
 		rtnh->rtnh_len = sizeof(*rtnh);
 		rtnh->rtnh_ifindex = 0;
+		rtnh->rtnh_flags = 0;
+		rtnh->rtnh_hops = 0;
 		rta->rta_len += rtnh->rtnh_len;
 		parse_one_nh(rta, rtnh, &argc, &argv);
 		rtnh = RTNH_NEXT(rtnh);

And then 'nexthop' works as it should. Note that this does not mean that it
does roundrobin over your nexthops. The routecache prevents this. If anybody
is a 'nexthop' expert, please help me write a section on it.

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

             reply	other threads:[~2001-12-20 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-20 13:58 bert hubert [this message]
2001-12-20 14:18 ` [LARTC] bug fixed: equal cost multipath shows first hop as dead Julian Anastasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-100885677229167@msgid-missing \
    --to=ahu@ds9a.nl \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.