From: Soha Jin Date: Thu, 9 Nov 2023 13:33:25 +0000 (+0100) Subject: OSPF: On physical PtP links, skip next-hop resolving X-Git-Tag: v2.15~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31aa62ae6d2e111e87c08b4b27a16ead968f0689;p=thirdparty%2Fbird.git OSPF: On physical PtP links, skip next-hop resolving Signed-off-by: Soha Jin Co-developed-by: Wende Tan --- diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index 471bb5860..efcd4e17e 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -1796,7 +1796,12 @@ calc_next_hop(struct ospf_area *oa, struct top_hash_entry *en, if (ifa->type == OSPF_IT_VLINK) return new_nexthop(p, IPA_NONE, NULL, 0); - /* FIXME: On physical PtP links we may skip next-hop altogether */ + /* + * The type of the ospf_iface is PtP and the iface is a physical PtP link, + * so we can simply use the iface, and skip further resolving. + */ + if (ifa->type == OSPF_IT_PTP && !(ifa->iface->flags & IF_MULTIACCESS)) + return new_nexthop(p, IPA_NONE, ifa->iface, ifa->ecmp_weight); if (ospf_is_v2(p) || ospf_is_ip6(p)) {