summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-31debianpkg rules files: bgp-vnc is enabled by defaultsmccroskey
9782a8db773b8c5d9094eb3743aae43cc04e12f0 went with the wrong source of truth when comments and code disagreed over whether bgp-vnc should be enabled by default. Fix the behavior back to what it was before. Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31debianpkg: normalize rules filessmccroskey
downstream packagers prefer to change defaults in a trackable way by changing the rules file directly, rather than setting environment variables. Use '?=' (set if not already set in the environment or on the make cmdline) to set defaults rather than alternating between ifeq/ifneq clauses, which is harder to follow and edit. Change any existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any ifdef/ifndefs, as ?= guarantees he value will be defined in one way or another. This allows the old behavior of overriding via the environment while simplifying the workflow for anyone editing or extending the current logic and defaults. Portability note about '?=': it is GNU-make specific, but so is ifeq/ifneq, which is/was used in this file, and this file is specific to debian-based system as it is, so I don't consider it to be a problem in this case. Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and made it so that USE_XXX is always set for the sake of consistency. Also brought a few changes from base debianpkg/rules into the backports versions of the files where they were missing. Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-30Merge pull request #1690 from dslicenc/bgpd-vrf-show-cm17377Lou Berger
bgpd: fix output of show bgp vrf all neighbor x.x.x.x
2018-01-30bgpd: fix output of show bgp vrf all neighbor x.x.x.xDon Slice
Problem reported with output of the command "show bgp vrf all neighbor x.x.x.x" not limiting the output to that peer in any vrf. This fix corrects the logic to display by neighbor (ipv4/ipv6/interface) in any vrf. Ticket: CM-17377 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-01-30Merge pull request #1688 from chiragshah6/mdevOlivier Dugeon
ospfd: Fix default-info and redis cmd options
2018-01-29ospfd: Fix default-info and redis cmd optionsChirag Shah
Fix default-information parsing of metric-type, route-map. show running to display metic-type 2. metric, metric-type and route-map can be configured in any order, running-config displays in specific order.. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-01-29Merge pull request #1686 from donaldsharp/mem_leaks_zebraRenato Westphal
Mem leaks zebra
2018-01-29Merge pull request #1684 from donaldsharp/vrf_leakRenato Westphal
zebra: Fix to get correct nexthop-vrf
2018-01-29zebra: On shutdown actually delete rn's assoc w/ other_tablesDonald Sharp
Zebra stores routes coming from the kernel for non-default tables. This information on shutdown was being leaked because we never cleaned it up. Allow for this to happen now. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-29Merge pull request #1685 from LabNConsulting/working/vpn-docDonald Sharp
doc: minor cleanup of bgp vpnvX and remove encap safi references
2018-01-29lib: When we shutdown we would leak interface descriptionDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2018-01-29zebra: Cleanup error handling of nexthop vrf and vrfDonald Sharp
The error handling of the nexthop vrf and the vrf for what was specified on the cli was not as clean as it should have been. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-29doc: remove references to encap safiLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-01-29doc: change vpnvX -> ipvX vpnLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-01-29Merge pull request #1680 from donaldsharp/inet_ptonRenato Westphal
zebra: Fix failure to parse src
2018-01-29Merge pull request #1679 from qlyoung/revert-remove-options-directly-connectedRuss White
Revert "bgpd: disallow invalid config at cli layer"
2018-01-27zebra: Fix failure to parse srcDonald Sharp
If src happens to point at all 0's due to not initializing it and if the address passed in is not a v6 address then we would not set src in the AF_INET6 call and would fail the (src.ipv4.s_addr && inet_pton(AF_INET...) call. Thus causing us to return a NULL and make the routemap code think there was an issue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-27Merge pull request #1659 from chiragshah6/ospf_vrf_devMartin Winter
ospfd: show ip ospf neighbor json output format
2018-01-27zebra: Fix to get correct nexthop-vrfDonald Sharp
The nexthop_vrf should be looked up as appropriate, If the nexthop_vrf was specified use that, else use the vrf context of what was passed in. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-26Revert "bgpd: disallow invalid config at cli layer"Quentin Young
This reverts commit a174be631a14e0271fde6858fcb4d7ab55165014. Turns out we need that variable to accept peer groups.
2018-01-26Merge pull request #1671 from donaldsharp/southbound_pointerRuss White
Southbound pointer
2018-01-26Merge pull request #1676 from dslicenc/cm19322-bgp-jsonRenato Westphal
bgpd: remove poorly located bestpath json output
2018-01-26Merge pull request #1672 from qlyoung/frr-pthread-improvementsRenato Westphal
FRR pthread improvements
2018-01-25Merge pull request #1675 from donaldsharp/ptm_crashRenato Westphal
zebra: Fix crash in ptm code
2018-01-25bgpd: remove poorly located bestpath json outputDon Slice
The bestpath multipath-relax setting was added to the output of "show ip bgp neighbor json" several months ago but this is not the correct place to display that information and this fix removes it from there. The multipath-relax setting was also added to the output of "show ip bgp sum json" which is fine. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-01-25Merge pull request #1668 from qlyoung/fix-bgp-corrupt-header-assertRuss White
bgpd: fix race condition causing occasional assert
2018-01-25Merge pull request #1674 from chiragshah6/mdevRuss White
ospfd: clean up route map prefixlist vrf during exit
2018-01-25Merge pull request #1673 from opensourcerouting/ospfd-metric-issueDonald Sharp
ospfd: allow multiple options in the redistribute command
2018-01-24zebra: Fix crash in ptm codeDonald Sharp
The code change to switch from stream_getX to STREAM_GETX added a goto statement to be handled for a failure case. The failure case was properly handled but the normal case was not tested properly and there exists a situation where we would free the out_ctxt 2 times. Prevent that from happening. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-24ospfd: clean route map prefixlist vrf during exitChirag Shah
Call Route-map, prefix-list clean up routines and vrf clearnup during ospf daemon exit routine. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-01-24ospfd: allow multiple options in the redistribute commandRenato Westphal
Other variants of the redistribute command (e.g. "redistribute <ospf|table> (1-65535) ..." already accept multiple options. Fixes Issue #1670. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-01-24zebra: Move selected_fib assignmentDonald Sharp
The dest->selected_fib assignment needs to happen after the install and should be controlled by the southbound api return of success or failure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-24bgpd: check flags before attempting keepalive opsQuentin Young
If a peer already has keepalives turned on when asking to turn them on, return immediately. Same thing for turning them off. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-24tests: make tests happy for pthread changesQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-24bgpd: update pthreads to use lib changesQuentin Young
Use the new threading facilities provided in lib/ to streamline the threads used in bgpd. In particular, all of the lifecycle code has been removed from the I/O thread and replaced with the default loop. Did not do the same to the keepalives thread as it is much smaller (doesn't need the event system). Also cleaned up some comments to match the style guide. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-24lib: streamline frr_pthreads, add default loopQuentin Young
Some work on FRR's pthread wrapper. * Provide a built-in way to synchronize thread startup * Make utility functions take frr_pthread * instead of its integer ID * Pass frr_pthread * as pthread start function argument * Correct some comment styling * Rename some variables to match naming conventions in the file * Change parameter ordering in stop function prototype to follow the convention in the other functions * Default new frr_pthreads to using a vanilla event loop For the last point, the original goal when designing the implementation of pthreads into FRR was to be able to use the thread.c event based system inside pthreads. This code essentially encapuslates all the thread.c functionality into an easy to use pthread out of the box. Creating a new frr_pthread with a null attributes field will cause the created frr_pthread to run a thread.c event loop. The upshot of this is that it is now possible to safely run existing functions in a pthread in roughly 3 lines of code. It also serves as an example / starting point for others. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-24zebra: Modify southbound interface to pass `struct route_node`Donald Sharp
The route_node that we are working on is going to be interesting to the kernel_route_rib_pass_fail. So I am setting up the code to allow me to pass it. This will be done in a subsuquent commit. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-23Merge pull request #1664 from chiragshah6/ospfv3_devRuss White
ospf6d: SPF calculation w/ multiple Router LSAs originated from given Adv Router
2018-01-23Merge pull request #1665 from donaldsharp/nexthop_labelsRuss White
Cleanup some zclient code
2018-01-23Merge pull request #1667 from Orange-OpenSource/masterRuss White
OSPFD: Solve Issue #1652
2018-01-23bgpd: fix race condition causing occasional assertQuentin Young
If a BGP message header fails validation we send a BGP NOTIFICATION from the I/O thread. At this time we clear the output buffer, push a NOTIFICATION and then call the manual write function for errors. But in between the push and the write the main thread could have pushed some other message. Thus we need to hold the lock for the duration of the function. TOCTTOU. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-23OSPFD: Solve Issue #1652Olivier Dugeon
Issue 1652 was related to OSPF Crash on termination when ospf is configured to flood self Opaque LSA e.g TE or RI Opaque LSA. Analysis: The problem resides in free_opaque_info_per_type() line 576 of ospf_opaque.c. Once LSA flush, the function removes by calling listnode_delete() function the opaque_info_per_type data structure. However, this is also performed at the upper level function ospf_opaque_type10lsa_term() which call list_delete_and_null() function. This result into a double free pointer exception. Solution: Remove call to listnode_delete() calls in free_opaque_info_per_type() function as it is done by list_delete_and_null(). Delete lines 592 - 615. Remove also second call to ospf_opaque_type10lsa_term() in ospfd.c line 848. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2018-01-23Merge pull request #1618 from donaldsharp/zebra_startup_orderingPhilippe Guibert
zebra route-leaking for static routes
2018-01-22ospf6d: spf calculation w/ multiple router lsasChirag Shah
An OSPFv3 enabled Router can originate or receive multiple Link State-IDs for Router LSAs. As per RFC 5340 A 4.3, more than one Router LSAs, from given Vertex is considered (as concatenated) single large Router LSA. Created hidden show command to simulate concatenated large LSA from advertising/self Router LSAs. Ticket:CM-19329 Reviewed By: Testing Done: Simulate 160 subinterfaces between R1 === R2--R3, This triggers R1 and R2 to generate multiple link state IDs for Router LSAs. During SPF calculation only aggregated single router LSA processed and SPF tree formed. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-01-22bgpd, lib, pimd: Abstract commands for nexthop trackingDonald Sharp
Abstract the code that sends the zapi message into zebra for the turn on/off of nexthop tracking for a prefix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-22pimd: No need to assert on the redist_defaultDonald Sharp
zclient_init sets the redist_default to the appropriate value, testing it with an assert doesn't really provide us with much of anything useful. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-22lib: Unset bitmap when not using itDonald Sharp
The zclient->redist bitmap for vrf's was being set again for the zclient_send_dereg_requests function. This should be a unset on tear down. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-22lib: Cleanup some zclient clutter.Donald Sharp
The zclient code can be cleaned up a tiny bit and hopefully improve it's indentation some. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-22Merge pull request #1655 from LabNConsulting/working/master/consistent_countQuentin Young
bgpd: update last_update whenever obuf sent
2018-01-22bgpd: update last_update whenever obuf sentLou Berger
(to be consistent with last_write updates) Signed-off-by: Lou Berger <lberger@labn.net>