]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Handle PtP links in recursive route update
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 10 Oct 2019 13:06:32 +0000 (15:06 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 10 Oct 2019 13:06:32 +0000 (15:06 +0200)
Underlying (IGP) route may lead to PtP link, in this case it does not
need gateway. Which is different than direct route without gateway.

When recursive (BGP) route uses PtP route, it should not use recursive
next hop as immediate next hop, while for direct routes it should.

nest/rt-table.c

index 97a5d1bc798ced372ac1ff06c32a93319a75c8ce..d99953e52cda266cee10616fb1f720af48825396 100644 (file)
@@ -2137,6 +2137,8 @@ no_nexthop:
       nhp->gw = nh->gw;                        /* Router nexthop */
       nhp->flags |= (nh->flags & RNF_ONLINK);
     }
+    else if (!(nh->iface->flags & IF_MULTIACCESS) || (nh->iface->flags & IF_LOOPBACK))
+      nhp->gw = IPA_NONE;              /* PtP link - no need for nexthop */
     else if (ipa_nonzero(he->link))
       nhp->gw = he->link;              /* Device nexthop with link-local address known */
     else