diff options
author | G. Paul Ziemba <paulz@labn.net> | 2018-03-24 00:57:03 +0100 |
---|---|---|
committer | G. Paul Ziemba <paulz@labn.net> | 2018-04-04 19:00:23 +0200 |
commit | 960035b2d9e8300c91276922158b806b043e2e9b (patch) | |
tree | b365c75fdeb3bc2ac4ed3ff95f22dd6a56726634 /tests | |
parent | bgpd: simplify bgp instance name printing (diff) | |
download | frr-960035b2d9e8300c91276922158b806b043e2e9b.tar.xz frr-960035b2d9e8300c91276922158b806b043e2e9b.zip |
bgpd: nexthop tracking with labels for vrf-vpn leaking
Routes that have labels must be sent via a nexthop that also has labels.
This change notes whether any path in a nexthop update from zebra contains
labels. If so, then the nexthop is valid for routes that have labels.
If a nexthop update has no labeled paths, then any labeled routes
referencing the nexthop are marked not valid.
Add a route flag BGP_INFO_ANNC_NH_SELF that means "advertise myself
as nexthop when announcing" so that we can track our notion of the
nexthop without revealing it to peers.
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bgpd/test_mpath.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c index 247fcf7da..2168bd5b7 100644 --- a/tests/bgpd/test_mpath.c +++ b/tests/bgpd/test_mpath.c @@ -105,9 +105,10 @@ static struct bgp *bgp_create_fake(as_t *as, const char *name) for (afi = AFI_IP; afi < AFI_MAX; afi++) for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) { - bgp->route[afi][safi] = bgp_table_init(afi, safi); - bgp->aggregate[afi][safi] = bgp_table_init(afi, safi); - bgp->rib[afi][safi] = bgp_table_init(afi, safi); + bgp->route[afi][safi] = bgp_table_init(bgp, afi, safi); + bgp->aggregate[afi][safi] = bgp_table_init( + bgp, afi, safi); + bgp->rib[afi][safi] = bgp_table_init(bgp, afi, safi); bgp->maxpaths[afi][safi].maxpaths_ebgp = MULTIPATH_NUM; bgp->maxpaths[afi][safi].maxpaths_ibgp = MULTIPATH_NUM; } |