summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lib: Use the actual string we want to limit '===' line toDonald Sharp2018-08-281-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #2918 from opensourcerouting/fix-watchfrr-sigchld-handlingDonald Sharp2018-08-281-0/+3
|\ | | | | watchfrr: fix global restart
| * watchfrr: fix global restartChristian Franke2018-08-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | watchfrr needs to handle a SIGCHLD also when it calls a global restart command. Before this patch, it would lead to the following behavior: 15:44:28: zebra state -> down : unexpected read error: Connection reset by peer 15:44:33: Forked background command [pid 6392]: /usr/sbin/frr.init watchrestart all 15:44:53: Warning: restart all child process 6392 still running after 20 seconds, sending signal 15 15:44:53: waitpid returned status for an unknown child process 6392 15:44:53: background (unknown) process 6392 terminated due to signal 15 15:45:13: Warning: restart all child process 6392 still running after 40 seconds, sending signal 9 15:45:33: Warning: restart all child process 6392 still running after 60 seconds, sending signal 9 15:45:53: Warning: restart all child process 6392 still running after 80 seconds, sending signal 9 15:46:13: Warning: restart all child process 6392 still running after 100 seconds, sending signal 9 15:46:33: Warning: restart all child process 6392 still running after 120 seconds, sending signal 9 15:46:53: Warning: restart all child process 6392 still running after 140 seconds, sending signal 9 This is obviously incorrect and can be fixed by comparing the pid to the global restart object as well. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | Merge pull request #2898 from donaldsharp/vrf_bitmap_is_whackLou Berger2018-08-261-49/+61
|\ \ | | | | | | lib: Convert vrf bit-map to a hash.
| * | lib: Convert vrf bit-map to a hash.Donald Sharp2018-08-241-49/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory sizes of the vrf bit-map was insane for a system with a moderate number of data on it: Zebra: VRF bit-map : 601 65536 39391944 Having a full 32bit integer bit space is problematically large, switch over to a hash to store bit data. We do not need to waste so much space. VRF bit-map : 13 8 312 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2920 from donaldsharp/bsd_warningsDavid Lamparter2018-08-264-1/+7
|\ \ \ | | | | | | | | Bsd warnings
| * | | zebra: No prototype and uninited variablesDonald Sharp2018-08-262-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a header to cleanup no declaration and properly wrapper some variables to appropriate #ifdef. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | lib: Cleanup uninted `top` variable in ferr.cDonald Sharp2018-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `top` variable could possibly be used without any initialization, remove the possibility. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | isisd: Include header for function declarationDonald Sharp2018-08-261-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | isis_handle_pdu is called but not declared for usage by not including the appropriate header. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2897 from donaldsharp/zebra_rnh_fixupRenato Westphal2018-08-264-10/+116
|\ \ \ | | | | | | | | zebra: When registering a nexthop, we do not always need to re-eval
| * | | staticd: refcount the nht add/removalDonald Sharp2018-08-251-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we add / remove a nexthop that we need to track, keep track of the number of times we have done this for each nexthop. Consequently keep track of the number of available nexthops, so that we can just install new routes when we get one that uses a pre-existing nexthop. Deletion of nexthops is done on refcount going to 0. Removal of routes is handled elsewhere for removal. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | zebra: When registering a nexthop, we do not always need to re-evalDonald Sharp2018-08-253-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code prior to this change, was allowing clients to register for nexthop tracking. Then zebra would look up the rnh and send to that particular client any known data. Additionally zebra was blindly re-evaluating the rnh for every registration. This leads to interesting behavior in that all people registered for that nexthop will get callbacks even if nothing changes. Modify the code to know if we have evaluated the rnh or not and if so limit the re-evaluation to when absolutely necessary This is of particular importance to do because of nht callbacks for protocols cause those protocols to do not insignificant work and as more protocols are registering for nht callbacks we will cause more work than is necessary. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #2895 from donaldsharp/netlink_encapRenato Westphal2018-08-263-5/+73
|\ \ \ \ | |_|/ / |/| | | zebra: Add support for static encap mpls labels
| * | | zebra: Add support for static encap mpls labelsStephen Worley2018-08-253-5/+73
|/ / / | | | | | | | | | | | | | | | | | | | | | We were ignoring mpls labels encapped with static routes. Added support for single and multipath labels. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #2910 from opensourcerouting/doc-summerclean-20180825Donald Sharp2018-08-2510-176/+155
|\ \ \ | | | | | | | | protocol vs. OS docs + SMUX leftovers
| * | | build: drop unused SMUX client OID MIBsDavid Lamparter2018-08-256-151/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These MIB OIDs were only used to identify clients on the SMUX protocol. And even for that, they were essentially pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | doc/user: drop SMUX reference, rework introDavid Lamparter2018-08-251-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | doc/user: add protocols vs. platform tableDavid Lamparter2018-08-254-21/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A nicely-formatted colorful table of all our daemons and target OS'. Based off & intended to replace / extend https://github.com/FRRouting/frr/wiki/Features-and-Kernel-Support Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | Merge pull request #2911 from opensourcerouting/remove-linux24-tcp-md5Donald Sharp2018-08-252-31/+1
|\ \ \ \ | | | | | | | | | | lib: remove Linux 2.4 TCP-MD5 support
| * | | | lib: remove Linux 2.4 TCP-MD5 supportDavid Lamparter2018-08-252-31/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Linux 2.6.0 was released in December of 2003... I'm pretty sure we don't need this Linux 2.4 support anymore. Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | Merge pull request #2870 from AnuradhaKaruppiah/bgp-default-delRuss White2018-08-251-4/+5
|\ \ \ \ | | | | | | | | | | bgpd: unregister VNI learning from zebra on default instance delete
| * | | | bgpd: unregister VNI learning from zebra on default instance deleteAnuradha Karuppiah2018-08-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for this was always there but was not kicking in because of an incorrect dependency on is_evpn_enabled. This API attempts to locate the default instance from bgp_master's instance list. Only the instance currently being deleted has already been removed from the instance list by the time bgp_delete->bgp_zebra_instance_deregister is executed. Symptom of this bug used to show up when a default instance is deleted and created again. In that case bgp_zebra_instance_register would not be effective as zebra ignores the register as dup (dereg didn't happen in the first place) so bgpd wouldn't reload already configured L2-VNIs. root@cel-sea-03:~# net show bgp l2vpn evpn vni |grep 1000 * 1000 L2 169.253.0.11:9 6646:1000 6646:1000 vrf1 root@cel-sea-03:~# grep "router bgp" /etc/frr/frr.conf router bgp 6646 root@cel-sea-03:~# sed -i 's/6646/6656/' /etc/frr/frr.conf root@cel-sea-03:~# grep "router bgp" /etc/frr/frr.conf router bgp 6656 root@cel-sea-03:~# systemctl reload frr root@cel-sea-03:~# net show bgp l2vpn evpn vni |grep 1000 root@cel-sea-03:~# Fix simply changes the order of dereg to make bgp_zebra_instance_deregister actually happen (by doing it before the default instance is removed from the master list). Ticket: CM-21566 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* | | | | Merge pull request #2908 from chiragshah6/ospf_vrf_devRuss White2018-08-252-10/+22
|\ \ \ \ \ | | | | | | | | | | | | ospfd: interface speed change during intf add
| * | | | | ospfd: interface speed change during intf addChirag Shah2018-08-252-10/+22
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is seen where speed mismatch caused ECMP route not being reflected with correct number paths (NHs). During cold boot, some interface speed updated by zebra as part of one shot timer and triggers interface add to clients. In this case, ospf already have created interface (bond interface), but speed was not updated, trigger to do interface speed change as part of interface add, which will trigger all Router LSA to use updated speed into cost calculation. Ticket:CM-22170 Testing Done: Bring up CLOS config with Spine and leafs. Leaf have CLAG pair, with same VRR ip address. At spine one of the bond connecting to leaf node was having higher speed than the paired device, With this fix, at spine (DUT) bond interface speed is equal from all peer nodes. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | | | | Merge pull request #2685 from ↵Quentin Young2018-08-252-2/+136
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | netravnen/feature/bgpd/documen-use-of-additional-bgp-well-known-communities Document bgp well-known communities in PR2684
| * | | | bgp: Add documentation for IANA well-known communitiesChristoffer2018-08-241-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coded as part of #2684 and most code written while participating at BornHack@2018. bgp_route.c: Changes regarding adding explanations for the IANA well-known communities added in #2684 Signed-off-by: Christoffer <netravnen@gmail.com>
| * | | | doc: Add documentation for IANA well-known communitiesChristoffer2018-08-241-0/+74
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coded as part of #2684 and most code written while participating at BornHack@2018. bgp.rst: Explain what the communities does and a summarized edition of the communities purpose. Signed-off-by: Christoffer <netravnen@gmail.com>
* | | | Merge pull request #2891 from opensourcerouting/logging-docsQuentin Young2018-08-243-0/+133
|\ \ \ \ | | | | | | | | | | doc/developer: logging guide
| * | | | doc/developer: logging guideDavid Lamparter2018-08-223-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This roughly outlines when to use which logging function. It's certainly something to have to point people to, so they get things nice and right - and so we get at least somewhat consistent behaviour for the user. Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | | Merge pull request #2907 from donaldsharp/fix_confdateDavid Lamparter2018-08-242-2/+2
|\ \ \ \ \ | |_|/ / / |/| | | | bgpd: Fix CONFDATE to 2019 for a couple of items.
| * | | | bgpd: Fix CONFDATE to 2019 for a couple of items.Donald Sharp2018-08-242-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While perusing CONFDATE I noticed that we had a couple CONFDATE 201805, which we were not picking up( for other reasons and fixed in a different PR ). But upon investigation of these I noticed that the commits where in 201805, so these CONFDATES should be in 2019 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #2901 from donaldsharp/remove_zapi_deprecatedDavid Lamparter2018-08-247-1153/+8
|\ \ \ \ | | | | | | | | | | Remove zapi deprecated
| * | | | doc, lib, zebra: Remove deprecated encode and decode functionalityDonald Sharp2018-08-245-940/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ZEBRA_IPV4_ROUTE_[ADD|DELETE] and ZEBRA_IPV6_ROUTE_[ADD|DELETE] functionality has been deprecated for a year now, let's remove this code from the system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | zebra: Remove unmaintained and uncompilable codeDonald Sharp2018-08-242-213/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zebra/client_main.c code is not being maintained or used. Remove from system. Especially since the encode/decode zapi functionality it `purports` to be testing is deprecated and now being removed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | Merge pull request #2804 from kssoman/bgp_fixDonald Sharp2018-08-243-35/+59
|\ \ \ \ | | | | | | | | | | When redistribute options are changed, call bgp_redistribute_unreg()
| * | | | bgpd : Change of options in redistribute command does not get appliedkssoman2018-08-223-35/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added parameter in bgp_redistribute_set() to indicate change in redistribute option * If there is change, call bgp_redistribute_unreg() to withdraw routes Signed-off-by: kssoman <somanks@vmware.com>
* | | | | Merge pull request #2896 from dslicenc/zebra_select_vrfDavid Lamparter2018-08-246-15/+34
|\ \ \ \ \ | | | | | | | | | | | | zebra: if multiple connecteds, select loopback or vrf if present
| * | | | | zebra: if multiple connecteds, select loopback or vrf if presentDon Slice2018-08-236-15/+34
|/ / / / / | | | | | | | | | | | | | | | Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* | | | | Merge pull request #2893 from qlyoung/fix-rpki-exit-failureDavid Lamparter2018-08-232-20/+19
|\ \ \ \ \ | | | | | | | | | | | | bgpd: fix rpki exit command
| * | | | | bgpd: fix rpki exit commandQuentin Young2018-08-232-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a command returns a nonzero exit status and VTYSH has a corresponding command, VTYSH will skip executing its own version. If this happens in a command that changes CLI nodes we get node desynchronization. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | | | Merge pull request #2854 from chiragshah6/evpn_dev1David Lamparter2018-08-231-25/+53
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | zebra: Evpn mark router flag as part of neighbor update from kernel (Merge in proxy reliant on @srimohans' review.)
| * | | | | | zebra: mark router flag for remote neigh updateChirag Shah2018-08-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle Remote Neigh entry state change from Router to Host. Remote MAC-IP update may not continue EVPN NA Extended community, Zebra need to accomodate if router_flag change for existing neigh and install with or without Router Flag (R-bit). Testing: Have locally run MAC/IP (neigh entry) with R-bit set, Checke on remote VTEP 'show bgp evpn route ...mac ip' and 'show evpn arp-cache ...' contians router flag. Change host to remove R-bit, which locally learnt entry removes Router flag. This results in remote vtep to remove R-bit from neigh entry. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
| * | | | | | zebra: check router_flag change for neigh updateChirag Shah2018-08-231-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neigh update can have router_flag change, from unset to set and viceversa. This is the case where MAC, IP and VLAN are same but entry's flag moved from R to not R bit and reverse case. Router flag change needs to trigger bgpd to inform all evpn peers to remove from the evpn route. Testing Done: Send GARP with and without R bit from host and validate neigh entry and evpn neigh and mac-ip route entry in zebra and bgpd. Check Peer VTEP evpn route entry where router flag is (un)set. With R-bit Route [2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] VNI 1001 Imported from 27.0.0.16:5:[2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] 4435 5551 27.0.0.16 from MSP1(uplink-1) (27.0.0.9) Origin IGP, valid, external, bestpath-from-AS 4435, best Extended Community: RT:5551:1001 ET:8 ND:Router Flag AddPath ID: RX 0, TX 1261 Last update: Wed Aug 15 20:52:14 2018 Without R-bit Route [2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] VNI 1001 Imported from 27.0.0.16:5:[2]:[0]:[0]:[48]:[00:1f:2f:db:45:a6]:[128]:[2006:33:33:2::10] 4435 5551 27.0.0.16 from MSP2(uplink-2) (27.0.0.10) Origin IGP, valid, external, bestpath-from-AS 4435, best Extended Community: RT:5551:1001 ET:8 AddPath ID: RX 0, TX 1263 Last update: Wed Aug 15 20:53:10 2018 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
| * | | | | | zebra: mark router flag for neigh updateChirag Shah2018-08-221-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The neigh update can come prior to mac add update. In this case, the mac will be auto created for the vni. set router flag to local neigh update for mac with auto flag. The neigh update will be informed to bgpd once local mac is learnt. Unset router flag if the neigh update comes without the router flag for an existing neigh entry. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | | | | | | Merge pull request #2894 from donaldsharp/thread_stuffDavid Lamparter2018-08-231-22/+23
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Thread stuff
| * | | | | | | lib: Limit depth of unused thread listDonald Sharp2018-08-231-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The master->unused list was unbounded during normal operation. A full BGP feed on my machine left 11k threads on the unused list, taking up over 2mb of data. This seemed a bit excessive, reduce to a limit of 10. Also fix a crash that this exposed where we assumed that a thread structure was not deleted. Future committers can make this configurable? or modify the value to something better for their system. I am dubious of the value of this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | | | | lib: Seperate out Poll data from thread memory statisticsDonald Sharp2018-08-231-14/+7
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were storing Poll data for the read and write memory information in MTYPE_THREAD, so a show run would not be able to show actual amount of memory associated with the `struct thread`. Remove unnecessary NULL checks on malloc. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | | | | | Merge pull request #2855 from donaldsharp/bgp_toughDavid Lamparter2018-08-239-1591/+25
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Various Cleanups
| * | | | | | | lib: Convert debug to error situationDonald Sharp2018-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This debug should be moved to an error situation since it's a developmental escape that needs to be fixed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | | | | lib: Remove default case statement from a enum driven switchDonald Sharp2018-08-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are using a enum to drive a switch statement and we have a default case statement that can never be entered because we know all the enum states have been covered. Remove it from the code as that it cannot happen. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>