summaryrefslogtreecommitdiffstats
path: root/bgpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bgpd: bgpd-no-as.patchDonald Sharp2015-05-206-46/+143
| | | | | | bgp: Fixup of the remote-as command to allow user to not have to enter an actual as number Signed-off-by: Donald Sharp<sharpd@cumulusnetworks.com> Reviewed-by:
* If the route-map used on a redistribute statement does not exists we should ↵Donald Sharp2015-05-201-1/+1
| | | | DENY all
* "clear ip bgp * soft out" does not trigger resending "neighbor x.x.x.x ↵Donald Sharp2015-05-201-1/+11
| | | | default-originate"
* set community delete stops as soon as it hits a community-list entry with a denyDonald Sharp2015-05-203-28/+139
|
* Some debug calls are being passed the incorrect peerDonald Sharp2015-05-204-116/+94
|
* An undefined route-map should deny everythingDonald Sharp2015-05-201-2/+18
|
* If a route-map is used on a neighbor default-originate statement we need to ↵Donald Sharp2015-05-205-2/+64
| | | | dynamically add/del the default route if the permit/deny result of the route-map changes.
* bgpd-nht-import-check-fix.patchDonald Sharp2015-05-2010-64/+252
| | | | | | | | | | | | | BGP: Fix network import check use with NHT instead of scanner When next hop tracking was implemented and the bgp scanner was eliminated, the "network import-check" command got broken. This patch fixes that issue. NHT is used to not just track nexthops, but also the static routes that are announced as part of BGP's network command. The routes are registered only when import-check is enabled. To optimize performance, we register static routes only when import-check is enabled. Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
* During connection setup, there may be two connections in progress for a BGPDonald Sharp2015-05-202-16/+19
| | | | | | peer - one initiated by the local system and the other initiated by the peer. Enhance key debug logs to also print the socket file descriptor so that it is clear which events pertain to which connection.
* Fixup old debug commands to work with new cliDonald Sharp2015-05-201-0/+70
|
* When a peer is unbound from its peer-group, in some situations the peer isDonald Sharp2015-05-201-0/+11
| | | | | | | | deleted while in other situations, the peer continues to exist but its global flags have all been reset. This is incorrect, particularly for the CONFIG_NODE flag as other parts of the code depend on this flag being set for a configured peer. This patch ensures that the correct flags still remain set for the peer after unbind from its peer-group.
* Fix some minor bugs with json output in bgp show commandsDonald Sharp2015-05-201-0/+10
|
* The retry of BGP connection after expiry of connect retry timer wasDonald Sharp2015-05-201-7/+4
| | | | | | broken by some earlier patches. Instead of staying in Connect state after reattempting the connection, the state used to go back to Idle and then try to connect. This patch fixes this error.
* When an incoming connection is received from a neighbor that is configured butDonald Sharp2015-05-201-0/+10
| | | | | | | is not activated for any address-family, the connection is accepted without taking further action. This causes the connection to hang in OpenSent on the neighbor and can in turn delay the connection setup. Fix to reject incoming connections when there is no address-family activated for the neighbor.
* When a peer that is Established goes down, it is moved into the ClearingDonald Sharp2015-05-202-23/+27
| | | | | | | | | | | | | | | state to facilitate clearing of the routes received from the peer - remove from the RIB, reselect best path, update/delete from Zebra and to other peers etc. At the end of this, a Clearing_Completed event is generated to the FSM which will allow the peer to move out of Clearing to Idle. The issue in the code is that there is a possibility of multiple Clearing Completed events being generated for a peer, one per AFI/SAFI. Upon the first such event, the peer would move to Idle. If other events happened (e.g., new connection got established) before the last Clearing_Completed event is received, bad things can happen. Fix to ensure only one Clearing_Completed event is generated.
* This is to backport the upstream fix on top of bgpd-restart-bit-fix.patchDonald Sharp2015-05-201-0/+2
| | | | [quagga-dev 11878] [PATCH] bgpd: stop startup timer on stopping BGP (fixes dd49eb1)
* When unexpected events are received, do not silently transition to IdleDonald Sharp2015-05-203-43/+88
| | | | | | | | | state through bgp_ignore() as that may not do required cleanup. Instead, define a new event handler to handle such cases, which will go through bgp_stop(). A similar change is also done to handle the case where an event handler fails. Also add a couple of variables to keep track of events for a peer.
* BGP: Fix update-groups commands to match neighborsDonald Sharp2015-05-203-65/+175
| | | | | | | | | | | | show update-groups summary was mislabeled. What it displays is not a summary at all, but the detailed info about all update-groups. Furthermore, there was no way to get detailed info about a specific subgroup. This patch renames "show * update-groups summary" to "show * update-groups" and adds an option to see the info specific to a subgroup only. It also validates the subgroup-id. show * update-groups summary will be added separately.
* BGP: More connected NHT fixupsDonald Sharp2015-05-201-4/+9
| | | | | When a NH came back, we didn't send a notification to kickstart the BGP FSM. This fixes that.
* BGP: For sessions based on interface/LL addr, use ifindex to identify peerDonald Sharp2015-05-205-15/+35
| | | | | | | | sockunion_same() and bgp_peer_conf_if_to_su_update() need to use the scope_id field of the ipv6 address to uniquify/identify the address. This allows sessions based on link local address when that address is not unique across peers.
* Cleanup some code related to NHT.Donald Sharp2015-05-202-6/+17
| | | | | | | | | | | | | | | | | When BGP connection setup was moved to rely on nexthop tracking, a few silly bugs were introduced. - bgp_connect_check() was called unnecessarily which resulted in false positives which resulted in log messages indicating an error and the FSM was unnecessarily reset. - When routes to peer disappeared, and the peer was not directly connected, the session was not immediately torn down, but only on hold timer expiry. - When NHT indicated that route to session IP addr was available, the previous state was not reset and as a result, connect retry timer had to expire before a reconnection was attempted. - connected check MUST be enabled only for EBGP non-multihop sessions and only if disbale-connected-check option is not enabled. This patch fixes all these errors.
* Show enabled debugs in the running configurationDonald Sharp2015-05-202-68/+162
|
* 'show ip bgp x.x.x.x' should display swpX when link-local peeringDonald Sharp2015-05-201-4/+25
|
* If the user changes a bestpath knob, recalculate all bestpathsDonald Sharp2015-05-201-212/+318
|
* Display 'Must be Connected' for certain nexthopsDonald Sharp2015-05-201-5/+15
|
* 'neighbor x.x.x.x default-originate' is not honored while servicing ↵Donald Sharp2015-05-201-0/+10
| | | | ROUTE_REFRESH
* Remove incorrect call to delete NHT for a route added via "network" command.Donald Sharp2015-05-201-1/+0
| | | | | | | | When a route is announced in BGP via "network" command, we also register its next hop with NHT code to allow of updates when the nexthop changes. When this route is deleted via "no network" command, we incorrectly make a second call to unregister the NHT tracking associated with this route. This causes a crash. Fix that.
* Fix reference counts for the nexthop cache entries.Donald Sharp2015-05-201-0/+3
| | | | Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* Don't register link local addresses for Next Hop Tracking.Donald Sharp2015-05-202-2/+39
| | | | | | We don't use the ifindex in registering NHT, and that may need to be eventually fixed. But for now, ignore requests to register link local addresses.
* Add 'debug bgp bestpath'Donald Sharp2015-05-204-42/+432
|
* The path ordering has an impact on whether paths are flagged as multipath, ↵Donald Sharp2015-05-201-27/+34
| | | | this should not be the case.
* Addpath does not work for soft-reconfigurationDonald Sharp2015-05-203-31/+66
|
* Use #define for mp_nexthop_len valuesDonald Sharp2015-05-2010-73/+81
|
* Ensure that during event-driven route-map processing, the peer status isDonald Sharp2015-05-201-2/+2
| | | | | considered, if required. Attempting to do certain processing while the peer is not Established can lead to errors.
* During update-delay, route withdraws to zebra should not be kept on hold,Donald Sharp2015-05-201-3/+0
| | | | because BGP may have pending withdraws from the peers going phase.
* Paths with global and link-local nexthops should be considered for multipathDonald Sharp2015-05-201-17/+38
|
* Add a no-as-set option to multipath-relaxDonald Sharp2015-05-204-51/+105
|
* Install aggregate routes we create in the RIBDonald Sharp2015-05-202-7/+37
|
* Relax draft-ietf-idr-error-handling-13 valid IP check in favor of ↵Donald Sharp2015-05-203-36/+9
| | | | draft-ietf-idr-error-handling-14
* Always add a keepalive to the OutQ when the KA timer expiresDonald Sharp2015-05-201-23/+0
|
* Check for overflow when RXing NLRI with addpathDonald Sharp2015-05-202-49/+112
|
* The 'show ip bgp json' output is incorrect if the aspath is emptyDonald Sharp2015-05-201-19/+13
|
* bgpd-ensure-fast-eor-send.patchDonald Sharp2015-05-201-4/+25
| | | | | | | | | | | | | | | BGP: Ensure EOR is always sent immediately after all prefixes have been adv. Its possible that EOR send is delayed until the next KeepAlive timer fires. This can happen when the send update iteration precisely matches the last update packet sent. After this since there are no more updates to be sent, no write thread is setup, but there's still the EOR to be sent. Therefore, EOR is not sent right away causing some neighbors to not exit RO mode and delaying convergence overall. This patch ensures that EOR is sent at the end of all updates on startup. Signed-off-by: Vivek Venkataraman <vivek@cumulusnetworks.com> Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
* Ensure connected nexthop entry for the peer is freed when the peer is freed.Donald Sharp2015-05-203-0/+77
|
* Ensure that if 'update-source <interface>' is specified, that interface isDonald Sharp2015-05-201-2/+7
| | | | | | | | | | chosen as the source for the local nexthops. Otherwise, do a complete match on the local IP address of the connection to determine the source interface for the local nexthops; this will handle scenarios where there is an overlap of subnets between interfaces (e.g., loopback and another interface). Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* A peer's advertisement-interval is reset if you change the peer's remote-asDonald Sharp2015-05-201-1/+4
|
* If we RX an OPEN with a bad ASN the NOTIFICATION we send should include the ASNDonald Sharp2015-05-201-6/+14
|
* Process and/or announce existing routes when a prefix-list, distribute-Donald Sharp2015-05-201-90/+72
| | | | | | | | | | | list or filter-list is applied (added or removed) against a neighbor or peer group. This makes the behavior inline with other configuration changes such as add or remove of route-map against a neighbor or change of other settings such as next-hop-self or as-override. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com>
* Ensure that routes from a peer are not considered for best pathDonald Sharp2015-05-201-0/+14
| | | | | | | | | | | | | comparison if the peer is not in an Established state. There can be a window between a peer being deleted and the background thread that actually clears the routes (marks them as "removed") runs during which best path may run. If this path selection compared two prefixes all the way down to peer IP addresses and one of these two peers had just been deleted, that peer would not have its sockunion structures, especially su_remote, resulting in a BGPD exception. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* When internal operations are performed (e.g., best-path selection, next-hopDonald Sharp2015-05-206-14/+17
| | | | | | | | | | | | | | 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>