summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* *: spelchekDavid Lamparter2018-10-2544-73/+73
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #3121 from pguibert6WIND/flowspec_json_issueDonald Sharp2018-10-251-9/+26
|\ | | | | bgpd: fill in prefix for flowspec entry when json format is requested
| * bgpd: fill in prefix for flowspec entry when json format is requestedPhilippe Guibert2018-10-231-9/+26
| | | | | | | | | | | | | | | | as prefix is opaque for flowspec, and json needs to have a non empty full of meaning value in prefix, the proposal is to encode the displayable form of flowspec entry. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | Merge pull request #3234 from donaldsharp/bsd_install_failureRenato Westphal2018-10-241-4/+7
|\ \ | | | | | | zebra: Notice when a route fails to install on *bsd
| * | zebra: Notice when a route fails to install on *bsdDonald Sharp2018-10-241-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | When we fail to install a route into bsd, note the case where we have no viable nexthops installed for it, so that we can know in zebra if the route is good or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #3229 from opensourcerouting/bugfix/fabricd-distributionDonald Sharp2018-10-247-3/+8
|\ \ \ | |/ / |/| | Add fabricd to distribution scripts
| * | debianpkg, tools: Add fabricd to distribution scriptsChristian Franke2018-10-247-3/+8
| | | | | | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | | Merge pull request #3225 from donaldsharp/revert_default_originate_changesDavid Lamparter2018-10-242-37/+27
|\ \ \ | | | | | | | | bgp: Revert default originate changes to allow set
| * | | Revert "bgpd: Set attributes according route-maps if applied for ↵Donald Sharp2018-10-231-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | default-originate" This reverts commit 74401e62721b8f83ff0e34127d6235fda112c7c8.
| * | | Revert "bgpd: Make sure default-originate works without route-map as well"Donald Sharp2018-10-231-19/+5
| | | | | | | | | | | | | | | | This reverts commit c2e10422033771da9f12a4a283b0bc767240a3d8.
| * | | bgpd: When displaying default originate debugs don't print gibberishDonald Sharp2018-10-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The tx_id_buf was not being set to anything in some cases, make sure it's a null string before using. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #3230 from ↵Donald Sharp2018-10-246-58/+76
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | opensourcerouting/feature/isis-improve-lsp-scheduling Feature: IS-IS improve lsp scheduling
| * | | isisd: delay lsp regeneration while events are still coming inChristian Franke2018-10-243-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is a stream of events coming in, where IS-IS learns about a lot of updates, IS-IS would regenerate its LSPs before the updates have been processed completely. This causes suboptimal convergence because the intermediate state will be flooded. Only after the configured `lsp_gen_interval`, a new update with the correct and final state will be generated. Resolve this by holding off LSP generation while there are still events coming in. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | | isisd: Combine lsp_l1/l2_refreshChristian Franke2018-10-243-49/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lsp_l1_refresh and lsp_l2_refresh are identical apart from the hardcoded IS-IS level they are referring to. So merge them and pass the level as part of the argument. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | | isisd: Log LSP-update trigger sourceChristian Franke2018-10-242-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For debugging the timing of LSP generation, it is useful to know which event caused a regeneration to be scheduled. Therefore, add this information to the debug log. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | | isisd: Log SPF trigger source when debuggingChristian Franke2018-10-242-5/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | For debugging the scheduling of SPF, it is useful to see from where an SPF run is scheduled. So add this information to the log. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | | Merge pull request #3222 from srimohans/communityDavid Lamparter2018-10-237-41/+37
|\ \ \ | |/ / |/| | bgpd:Fixing the signature of community_free function
| * | Merge branch 'master' of https://github.com/FRRouting/frr into communitySri Mohana Singamsetty2018-10-2366-297/+376
| |\ \ | |/ / |/| |
* | | Merge pull request #3204 from ton31337/fix/make_vrf_import_default_selectableDavid Lamparter2018-10-231-7/+6
|\ \ \ | |_|/ |/| | bgpd: Select default routing table when importing VRF routes into global
| * | bgpd: Select default routing table when importing VRF routes into globalDonatas Abraitis2018-10-231-7/+6
| | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | Merge pull request #3175 from donaldsharp/show_run_staticDavid Lamparter2018-10-231-6/+10
|\ \ \ | | | | | | | | vtysh: Add some missing daemons to some commands in vtysh
| * | | vtysh: Add some missing daemons to some commands in vtyshDonald Sharp2018-10-151-6/+10
| | | | | | | | | | | | | | | | | | | | Fixes: #3173 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge branch 'pull/3165'David Lamparter2018-10-231-2/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | ...with an additional comment. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | zebra: add comment about Linux ifdown handlingDavid Lamparter2018-10-231-0/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | zebra: remove kernel routes that are suppressedPhilippe Guibert2018-10-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on some cases, kernel routes are not selected, because the kernel suppressed it without informing the netlink layer that the route has been suppressed ( for instance, when an interface goes down, the route never goes back when interface goes up again). This commit intends to suppress that entry from zebra. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | | | Merge branch 'pull/3197'David Lamparter2018-10-2355-245/+269
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...with a nit fix Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | | ripd: fix list compare orderDavid Lamparter2018-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in review comment by @rwestphal Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | | *: Replace hash_cmp function return value to a boolDonald Sharp2018-10-1952-240/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ->hash_cmp and linked list ->cmp functions were sometimes being used interchangeably and this really is not a good thing. So let's modify the hash_cmp function pointer to return a boolean and convert everything to use the new syntax. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | | *: Fixup to use proper list_cmp functionsDonald Sharp2018-10-194-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had a variety of issues with sorted list compare functions. This commit identifies and fixes these issues. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | | | Merge pull request #3209 from opensourcerouting/cli-fuzzer-fixesQuentin Young2018-10-2212-37/+79
|\ \ \ \ \ \ | | | | | | | | | | | | | | CLI fuzzer fixes
| * | | | | | ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" commandRenato Westphal2018-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a missing check to bail out earlier when SR is not configured. The same command without the "no" prefix has the same check as it prevents unexpected things (i.e. crashes) from happening. Fixes the following segfaults: ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32" ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 65535 no-php-flag" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | ospf6d: fix two "show" commandsRenato Westphal2018-10-201-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept the "match" keyword when a prefix is not given, otherwise ospf6d will crash. Fixes the following crashes: ospf6d aborted: vtysh -c "show ipv6 ospf6 interface eth99 prefix match" ospf6d aborted: vtysh -c "show ipv6 ospf6 interface prefix match" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | lib: fix the "no match ipv6 next-hop type" commandRenato Westphal2018-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial NULL pointer dereference bug. Fixes the following crash: bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no match ipv6 next-hop type" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: use the vrf_bitmap_*() helper functions when necessaryRenato Westphal2018-10-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zclient->redist[afi][type] is a hash table and not an integer since a while ago when VRF support was introduced. As such, zclient->redist[][] should never be manipulated directly, the vrf_bitmap_*() helper functions should be used instead. This fixes a few crashes found by the CLI fuzzer. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: fix bug while iterating over VPN tableRenato Westphal2018-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The routing table data structure can create intermediate route nodes during its normal operation, so we always need to check if the 'info' pointer of a route node is NULL or not before dereferencing it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: remove wrong assertRenato Westphal2018-10-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vnc_direct_del_rn_group_rd() function can be called with the 'afi' parameter set to AFI_L2VPN on some specific cases. Remove the assert to fix the crash. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: fix NULL pointer dereference bugRenato Westphal2018-10-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other parts of the rfapi code check if the 'rfg->rfapi_import_table' pointer is NULL or not before using it. Do the same here to fix a crash detected by the CLI fuzzer. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: add a NULL check to prevent a crash in the rfapi codeRenato Westphal2018-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rfapiDeleteRemotePrefixesIt() function checks on several places if 'p' is NULL or not. Introduce an additional NULL check to prevent a crash from happening. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: fix crashes caused by missing input validationRenato Westphal2018-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rfapi code wasn't checking if strtoul() succeeded or not when parsing the list of labels. Fix the affected commands by not allowing the user to enter a non-numeric input. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: fix some NULL pointer dereference bugsRenato Westphal2018-10-201-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other parts of the rfapi code also check if these pointers are NULL or not before using them. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: fix the "no neighbor A.B.C.D maximum-prefix" commandRenato Westphal2018-10-201-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The peer->group pointer is set only if the PEER_STATUS_GROUP flag is set in the peer. Add a protection to prevent a NULL pointer dereference. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: handle NULL pointers in lcommunity_cmp()Renato Westphal2018-10-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like community_cmp() and ecommunity_cmp(), the lcommunity_cmp() function also needs to handle NULL pointers for correct operation. Without this fix, bgpd can crash when entering the following commands: vtysh -c "configure terminal" -c "ip large-community-list standard WORD deny" vtysh -c "configure terminal" -c "no ip large-community-list expanded WORD" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bgpd: fix cleanup of dampening configurationRenato Westphal2018-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bgp_damp_config_clean() function was deallocating some arrays without resetting the variables that represent their sizes. This was leading to some crashes because other parts of the code iterate over these arrays by looking at their corresponding sizes, which could be invalid. Fixes the following segfaults (which only happen under certain circumstances): vtysh -c "configure terminal" -c "router bgp 1" -c "bgp dampening" vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening" vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening 45" vtysh -c "" -c "clear ip bgp dampening" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | | | | bfdd: do not allow multihop peers without a local-addressRenato Westphal2018-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BFD code assumes that multihop peers have a local address configured. When that doesn't happen, the BFD client daemons fail to decode some BFD ZAPI messages and abort. To fix this, do not accept the configuration of multhop peers unless a local-address is configured. Fixes the following segfaults: - bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop" - bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME" - bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop" - ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop" - ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME" - ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | | | | * bgpd:Fixing the signature of community_free functionSri Mohana Singamsetty2018-10-237-41/+37
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | community_free, lcommunity_free and ecommunity_free are similar type of functions. Most of the places, these three are called together. The signature of community_free is different from other two functions. Modified the community_free API signature to align with other two functions to avoid any confusion. There is no functionality impact with this and this is just to avoid any confusion. Testing: manual testing and show commands Signed-off-by: Sri Mohana Singamsetty msingamsetty@vmware.com
* | | | | | Merge pull request #3214 from donaldsharp/ospf_crashLou Berger2018-10-201-3/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | ospfd: Do not allow thread drop
| * | | | | ospfd: Do not allow thread dropDonald Sharp2018-10-201-3/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ospf->oi_write_q is not empty that means that ospf could already have a thread scheduled for running. Just dropping the pointer before resheduling does not stop the one currently scheduled for running from running. The calling of thread_add_write checks to see if we are already running and does the right thing here so it is sufficient to just call thread_add_write. This issue was tracked down from this stack trace: Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [EC 134217739] interface eth2.1032:172.16.4.110: ospf_check_md5 bad sequence 5333618 (expect 5333649) Oct 19 18:04:00 VYOS-R1 ospfd[1811]: message repeated 3 times: [ [EC 134217739] interface eth2.1032:172.16.4.110: ospf_check_md5 bad sequence 5333618 (expect 5333649)] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Assertion `node’ failed in file ospfd/ospf_packet.c, line 666, function ospf_write Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Backtrace for 8 stack frames: Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 0] /usr/lib/libfrr.so.0(zlog_backtrace+0x3a) [0x7fef3efe9f8a] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 1] /usr/lib/libfrr.so.0(_zlog_assert_failed+0x61) [0x7fef3efea501] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 2] /usr/lib/frr/ospfd(+0x2f15e) [0x562e0c91815e] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 3] /usr/lib/libfrr.so.0(thread_call+0x60) [0x7fef3f00d430] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 4] /usr/lib/libfrr.so.0(frr_run+0xd8) [0x7fef3efe7938] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 5] /usr/lib/frr/ospfd(main+0x153) [0x562e0c901753] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fef3d83db45] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 7] /usr/lib/frr/ospfd(+0x190be) [0x562e0c9020be] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Current thread function ospf_write, scheduled from file ospfd/ospf_packet.c, line 881 Oct 19 18:04:00 VYOS-R1 zebra[1771]: [EC 4043309116] Client ‘ospf’ encountered an error and is shutting down. Oct 19 18:04:00 VYOS-R1 zebra[1771]: client 41 disconnected. 0 ospf routes removed from the rib We had an assert(node) in ospf_write, which means that the list was empty. So I just searched until I saw a code path that allowed multiple writes to the ospf_write function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | | Merge pull request #3212 from donaldsharp/rmap_crashRenato Westphal2018-10-201-35/+35
|\ \ \ \ \ | |/ / / / |/| | | | Rmap crash
| * | | | bgpd: Dissallow v6 routes from setting a v4 nexthopDonald Sharp2018-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not allow a v6 route to set a v4 nexthop via a routemap. As that this will crash bgp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | bgpd: Prep commit to cleanup indentationDonald Sharp2018-10-201-35/+32
|/ / / / | | | | | | | | | | | | Signed-off-by: Donald Sharp <sahrpd@cumulusnetworks.com>