summaryrefslogtreecommitdiffstats
path: root/bgpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bgpd: fix RD stomping by update group code (Issue #71)Lou Berger2017-01-171-19/+34
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* bgpd: partial revert of vpn/encap safi show changes (Issue #14)Lou Berger2017-01-171-69/+105
| | | | | | | | To remove commands duplicated in bgp_mplsvpn/_encap Also until vpn/encap specific show pieces are merged into generic afi/safi show. Signed-off-by: Lou Berger <lberger@labn.net>
* Merge pull request #78 from pguibert6WIND/fix_str2prefix_rd_as4Donald Sharp2017-01-171-3/+15
|\ | | | | bgpd: str2prefix_rd support for AS4 format
| * bgpd: avoid recalculating as_val value in str2prefix_rdPhilippe Guibert2017-01-171-2/+2
| | | | | | | | | | | | | | This is an optimisation that consists in avoiding calling twice atol() function when converting an ext. community to an AS4 byte or a standard AS byte value. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| * bgpd: str2prefix_rd support for AS4 formatPhilippe Guibert2017-01-171-3/+15
| | | | | | | | | | | | | | This commit improves the ability for str2prefix_rd command to support AS4 format. Until now, only AS2 format and IP format was supported. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | bgpd: fix nexthop comparison for nexthop vpnv6 attributePhilippe Guibert2017-01-172-1/+2
|/ | | | | | | | | As nexthop attribute for vpnv6 also contains a blank RD and a blank tag, the IPv6 address length increases from 16 to 24 bytes. The same was observed for vpnv4 nexthop, but was missing for VPNv6. The same is done for martian nexthop debugging. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* bgpd: convert 'show_ip_bgp_vpnv4' to afi/safi form (Issue #61)Lou Berger2017-01-122-79/+84
|
* bgpd: remove code contained by ifdef KEEP_OLD_VPNV4_COMMANDSLou Berger2017-01-123-826/+0
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* bgpd: conditionally compile out old vpnv4 syntax (Issue #61)Lou Berger2017-01-114-20/+90
| | | | | | (under ifdef KEEP_OLD_VPNV4_COMMANDS) Signed-off-by: Lou Berger <lberger@labn.net>
* bgpd: restore wildcard handling in show summary (Issue#14)Lou Berger2017-01-112-21/+113
| | | | | | Includes more branch specific afi/safi changes Signed-off-by: Lou Berger <lberger@labn.net>
* bgpd: restore some missing afi/safi commands (Issue #14)Lou Berger2017-01-113-742/+523
| | | | | | | | | Added defines and parse utility functions Fix vty code that treated vpn&encap as AFIs and some other related vty printing/handline issues Note: Includes branch specific changes (due to new parser) Signed-off-by: Lou Berger <lberger@labn.net>
* bgpd: Allow 'neighbor X local-as Y' to have large valuesDonald Sharp2017-01-061-4/+9
| | | | | | | | On ARM platforms specifying a local-as greater than 2 billion causes issues due to atoi usage. Ticket: CM-14019 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #37 from LabNConsulting/working/2.0/patch-set-170102aDavid Lamparter2017-01-0315-334/+540
|\ | | | | Working/2.0/patch set 170102a
| * bgpd: fix ecommunity hash related leakLou Berger2017-01-021-0/+8
| | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
| * bgp: Use intern/unintern for encap to fix valgrind identified memory leakLou Berger2017-01-025-48/+183
| | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
| * rfapi: pickup recent changesLou Berger2017-01-028-44/+127
| | | | | | | | | | | | | | | | | | expose bgp_rfapi_get_group_by_lni_label for use by rfp add EVPN Ethernet Tag (VID) RT ensure as is init'ed fix spelling of information Signed-off-by: Lou Berger <lberger@labn.net>
| * bgp: first pass at restoring missing vpn&encap show commands (issue#14)Lou Berger2017-01-023-238/+218
| | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
| * bgpd: fix unitialized value check id'ed by valgrindLou Berger2017-01-021-4/+4
| | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
* | Merge pull request #28 from opensourcerouting/dev/osr/rename-part1Donald Sharp2017-01-035-52/+50
|\ \ | |/ |/| rename, part1
| * build: rename (2 of ?): route_types macrosDavid Lamparter2016-12-201-40/+40
| | | | | | | | | | | | | | All of the autogenerated macros in lib/route_types.pl are now called FRR_* instead of QUAGGA_*. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * build: rename (1 of ?): configure.ac + preprocDavid Lamparter2016-12-202-8/+8
| | | | | | | | | | | | | | This replaces Quagga -> FRR in most configure.ac settings as well as a handful of preprocessor macros in the source code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * build: remove $Format tagsDavid Lamparter2016-12-202-4/+2
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd: Fix 'show ip bgp summary' variable output being wrongDonald Sharp2016-12-161-0/+4
| | | | | | | | | | | | | | | | The first time through calling 'show ip bgp summary' we were always calculating the variable hostname field size incorrectly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | bgpd: Cleanup double read of free'd dataDonald Sharp2016-12-161-2/+3
|/ | | | | | | Valgrind found this issue. This cleans it up from happening. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgp: Modify output to be a bit clearerDonald Sharp2016-12-143-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the 'show ip bgp ...' output to be a bit clearer on what work it did. Modify: root@dell-s6000-02 ~/quagga# vtysh -c "show ip bgp" BGP table version is 7, local router ID is 6.0.0.9 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 6.0.0.5/32 169.254.0.1 0 0 65101 ? *> 6.0.0.6/32 169.254.0.17 0 0 65101 ? *> 6.0.0.7/32 169.254.0.33 0 0 65104 ? *> 6.0.0.8/32 169.254.0.49 0 0 65104 ? *> 6.0.0.9/32 0.0.0.0 0 32768 ? *= 6.0.0.10/32 169.254.0.49 0 65104 65200 ? *= 169.254.0.33 0 65104 65200 ? *= 169.254.0.17 0 65101 65200 ? *> 169.254.0.1 0 65101 65200 ? Displayed 6 out of 9 total prefixes To ..... Displayed 6 routes and 9 total paths Issue #11 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bgpd/rfp: ignore rfptest binaryChristian Franke2016-12-081-0/+1
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* bgpd vnc: Add 'debug bgp vnc verbose' targetLou Berger2016-12-0816-551/+578
| | | | | | all vnc debug logging is now covered by a 'debug bgp vnc' target Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: always set SO_SNDBUF and SO_RCVBUF using a best effort approachRenato Westphal2016-12-081-24/+2
| | | | | | | | | | | If we fail to set any socket's buffer size, try again with a smaller value and keep going until it succeeds. This is better than just giving up or, even worse, abort the creation of a socket (ospf6d and ripd). Fix broken ospf6d on FreeBSD. Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge branch '-renato' into stable/2.0David Lamparter2016-12-059-162/+114
|\ | | | | | | | | | | | | This contains bgp memory leak fixes as well as cleanups to VRF/namespace handling and has been run through extended testing in Cumulus' testbed: Tested-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * bgpd: fix invalid memory access in peer_free()Renato Westphal2016-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We shoult not call bgp_unlock() before calling bgp_delete_connected_nexthop() in the peer_free() function. Otherwise, if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes an invalid pointer in the bgp_delete_connected_nexthop() function. To fix this, move the call to bgp_unlock() to the end of peer_free(). Bug exposed by commit 37d361e ("bgpd: plug several memleaks"). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * zebra/lib: remove redundant fields from zebra_vrfRenato Westphal2016-11-281-21/+11
| | | | | | | | | | | | | | | | | | | | | | There's no need to duplicate the 'vrf_id' and 'name' fields from the 'vrf' structure into the 'zebra_vrf' structure. Instead of that, add a back pointer in 'zebra_vrf' that should point to the associated 'vrf' structure. Additionally, modify the vrf callbacks to pass the whole vrf structure as a parameter. This allow us to make further simplifications in the code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * *: rename two vrf functionsRenato Westphal2016-11-283-4/+4
| | | | | | | | | | | | | | | | | | | | Since VRFs can be searched by vrf_id or name, make this explicit in the helper functions. s/vrf_lookup/vrf_lookup_by_id/ s/zebra_vrf_lookup/zebra_vrf_lookup_by_id/ Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * bgpd: release all memory explicitly on exitRenato Westphal2016-11-283-49/+51
| |
| * bgpd: plug several memleaksRenato Westphal2016-11-283-9/+20
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * bgpd: reuse sockunion2hostprefix() on bgp_nht.cRenato Westphal2016-11-281-45/+9
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * bgpd: optimize copy of strings on peer_xfer_conn()Renato Westphal2016-11-281-4/+2
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * bgpd: use loops to reduce code duplicationRenato Westphal2016-11-281-32/+19
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | bgpd: Remove nexthop for peer only for "real" peervivek2016-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During connection establishment, there is a separate peer structure created for the doppelganger (for incoming connection). When this is deleted after the connection has established, take care to ensure that the nexthop entry for the peer is not deleted. Fixes: f9164b1d74f6a20d69d7ef10d2e39b4ae7996cbf Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-13875 Reviewed By: None Testing Done: Manual (cherry picked from commit 4f2bc892cbddbf36bd5e1b2f36c33260af614b33) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd: Fix 'show ip bgp' to not change it's outputDonald Sharp2016-12-051-1/+1
| | | | | | | | | | | | | | | | | | For unicast routes do not change the output of the 'show ip bgp' command. This will allow people with existing scripts to continue to work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd: Fix route node unlock when clearing adj-outvivek2016-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When clearing the adj-out for a subgroup (e.g., upon peer going down), ensure that the adj-out is removed before unlocking the route node that it points to, otherwise, there is a possibility that the route node may be prematurely freed. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-13690 Reviewed By: None Testing Done: bgp-smoke, resilient-hash tests (cherry picked from commit c3d7d35f3b7152c9e50e52c3cfd60b0dc52df703) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd: fix invalid memory access in peer_free()Renato Westphal2016-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We shoult not call bgp_unlock() before calling bgp_delete_connected_nexthop() in the peer_free() function. Otherwise, if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes an invalid pointer in the bgp_delete_connected_nexthop() function. To fix this, move the call to bgp_unlock() to the end of peer_free(). Bug exposed by commit 37d361e ("bgpd: plug several memleaks"). Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd: Fix crashes when no default bgp instance is configured.Donald Sharp2016-12-012-3/+17
| | | | | | | | | | | | | | | | | | | | The vnc code assumes that bgp must have a default instance. This code change checks to make sure that we do before proceeding. It makes no assurances that vnc will behave correctly without a default instance. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd: fix "show ip bgp" column alignmentDaniel Walton2016-11-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Weight" column is off: BGP table version is 0, local router ID is 10.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 4.1.1.2/32 9.9.9.2 0 32768 ? *> 4.1.1.4/32 9.9.9.2 0 32768 ? Displayed 2 out of 2 total prefixes Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit 65c7395b07e8c592c847d4a1e22fc89ddf448341) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge remote-tracking branch 'cmaster-next' into cmaster-next-relengDavid Lamparter2016-11-191-13/+11
|\|
| * bgpd: 'show ip bgp neighbor json' some keys are in the wrong placeDaniel Walton2016-11-161-10/+10
| | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Sam Tannous <stannous@cumulusnetworks.com> Ticket: CM-13511
| * bgpd: 'show ip bgp neighbor json' some keys are in the wrong placeDaniel Walton2016-11-161-13/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-13511 connectionsEstablished, etc are no longer under the addressFamilyInfo keyword, they are now at the top level
* | lib: replace strlcpy & strlcat with glibc versionsDavid Lamparter2016-11-157-7/+0
| | | | | | | | | | | | | | | | It seems these two were at some point copied in from rsync; replace with more recent versions that will hopefully become available in glibc as well. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | build: massively remove needless checksDavid Lamparter2016-11-152-10/+2
| | | | | | | | | | | | | | | | | | | | Since we have autoconf results from a wide swath of target platforms, we can go remove checks that have the same result on all systems. This also removes several "fallback" implementations of functions that, at some point in the history, weren't available on all target platforms. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | bgpd/rfapi: Fix missing files in distribution ("make dist") packageMartin Winter2016-11-151-0/+2
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | build: fix -Wmaybe-uninitialized warningsDavid Lamparter2016-11-151-0/+2
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>