summaryrefslogtreecommitdiffstats
path: root/bgpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bgpd: Fix call bgp_zebra_terminate_radvDonald Sharp2016-05-031-3/+8
| | | | | | | | | The call into bgp_zebra_terminate_radv was setting the peer->ifp to NULL before calling into bgp_zebra_terminate_radv. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* "bgp network import-check" needs hidden "exact" optionDaniel Walton2016-05-021-1/+10
| | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: vivek@cumulusnetworks.com Ticket: CM-10694 To be backwards compatible we should silently accept the "exact" keyword here
* BGP: Trigger IPv6 router advertisements upon config of unnumbered neighborvivek2016-05-025-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of turning on IPv6 RA on every interface as soon as it has an IPv6 address, only enable it upon configuration of BGP neighbor. When the BGP neighbor is deleted, signal that RAs can be turned off. To support this, introduce new message interaction between BGP and Zebra. Also, take appropriate actions in BGP upon interface add/del since the unnumbered neighbor could exist prior to interface creation etc. Only unnumbered IPv6 neighbors require RA, the /30 or /31 based neighbors don't. However, to keep the interaction simple and not have to deal with too many dynamic conditions (e.g., address deletes or neighbor change to/from 'v6only'), RAs on the interface are triggered upon any unnumbered neighbor configuration. BGP-triggered RAs will cause RAs to be initiated on the interface; however, if BGP asks that RAs be stopped (upon delete of unnumbered neighbor), RAs will continue to be exchanged if the operator has explicitly enabled. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10640 Reviewed By: CCR-4589 Testing Done: Various manual and automated (refer to defect)
* Fix BGP JSON outputDinesh G Dutt2016-04-292-38/+153
| | | | | | | | | | Ticket: CM-10644 Reviewed By: Testing Done: The JSON outputs of a bunch of BGP commands were broken due to the addition of VRF support. This fixes them all. Also replaces the use of "-" in some of the JSON variable names with camel case names.
* quagga: Fixup startup to allow consistency between sysV and systemdDonald Sharp2016-04-271-3/+0
| | | | | | | | | | | | | | | | | | | We want the ability to start up quagga in a varied set of environments. This needs to be done in SysV and systemd startups. As such refactor the code to allow us to allow end users to easily switch between the two sysV: edit the /etc/quagga/daemons file service quagga [start|stop|reload|restart] Systemd: edit the /etc/quagga/daemons file systemctl [start|stop|reload|restart] quagga Ticket: CM-10634 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* no neighbor peergrp shutdown no longer worksDaniel Walton2016-04-261-2/+2
| | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10565
* Update last reset reason on interface down or neighbor addr loss.Dinesh G Dutt2016-04-253-2/+10
| | | | | | | | | | | Ticket: Reviewed By: Testing Done: For interface-based peering, we don't update the reset reason to be interface down. Similarly, we don't update the reason to be loss of neighbor address (maybe due to RA loss). This patch addresses these limitations.
* bgpd: debug protect a log messageDonald Sharp2016-04-221-2/+3
| | | | | | | | | | | | With the addition of RA being turned on by default. Spewing this error message when unable to connect doesn't make much sense anymore. Ticket: CM-10494 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
* Addition on hidden command "bfd multihop/singlehop" and "ptm-enable" per ↵radhika2016-04-221-6/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface command CM-10435 Issue: IBGP BFD sessions are created as multi-hop even though peer is single-hop away. This is causing an interop issue with ICOS. Root Cause: By design all IBGP peers are registered with BFD as multi-hop. Fix: • Changed the default behavior of always treating IBGP BFD sessions as mult-hop. shared_network variable is used to determine whether the IBGP peer is single hop or multi-hop away. The logic for determining whether EBGP peer is single hop or multi-hop has not been changed. • Since the default behavior has been changed, it will cause interop issues between 2.5 and 3.0 IBGP BFD sessions. A new hidden command “bfd multihop/singlehop” has been introduced to overcome the interop issues. dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd <2-255> Detect Multiplier <cr> dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# no neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop dell-s6000-10(config-router)# do show running-config ! router bgp 100 neighbor igroup peer-group neighbor igroup bfd 5 500 500 neighbor igroup bfd multihop neighbor 30.0.2.2 remote-as 100 neighbor 30.0.2.2 peer-group igroup neighbor 3101:abc:bcad::2 remote-as 100 neighbor 3101:abc:bcad::2 peer-group igroup neighbor 30.0.2.6 remote-as 200 neighbor 30.0.2.6 bfd multihop neighbor 3102:abc:bcad::6 remote-as 200 neighbor 3102:abc:bcad::6 bfd neighbor 3102:abc:bcad::6 ebgp-multihop 255 ! CM-10260 Issue: “Unable to connect to socket” message keeps getting logged when ptmd process doesn’t exist. Root Cause: BFD clients (bgpd, ospfd and ospf6d) during initialization try to register with BFD/PTM by default. This results in continuous logging If PTM does not exist since there is no max on number of retries. Fix: • Stop the retries to connect to PTM after max reconnect timer of 5 mins is reached. • Added zebra debug event wrapper to message logging to prevent it from showing by default. CM-4541 Issue: Addition of a new command "ptm-enable" or "no ptm-enable" per interface to enable/disable PTM link status checks for an interface. Fix: Currently there is only one ptm-enable global command that enables/disables PTM status updates for all interfaces. This new command will give the handle to individually stop interface from reacting on the PTM status updates. • by default interface uses the ptm-enable global configuration • "no ptm-enable" on an interface will disable PTM status updates from taking affect for that interface. This can bring the interface up if it was brought down due to PTM status update. • "ptm-enable" on an interface will cause the interface to fallback to the global ptm-enable configuration value and will bring the interface up or down based on the last stored PTM status update if global ptm is enabled. Ticket: CM-10435, CM-10260 and CM-4541 Signed-off-by: Radhika Mahankali Reviewed-by: Donald Sharp, Kanna Rajagopal
* bgp: Anti-Yammer PatchDonald Sharp2016-04-211-1/+2
| | | | | | | | | | | | When you shutdown interfaces with ifdown -a -X eth0 bgp would still attempt to talk to it's configured neighbors but since the interface is down it would just complain and complain. Now that we have somewhat aggressive timers the error message really starts to show up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* BGP: Certain peer-group parameters (e.g., enhe, local-as) are not takingDaniel Walton2016-04-191-34/+57
| | | | | | | | | | | effect Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-10290
* lib, bgpd: Refactor vrf handling through zclientDonald Sharp2016-04-152-63/+82
| | | | | | | | | | | | | | | | Protocols receive zclient vrf creation events from zebra. This data was being handed to the protocol to decode and then to hand back to zclient to create the vrf to then handle appropriately. This is a bad idea. Modify the code such that when zclient.c receives a vrf event from zebra that it decodes the data and just creates the vrf. Individual protocols just need to handle the appropriate vrf events. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
* BGP: cannot "no neighbor ISL timers 3 10" for peer-groupDaniel Walton2016-04-141-1/+1
| | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10438
* quagga: "set community x:y" needs bounds checkingDaniel Walton2016-04-144-133/+146
| | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10002 superm-redxp-05# conf t superm-redxp-05(config)# route-map FOO permit 10 superm-redxp-05(config-route-map)# set community ? AA:NN Community number in AA:NN format (where AA and NN are <0-65535>) or local-AS|no-advertise|no-export|internet or additive none No community attribute superm-redxp-05(config-route-map)# set community 2:2 superm-redxp-05(config-route-map)# set community 2:70000 % Malformed communities attribute superm-redxp-05(config-route-map)# set community 70000:2 % Malformed communities attribute superm-redxp-05(config-route-map)#
* BGP: Register with correct VRF id for redistributionvivek2016-04-141-2/+2
| | | | | | | | | | | When doing a redistribution re-registration upon route-map updates, the correct VRF id was not being used. Fixed. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-10311 Reviewed By: Trivial Testing Done: Manual - verified failed scenario
* BGP: Use VRF_UNKNOWN for initializationvivek2016-04-143-15/+15
| | | | | | | | | Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10423 Reviewed By: CCR-4474 Testing Done: Manual (basic checks)
* BGP: Implement key show commands for all VRFsvivek2016-04-134-13/+245
| | | | | | | | | | | | | | | | | | | | | Key BGP 'show' commands have been expanded to support 'vrf all': show ip bgp vrf all summary show ip bgp vrf all neighbors show ip bgp vrf all nexthop show ip bgp vrf all update-group show ip bgp vrf all show bgp vrf all summary show bgp vrf all update-group show bgp vrf all Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-10402 Reviewed By: CCR-4466 Testing Done: Manual
* Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga ↵Donald Sharp2016-04-071-1/+3
|\ | | | | | | into cmaster
| * bgpd: Resolve ability to add route-map out to peer-group memberDon Slice2016-04-061-1/+3
| | | | | | | | | | | | | | | | | | | | Modified the configuration code to properly allow a peer-group member to have a route-map out applied when one does not exist on the peer-group itself. This capability already existed for route-map in. Ticket: CM-10058 Signed-off-by: Don Slice Reviewed-by: Donald Sharp
* | lib, vtysh: Return actual problem further upDonald Sharp2016-04-071-1/+2
|/ | | | | | | | | | | | When we encounter a problem loading a config file quantify to the end user what has gone wrong, with a combination of err output as well as return codes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
* bgpd: Another hash_get crash fixDonald Sharp2016-04-041-0/+3
| | | | | | | | | | | | Basically when modifying the peer->su, we must *always* release the hash and then re-install it, else we will cause crashes when we go to look up data that is not going to be there. Ticket: CM-10212 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga ↵Donald Sharp2016-04-011-2/+5
|\ | | | | | | into cmaster
| * BGP: Enable multiple instance support by defaultvivek2016-04-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quagga BGP needed a config 'bgp multiple-instance' in order to be able to configure and use VRFs. Since this support is intrinsic to the implementation, make this configuration on by default. Corresponding change to 'show running-config' (and write) to display only if "no" is configured. This change will eliminate one unnecessary step in the configuration. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10070 Reviewed By: CCR-4383 Testing Done: Manual
* | bgp: Fix crash in hash_get for peerDonald Sharp2016-04-011-0/+1
|/ | | | | | | | This commit partially backs out 83260f0. Ticket: CM-10212 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* bgp: Order neighbor information in show runDonald Sharp2016-03-311-0/+24
| | | | | | | | | | When displaying the output of a 'show run', display the neighbor information in an ordered manner. Ticket: CM-10184 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* bgpd: Add group pointer to peer_create function.Donald Sharp2016-03-314-11/+10
| | | | | | | | | When creating a 'struct peer' add in the ability to set the peer group associated with that peer. Ticket: CM-10184 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* BGP: Fix BGP unnumbered peerings across VRFsvivek2016-03-292-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Upon receipt of incoming connection, a peer structure (doppelganger) is created internally and the connection processed for it. The problem is that in the case of BGP unnumbered, the sockunion structure within BGP was being updated (in peer_create()) prior to the peer's flags being updated, so it didn't take into account the 'v6only' configuration. This results in subsequent problems when bgp_bind() is done - the socket ends up being bound to the BGP instance instead of the interface. In the case of an incoming connection, we should just use the addresses on which the connection was setup/accepted, there is no need to attempt to derive it again. Further, there is no need to attempt to update addresses at the time of peer_create() since that is done when the connection is attempted in bgp_start(). Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-10028 Reviewed By: CCR-4373 Testing Done: Manual, bgpsmoke
* bgpd: Fix VU#270232, VPNv4 NLRI parser memcpys to stack on unchecked lengthDonald Sharp2016-03-281-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address CERT vulnerability report VU#270232, memcpy to stack data structure based on length field from packet data whose length field upper-bound was not properly checked. This likely allows BGP peers that are enabled to send Labeled-VPN SAFI routes to Quagga bgpd to remotely exploit Quagga bgpd. Mitigation: Do not enable Labeled-VPN SAFI with untrusted neighbours. Impact: Labeled-VPN SAFI is not enabled by default. * bgp_mplsvpn.c: (bgp_nlri_parse_vpnv4) The prefixlen is checked for lower-bound, but not for upper-bound against received data length. The packet data is then memcpy'd to the stack based on the prefixlen. Extend the prefixlen check to ensure it is within the bound of the NLRI packet data AND the on-stack prefix structure AND the maximum size for the address family. Reported-by: Kostya Kortchinsky <kostyak@google.com> This commit a joint effort between: Lou Berger <lberger@labn.net> Donald Sharp <sharpd@cumulusnetworks.com> Paul Jakma <paul.jakma@hpe.com> / <paul@jakma.org>
* BGP: Enhance clear commands for VRFsvivek2016-03-251-81/+1550
| | | | | | | | | | | Fix and enhance the entire hierarchy of clear commands in BGP to work for VRFs. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9945 Reviewed By: CCR-4360 Testing Done: Manual (brief)
* bgpd, lib, ospfd, ospf6d: Fix bfd interface lookupDonald Sharp2016-03-241-1/+1
| | | | | | | | | bfd was receiving a callback with an interface name string but was ignoring the passed in vrf to find the ifp pointer. This commit fixes that code path in bfd. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
* bgpd, lib, zebra: Add ability to retrieve ifp without specifying a vrfDonald Sharp2016-03-231-1/+1
| | | | | | | | | | There are cases where we get an interface name but do not have a corresponding vrf. We care about getting an interface pointer so just provide a function that searches all vrf's for the ifp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Radhicak Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
* Quagga: Make routemap updates or deletes work for VRFsvivek2016-03-224-57/+56
| | | | | | | | | | | | | | | | | | | | | | | | | Updates to routemaps and delete of the routemap were not working properly for VRFs. This was because while routemaps are global, the routemap update processing timer and the processing were at the per-instance level. This approach was unable to handle processing for multiple instances as the routemap has no tracking of which instances are still pending processing. This lead to the processing happening correctly only for the first instance - which could be the default instance or some other instance. It could also result in reference to freed memory for an instance. The fix done is to make the update/delete processing also global and not per instance. This means that the route-map delay timer will be global and a global thread will handle the change (or delete) for all instances instead of spawning a separate thread for each instance. To support this, a global BGP command "bgp route-map delay-timer <value>" has been implemented. The existing command per-instance is not deleted but will update the global timer. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-6970, CM-9918 Reviewed By: CCR-4320 Testing Done: Manual, bgpsmoke
* quagga: delete interface from default table when moved to vrfDon Slice2016-03-181-1/+1
| | | | | | | | | | All daemons changed to flag an interface that has been moved to a vrf as DELETED instead of INTERNAL. When they were flagged as IFINDEX_INTERNAL, ospf, rip, and isis would re-install them in the default assuming that they were being "pre-defined" before the kernel definitions. Ticket: CM-9265 Signed-off-by: Don Slice Reviewed-by: Donald Sharp
* bgpd: Fix initialization check for bgp testsroot2016-03-181-1/+1
| | | | | | | | | | With the vrf startup code put in place we've modified bgp startup. If we are running inside of the 'make check' infrastructure zclient is going to be NULL since it is not initialized yet nor do we really want to connect to zebra. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* BGP: Fix linkage between BGP instance and VRF structurevivek2016-03-161-5/+10
| | | | | | | | | | | | | | | | The issue here has to do with the fact that VRFs (like interfaces) are not actually getting deleted when they are removed - they remain present. This leads to situations in which BGP may try to unlink more than once, which messes up the reference count (lock) in the BGP instance. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-9419 Reviewed By: CCR-4302 Testing Done: Manual, also verified by Atul <DETAILED DESCRIPTION (REPLACE)>
* BGP: Check in multipath comparison before invoking sockunion_cmpvivek2016-03-131-1/+10
| | | | | | | | | | | | | | | | | | During route selection for Multipath routes, when multiple peers are flapping, it is possible that the old (former) multipath list of routes for a destination may include routes from peers which are no longer in Established state. When the new multipath list is compared against the old list to identify changes, additional checks are needed to avoid comparing connection addresses if the peer is not in Established state. This patch introduces those checks. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-9671 Reviewed By: CCR-4277 Testing Done: Manual (problem could not be replicated to verify)
* BGP: remove deprecated debugs from the parserDaniel Walton2016-03-111-70/+0
| | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-9838
* show bgp neighbor should accept peer hostnameDaniel Walton2016-03-101-1/+2
| | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9616
* BGP memory leak in peer hostnameDaniel Walton2016-03-102-3/+28
| | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-9786
* Support for multi-client and client reg msgradhika2016-03-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket: CM-7615, CM-7773 Reviewed By: CCR-3610, CCR-3708 Testing Done: Unit, BGP Smoke and OSPF Smoke Changes (70790261926b17200c8c9377c4576cd3b486fcef) ported from 2.5 Issue (related to CM-7615): 1. CM-7615: There is mismatch in the client name between ptm display of client BFD sessions and the zebra logs. For example, if bgpd added BFD session, zebra logs will show the client as “bgp” but the ptm display will show it as “quagga” 2. Bigger problem is when 2 clients (for example OSPF and BGP) from Quagga register for same BFD session and only one client de-registers the BFD session. This results in BFD session deletion from PTM even though other client still has the BFD registration. Root Cause: Even though BGP, OSPF and OSPF6 are 3 different clients from Quagga that are trying to register/deregister BFD sessions with PTM, all 3 are represented as one client “quagga” from zebra. This makes it hard for PTM/BFD to distinguish between all three when BFD peer registration/deregistration happens from the clients. Fix: Send the actual client name bgp, ospf or ospf6 from zebra with BFD reg/dereg messages instead of one unified client name “quagga” CM-7773: BFD sessions are not getting cleaned from PTM even though no BGP peering exists in Quagga. Root Cause: PTM cleans up stale BFD sessions from a client when it finds a change in seq id advertised by the client. But, if PTM never detects a change in the seq id then the stale BFD sessions never get cleaned up. The test restarts the quagga without saving the configuration, which results in no BGP peering. No BGP peers are registered with PTM after restart and PTM does not detect a client seq id change resulting in stale BFD sessions. Fix: New client registration message was added in PTM. Every client that is interested in BFD monitoring will register with PTM with the client seq id. Client will register with a different seq id (typically pid) every time it restarts. This will help in detecting the change in seq id and cleanup of stale BFD sessions for a client. Code Changes: To support the new client registration message following changes have been made - Added support for client registration messaging in zebra for sending messages to PTM. - Added support for client registration messaging between zebra and clients (BGP, OSPF and OSPF6) in BFD library. - Expanded the reg/de reg peer messaging between zebra and clients to support client specific seq id to distinguish between multiple clients registering for BFD peer rather than one “quagga” client. - Changes in bgpd, ospfd and ospf6d to send client registrations at the time of daemon initialization and on receiving BFD peer replay message.
* BGP: Update commands for VRF supportvivek2016-03-094-533/+752
| | | | | | | | | | | | Ensure commands dealing with update-groups and peer-groups support VRFs. Also implement a new command "show bgp vrfs" to show summary information of all configured VRFs. Some additional code cleanup in this area. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9247 Reviewed By: CCR-4267 Testing Done: Manual
* Exclamation points are missing at the end of an address-familyDaniel Walton2016-03-081-1/+1
| | | | | | | | | sub-context Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-9268
* Zebra and bgpd: VRF support for BFDradhika2016-03-081-2/+9
| | | | | | | | | | | | Following changes have been done to support VRF for BFD in zebra and bgpd. - Pass the correct VRF value from bgpd to zebra for reg and dereg of BFD destinations. - Send the non-default vrf name in reg/dereg messages of multihop destination to BFD/PTM from zebra. Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Ticket: CM-8450 Reviewed By: CCR-4253 Testing Done: Unit, PTM smoke, BGP Smoke
* BGP: Update commands for VRF supportvivek2016-03-073-94/+657
| | | | | | | | | | | Ensure commands dealing with display of routes and nexthops support VRFs. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9247 Reviewed By: CCR-4250 Testing Done: Manual
* bgpd: Remove expensive prefix count from json.Donald Sharp2016-03-021-18/+0
| | | | | | | | | 'show bgp ipv4 uni summ' is counting each prefix sent to each neighbor. At scale this is an expensive operation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* BGP: Handle unknown interface at deletevivek2016-03-021-0/+3
| | | | | | | | | | | | | When BGP deals with interfaces at a VRF-level, it may get an interface delete for a VRF which it has just de-registered, so it may not be able to locate the interface. This is no longer an error, so handle this in the message processing. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9462 Reviewed By: None (trivial) Testing Done: None
* "show ip bgp neighbor json" displays "Hostname: ", invalidates jsonDaniel Walton2016-03-011-4/+16
| | | | | | | | | format Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-9611
* BGP: Unnumbered peering in a VRFvivek2016-02-292-37/+85
| | | | | | | | | | | | | | | | | | | Code changes to make unnumbered peering work in a VRF. The changes have to do with locating the interface in the correct VRF (in order to look for neighbor address) in the case of outgoing connections and when specifying source address as well as fetching the correct instance for an incoming connection based on reading the device the socket is bound to (the multi-vrf socket option in the kernel). Additionally, for IPv4 unnumbered peering in a VRF (based on /30 or /31 addresses), bind to the VRF rather than the interface. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-9311 Reviewed By: CCR-4192 Testing Done: Manual, bgpsmoke
* Quagga: Implement VRF change semantics for an interfacevivek2016-02-251-0/+62
| | | | | | | | | | | | | Handle VRF change for an interface in BGP (the only VRF client right now). Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-9527 Reviewed By: CCR-4174 Testing Done: Manual tests of various scenarios
* bgpd: Fix function indirection when none is neededDonald Sharp2016-02-241-14/+5
| | | | | | | | bgp_update_main was only called by bgp_update. bgp_update only called bgp_update_main. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reivewed-by: Daniel Walton <dwalton@cumulusnetworks.com>