diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-10 15:06:32 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-10 15:06:32 +0200 |
commit | 9eace84342bc879abf371a84f8af3bd697e1c0a2 (patch) | |
tree | a49786a9b801ece619c897d5e63145d455d2900e | |
parent | cb2b6e0494e685fc4cce52a1d449ffd69bec351e (diff) |
Nest: Handle PtP links in recursive route update
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.
-rw-r--r-- | nest/rt-table.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 97a5d1bc..d99953e5 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -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 |