diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 18:03:50 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-19 18:03:50 -0700 |
| commit | 75aead62b763031dae21ceda615fec5a148ae715 (patch) | |
| tree | 6cd6781b3fb7004c53aa0f7ed736e2908a48a0c9 /bgpd/bgp_nht.h | |
| parent | 97dba7b704f18c66f16e9330821514a79f982fdb (diff) | |
When internal operations are performed (e.g., best-path selection, next-hop
change processing etc.) that refer to the BGP instance, the correct BGP
instance must be referenced and not the default BGP instance. The default
BGP instance is the first instance on the instance list. In a scenario
where one BGP instance is deleted (through operator action such as a
"no router bgp" command) and another instance exists or is created, there
may still be events in-flight that need to be processed against the
deleted instance. Trying to process these against the default instance
is erroneous. The calls to bgp_get_default() must be limited to the user
interface (vtysh) context.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_nht.h')
| -rw-r--r-- | bgpd/bgp_nht.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_nht.h b/bgpd/bgp_nht.h index 0897d43a06..2c779802b5 100644 --- a/bgpd/bgp_nht.h +++ b/bgpd/bgp_nht.h @@ -40,13 +40,14 @@ extern int bgp_find_nexthop(struct bgp_info *p, int connected); * object. If not found, create a new object and register with ZEBRA for * nexthop notification. * ARGUMENTS: + * bgp - BGP instance * a - afi: AFI_IP or AF_IP6 * p - path for which the nexthop object is being looked up * peer - The BGP peer associated with this NHT * connected - True if NH MUST be a connected route */ -extern int bgp_find_or_add_nexthop(afi_t a, struct bgp_info *p, - struct peer *peer, int connected); +extern int bgp_find_or_add_nexthop(struct bgp *bgp, afi_t a, + struct bgp_info *p, struct peer *peer, int connected); /** * bgp_unlink_nexthop() - Unlink the nexthop object from the path structure. |
