Skip to content

IPv6 ECMP route add/replace fixes

Michal Kubecek lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v22 patches 7 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ipv6: do not delete previously existing ECMP routes if add failsnet/ipv6/route.c+2 -10 replies
2/2ipv6: fix ECMP route replacementnet/ipv6/ip6_fib.c net/ipv6/route.c+44 -62 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNicolas Dichtel
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net v3 0/2] IPv6 ECMP route add/replace fixes

(1) When adding a nexthop of a multipath route fails (e.g. because of a conflict with an existing route), we are supposed to delete nexthops already added. However, currently we try to also delete all nexthops we haven't even tried to add yet so that a "ip route add" command can actually remove pre-existing routes if it fails.

(2) Attempt to replace a multipath route results in a broken siblings linked list. Following commands (like "ip route del") can then either follow a link into freed memory or end in an infinite loop (if the slab object has been reused).

v2: fix an omission in first patch

v3: change the semantics of replace operation to better match IPv4

Michal Kubecek (2):
ipv6: do not delete previously existing ECMP routes if add fails
ipv6: fix ECMP route replacement

 net/ipv6/ip6_fib.c | 39 +++++++++++++++++++++++++++++++++++++--
 net/ipv6/route.c   | 14 +++++++++-----
 2 files changed, 46 insertions(+), 7 deletions(-)
Signature · 1 line
2.4.1