[PATCH v3] IPv6 ECMP support fixes for linux v3

Ondrej Zajicek santiago at crfreenet.org
Wed Sep 14 12:39:46 CEST 2016


On Tue, Aug 23, 2016 at 01:31:51PM +0200, Mikhail Sennikovskii wrote:
> Here is the third version of the Linux IPv6 ECMP support patch.
> In addition to v2 version, it fixes ECMP IPv6 route removal.

Hi

I finally got to merge IPv6 ECMP support. See commits:

84cac51a51fc29349077e8cecadf1aed11f9b824
2feaa6931bfe39eba696b33b0c8aac13d313b223

It is based on your v2 patch, but heavily modified. I simplified the
state structure, so the linear pool could be flushed after each route.
Also i wanted to both keep your per-nexthop add/del and use route replace
when appropriate, but i have to settle with del-all + add-all-new
approach because:

1) The 'old' route argument in krt_rt_notify() (and so krt_replace_rte())
is unreliable for many reasons. You fixed one reason related to path
merging in v3 patch, but there are other cases (filter reconfiguration,
route flush on shutdown) that could still break it. And we plan to remove
'old' argument from rt_notify() hook in the future anyways.

2) Route replace seems like a useful approach, but it is broken in Linux
kernel. Older kernels crashed when replace was called on IPv6 ECMP route,
newer kernels just handle it with bad semantics.


BTW, i suspect that there is a memory leak in your patch - when a rte is
merged in nl_parse_collect_rte(), the rte (allocated in nl_parse_route())
is not freed.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160914/251a79e0/attachment.asc>


More information about the Bird-users mailing list