]> git.proxmox.com Git - mirror_frr.git/commit
ospfd: make ECMP nexthop order deterministic
authorDavid Lamparter <equinox@diac24.net>
Tue, 16 Apr 2019 19:33:06 +0000 (21:33 +0200)
committerDavid Lamparter <equinox@diac24.net>
Wed, 17 Apr 2019 11:29:00 +0000 (13:29 +0200)
commitf32b6b9ceabc2960282845c7494892b9cd25d271
treec52d9bf5b0dee1d6be0e8ed0103037b4d02ce506
parenta61b32f00dffd7c75a84842286265eacf7bc318f
ospfd: make ECMP nexthop order deterministic

The order of ECMP nexthops currently depends on whatever order the
pqueue code returns the vertices in, which is essentially random since
they compare as equal.  While this shouldn't cause issues normally, it
is nondeterministic and causes the ldp-topo1 test to fail when the
ordering comes up different.  Also, nondeterministic behaviour is not a
nice thing to have here in general.

Just sort by nexthop address;  realistic numbers of ECMP nexthops should
hopefully not make this a performance issue.  (Also, nexthops should be
hot in the caches here.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospfd/ospf_spf.c