summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bgpd: Fix unused variableDonald Sharp2017-09-251-1/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: fix heap use after freeQuentin Young2017-09-251-1/+14
| | | | | | | | | | | | | | | | | | | | During the loop we save a pointer to the next route in the table in case brouter is deleted during the course of the loop iteration. However when we call ospf6_route_remove this can trigger ospf6_route_remove on other routes in the table, one of which could be pointed at by said pointer. Since ospf6_route_next locks the route that it returns, it won't actually be deleted, instead the refcount will go to 1. In the next loop iteration, nbrouter becomes brouter, and calling ospf6_route_next on this one will finally decrement the refcount to 0, resulting in a free, which causes subsequent reads on brouter to be UAF. Since the route will have OSPF6_ROUTE_WAS_REMOVED set, provided the memory was not overwritten before we got there, we'll continue on to the next one so it is unlikely this will cause a crash in production. Solution implemented is to check if we've deleted the route and continue if so. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #1238 from pguibert6WIND/issue_1185Donald Sharp2017-09-252-8/+21
|\ | | | | bgpd: vty command fixup for evpn rt5
| * bgpd: vty command fixup for evpn rt5Philippe Guibert2017-09-252-8/+21
|/ | | | | | evpn vty command can be used to configure evpn rt5 entries. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* Merge pull request #1227 from qlyoung/pim-cli-npdJafar Al-Gharaibeh2017-09-241-4/+12
|\ | | | | pimd: fix some null pointer derefs in cli
| * pimd: fix some null pointer derefs in cliQuentin Young2017-09-221-4/+12
| | | | | | | | | | | | | | If pim/igmp is not enabled on an interface, the ->info pointer will be null. Need to check that before dereferencing it. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #1231 from opensourcerouting/isis-fixesDonald Sharp2017-09-233-39/+41
|\ \ | | | | | | Isisd: assorted fixes
| * | isisd: ensure fragments get always linkedChristian Franke2017-09-231-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | When we receive or generate new versions of fragments which are curently pending for age out, we need to ensure that they are correctly linked to their lsp0. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | isisd: cleanup unused variablesChristian Franke2017-09-231-4/+0
| | | | | | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | isisd: always trigger spf run asynchronouslyChristian Franke2017-09-231-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | isis_spf_schedule gets called in states where an immediate spf run will lead to crashes, e.g. from lsp_destroy. Delay the spf execution until the event calling isis_spf_schedule has run to completion to avoid this. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | isisd: use only one IP of neighbor as nexthopChristian Franke2017-09-231-6/+2
|/ / | | | | | | | | | | | | | | There is no point in building a multipath route via one neighbor if there is only one link to the neighbor, but the neighbor has multiple IPs on that link. So only create one nexthop per link. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #1222 from opensourcerouting/isis-spf-improvementsDonald Sharp2017-09-235-86/+224
|\ \ | | | | | | isisd: spf improvements
| * | isisd: SPF doesn't need to maintain childrenChristian Franke2017-09-221-20/+0
| | | | | | | | | | | | | | | | | | | | | SPF maintains a datastructure which is never actually read. I think we can spend CPU more sensibly. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | isisd: use skiplist to implement ordered list for SPFChristian Franke2017-09-221-65/+103
| | | | | | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | tests: verify isis_vertex_queue correctnessChristian Franke2017-09-224-1/+121
| |/ | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #1215 from opensourcerouting/zapi_nexthopsDonald Sharp2017-09-229-15/+32
|\ \ | | | | | | *: fix segfault when sending more than MULTIPATH_NUM nexthops
| * | *: fix segfault when sending more than MULTIPATH_NUM nexthopsRenato Westphal2017-09-219-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fallout from PR #1022 (zapi consolidation). In the early days, the client daemons would allocate enough memory to send all nexthops to zebra. Then zebra would add all nexthops to the RIB and respect MULTIPATH_NUM only when installing the routes in the kernel. Now things are different and the client daemons can send at most MULTIPATH_NUM nexthops to zebra, and failure to respect that will result in a buffer overflow. The MULTIPATH_NUM limit in the new zebra API is a small price we pay to avoid allocating memory for each route sent to zebra. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | Merge pull request #1226 from opensourcerouting/isis-fix-fragment-overflowDonald Sharp2017-09-221-0/+11
|\ \ \ | |_|/ |/| | isisd: Don't corrupt generated LSPs if information exceeds capacity
| * | isisd: Don't corrupt generated LSPs if information exceeds capacityChristian Franke2017-09-221-0/+11
|/ / | | | | | | | | | | | | | | | | Standard IS-IS only supports up to 256 fragments per router. Recognize when the information we want to advertise exceeds 256 fragments and print a warning in this case instead of overflowing the fragment counter and overwriting existing LSP fragments. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #1157 from donaldsharp/recursive_blackholeJafar Al-Gharaibeh2017-09-213-86/+80
|\ \ | | | | | | Recursive blackhole resolution
| * | bgpd: Fix bgp display of blackhole nexthopsDonald Sharp2017-09-121-65/+55
| | | | | | | | | | | | | | | | | | | | | Allow BGP to tell the user that a particular nexthop is a blackhole nexthop. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | zebra: Allow recursive nexthop resolution to consider blackholesDonald Sharp2017-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we get a route install for a route that needs to be recursively resolved allow the blackhole to be considered and used if it is available. This allows bgp to install a route that will be blackholed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | zebra: Allow recursively resolved blackhole routes to be installedDonald Sharp2017-09-121-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So the current code for a blackhole route assumed that you would never want a recursively resolved blackhole to work. Suppose you have this setup: 1) ip route 192.0.2.1/32 Null0 2) BGP installed with a route-map that rewrites the nexthop to 192.0.2.1. Zebra will end up with a recursive nexthop that resolves to the blackhole. The original rib install function assumed that we would never want the ability to recursively resolve a blackhole route. Instead just handle the blackhole as part of the nexthop_num = 1 case. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | zebra: Free leaked zclient data structures on shutdownDonald Sharp2017-09-211-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On shutdown we were deleting the linked list that kept the zclient connections, but we were not freeing the data pointed at by the link list. This modification allows the normal cleanup of the linked list to cleanup the zclient data structure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ripd: Free leaked memory on shutdownDonald Sharp2017-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | Usage of the address sanitizer and topotests showed that rip was leaking obuf on shutdown Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #1153 from nkukard/docs-ip-bgp-masterDonald Sharp2017-09-211-81/+87
|\ \ \ | |_|/ |/| | doc: updates for master, cherry-picked from my 3.0 branch
| * | doc: Cleaned up BGP showing of information sectionNigel Kukard2017-09-111-20/+26
| | | | | | | | | | | | Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
| * | doc: English language cleanupNigel Kukard2017-09-111-4/+4
| | | | | | | | | | | | Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
| * | doc: Moved AS regular expressions to BGP regular expressionsNigel Kukard2017-09-111-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | Regular expressions are used throughout in bgp commands, it should not be in a section under as paths which cannot be easily found. Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
| * | doc: Clarified the use of show bgp ipv4/ipv6 for communitiesNigel Kukard2017-09-111-19/+19
| |/ | | | | | | Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
* | Merge pull request #1212 from mkanjari/init-fixRenato Westphal2017-09-212-5/+5
|\ \ | | | | | | bgpd: Intialize all the variables used in argv_find.
| * | bgpd: Intialize all the variables used in argv_find.Mitesh Kanjariya2017-09-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Ticket: CM-17706 Review: CCR-6639 Testing: Manual (test failing in min test for ARM) Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
* | | Merge pull request #1160 from opensourcerouting/admin_distanceDonald Sharp2017-09-212-8/+24
|\ \ \ | |/ / |/| | Admin distance
| * | zebra: fix administrative distance issuesRenato Westphal2017-09-122-8/+11
| | | | | | | | | | | | | | | | | | | | | * Reuse route_distance() on rib_add_multipath() and on rib_add(); * Set the admin distance of LDP and BGP MPLS LSPs. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | zebra: Fix up default admin distance for some route typesDonald Sharp2017-09-121-0/+13
| |/ | | | | | | | | | | | | | | | | | | Set the default admin distance for some route types more appropriately. The route_distance function would return 0 for array items not configured, which is not the right thing to do. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | Merge pull request #1204 from donaldsharp/static_uptimeRenato Westphal2017-09-201-0/+3
|\ \ | | | | | | zebra: Allow static routes to track how long they've been around
| * | zebra: Allow static routes to track how long they've been aroundDonald Sharp2017-09-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Static routes were not keeping track of uptime appopriately and as such we were not properly displaying uptime. Fixes: #1196 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #1192 from dwalton76/igmp-group-failureRenato Westphal2017-09-201-1/+1
|\ \ \ | | | | | | | | lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED
| * | | lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILEDDaniel Walton2017-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Testing the patch: root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c ' int vlan2' -c 'ip igmp join 233.200.0.1 10.1.1.1' Failure joining IGMP group: multicast not enabled on interface vlan2 root@cel-redxp-10[frr-dwalton76]# echo $? 1 root@cel-redxp-10[frr-dwalton76]
* | | | Merge pull request #1205 from donaldsharp/show_lcommunityRenato Westphal2017-09-201-3/+15
|\ \ \ \ | | | | | | | | | | bgpd: Add large community json support
| * | | | bgpd: Add large community json supportDonald Sharp2017-09-191-3/+15
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Add the ability to display large commnunity json support Fixes: 1191 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | isisd: generate unique circuit idsChristian Franke2017-09-204-37/+42
| | | | | | | | | | | | | | | | | | | | | | | | Circuit IDs need to be unique, otherwise mayhem will ensue. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | | | Merge pull request #1200 from opensourcerouting/bgpd-ecmp-fixDonald Sharp2017-09-201-10/+15
|\ \ \ \ | | | | | | | | | | bgpd: fix sending of ECMP routes with both v4/v6 nexthops to zebra
| * | | | bgpd: fix sending of ECMP routes with both v4/v6 nexthops to zebraRenato Westphal2017-09-191-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code assumed that all nexthops of an ECMP route were of the same address-family. This is not always the case. Reported-by: Don Slice <dslice@cumulusnetworks.com> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | | | Merge pull request #1202 from ↵Donald Sharp2017-09-202-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | LabNConsulting/working/master/patch/rfapi-rd.family bgpd: rfapi - fix 'add vnc' command not picking up RD from vrf-policy
| * | | | | bgpd: rfapi - fix a couple of check that should have been against RD len vs ↵Lou Berger2017-09-192-2/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | RD type flag (family) Signed-off-by: Lou Berger <lberger@labn.net>
* | | | | Merge pull request #1193 from ericpulvino/Sysctl_RecommendationsJafar Al-Gharaibeh2017-09-191-0/+61
|\ \ \ \ \ | |_|/ / / |/| | | | Adding Useful Sysctl Settings recommendations.
| * | | | Adding Useful Sysctl Settings recommendations.Eric Pulvino2017-09-181-0/+61
| | |/ / | |/| |
* | | | Merge pull request #1194 from dwalton76/igmp-rejoin-existing-groupJafar Al-Gharaibeh2017-09-191-9/+4
|\ \ \ \ | | | | | | | | | | pimd: Do not complain if re-joining an IGMP group
| * | | | pimd: Do not complain if re-joining an IGMP groupDaniel Walton2017-09-181-9/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> If you cut-n-paste an existing "ip igmp join 233.200.0.0 0.0.0.0" command under an interface we should not return an error.