]> git.proxmox.com Git - mirror_frr.git/commit - ospfd/ospf_spf.c
ospfd: restore nexthop IP for p2p interfaces
authorChristian Franke <chris@opensourcerouting.org>
Wed, 20 Mar 2013 15:28:46 +0000 (15:28 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 9 Apr 2013 20:38:04 +0000 (22:38 +0200)
commitf2b53dac4c72811c06779c596c6162b994eb427a
tree9402b6fc1cf366121ba9f3bc623344284fac4196
parent677bcbbf153fe73e57cb44f668977cbd26661fd4
ospfd: restore nexthop IP for p2p interfaces

commit c81ee5c... "ospfd: Optimize and improve SPF nexthop calculation"
subtly changed semantics of routes calculated over pointopoint links by
removing the nexthop IP address and instead using an ifindex route.

This breaks calculation of AS-Ext routes with a forwarding address since
in ospf_ase_complete_direct_routes() this will be hit:
    if (op->nexthop.s_addr == 0)
      op->nexthop.s_addr = nexthop.s_addr;
thus turning the route unusable by having an invalid nexthop.

Fix by restoring the nexthop IP on routes over PtP links.  This also
allows running multi-access (Ethernet) interfaces in PtP mode again.

This bug is a regression against 0.99.21 and only present in 0.99.22.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
[patch description and code comments rewritten]
Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: James Li <jli@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospfd/ospf_spf.c