summaryrefslogtreecommitdiffstats
path: root/sharpd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sharpd: Start infrastructure to allow for redistribution testingDonald Sharp2019-10-021-19/+55
| | | | | | | | | | | Start the work in sharpd to allow the testing of redistribution of routes. Namely telling zebra to tell us about redistribution events via the callback. Future work here will allow sharpd to specify the redistribution events it wants and to allow us to track that via counters. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #5009 from donaldsharp/interface_deletionRuss White2019-09-301-46/+7
|\ | | | | lib, zebra: Allow for interface deletion when kernel event happens
| * *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-191-21/+1
| | | | | | | | | | | | | | Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * *: Convert interface_down to interface down callbackDonald Sharp2019-09-191-10/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * *: Convert from ->interface_up to the interface callbackDonald Sharp2019-09-191-21/+1
| | | | | | | | | | | | | | For all the places we have a zclient->interface_up convert them to use the interface ifp_up callback instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * *: Switch all zclient->interface_add to interface create callbackDonald Sharp2019-09-191-14/+1
| | | | | | | | | | | | | | Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * *: Add infrastructure to support zapi interface callbacksDonald Sharp2019-09-191-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start the conversion to allow zapi interface callbacks to be controlled like vrf creation/destruction/change callbacks. This will allow us to consolidate control into the interface.c instead of having each daemon read the stream and react accordingly. This will hopefully reduce a bunch of cut-n-paste stuff Create 4 new callback functions that will be controlled by lib/if.c create -> A upper level protocol receives an interface creation event The ifp is brand spanking newly created in the system. up -> A upper level protocol receives a interface up event This means the interface is up and ready to go. down -> A upper level protocol receives a interface down destroy -> A upper level protocol receives a destroy event This means to delete the pointers associated with it. At this point this is just boilerplate setup for future commits. There is no new functionality. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | *: fix missing VRF autocompletionsIgor Ryzhov2019-09-241-21/+21
|/ | | | | | | | | | | | Current autocompletion works only for simple "vrf NAME" case. This commit expands it also for the following cases: - "nexthop-vrf NAME" in staticd - usage of $varname in many daemons All daemons are updated to use single varname "$vrf_name". Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* pbrd, sharpd, staticd: Add some color to sample configuration filesDonald Sharp2019-08-191-0/+3
| | | | | | | | The sample configuration files for pbrd, sharpd and staticd where all the same. Add some bit of color to help new people get rolling on these three daemons. Signed-off-by: Donald Sharp <sharpd@cumulusnetwork.com>
* sharpd: Fix repeat sub-command to workDonald Sharp2019-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The repeat sub-command was not properly repeating. It was starting the removal during the install: 2019/08/03 00:10:14.351 SHARP: Inserting 300000 routes 2019/08/03 00:13:01.556 SHARP: Installed All Items 167.204747 2019/08/03 00:13:01.556 SHARP: Removing 300000 routes 2019/08/03 00:13:03.126 SHARP: Inserting 300000 routes 2019/08/03 00:14:34.794 SHARP: Removed all Items 91.668040 2019/08/03 00:16:11.743 SHARP: Installed All Items 188.616462 2019/08/03 00:16:11.743 SHARP: Removing 300000 routes 2019/08/03 00:16:14.256 SHARP: Inserting 300000 routes This command allows the remove to wait till the install is fully finished and vice versa: 2019/08/03 00:22:54 SHARP: Inserting 10000 routes 2019/08/03 00:22:55 SHARP: Installed All Items 0.572028 2019/08/03 00:22:55 SHARP: Removing 10000 routes 2019/08/03 00:22:55 SHARP: Removed all Items 0.568284 2019/08/03 00:22:55 SHARP: Inserting 10000 routes 2019/08/03 00:22:56 SHARP: Installed All Items 0.567687 2019/08/03 00:22:56 SHARP: Removing 10000 routes 2019/08/03 00:22:56 SHARP: Removed all Items 0.551011 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Update 'sharp watch import` to allow prefixDonald Sharp2019-07-311-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of defaulting the import-check to a /32 allow the tester to specify any prefix that they want when doing an import-check. Test: donna.cumulusnetworks.com# sharp watch import A.B.C.D/M The v4 prefix for import check to watch X:X::X:X/M The v6 prefix to signal for watching donna.cumulusnetworks.com# sharp watch import 4.5.6.0/24 donna.cumulusnetworks.com# show ip import-check 4.5.6.0 resolved via kernel via 10.50.11.1, enp0s3 Client list: sharp(fd 21) donna.cumulusnetworks.com# sharp watch import 4:5:6::0/64 donna.cumulusnetworks.com# show ipv6 import-check 4:5:6:: resolved via kernel fe80::cad7:19ff:fe0a:fdfd, via enp0s3 fe80::ce37:abff:fe4f:a601, via enp0s3 Client list: sharp(fd 21) donna.cumulusnetworks.com# sharp watch nexthop A.B.C.D The v4 address to signal for watching X:X::X:X The v6 nexthop to signal for watching donna.cumulusnetworks.com# sharp watch nexthop 4.5.6.7 donna.cumulusnetworks.com# sharp watch nexthop 4:5::6:7 donna.cumulusnetworks.com# show ip nht 4.5.6.7 unresolved Client list: sharp(fd 21) donna.cumulusnetworks.com# show ipv6 nht 4:5::6:7 unresolved Client list: sharp(fd 21) Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Revert "Ospf missing interface handling 2"Donald Sharp2019-06-241-4/+3
|
* *: change if_lookup_by_name() api with vrfPhilippe Guibert2019-06-121-3/+4
| | | | | | | | | | the vrf_id parameter is replaced by struct vrf * parameter. this impacts most of the daemons that look for an interface based on the name and the vrf identifier. Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was ignored until now. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* *: fix some dumb printf format warningsDavid Lamparter2019-06-112-6/+6
| | | | | | | Some types like `time_t` vary across platforms and always need to be cast when printed. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* More compiler cleanup (#4487)David Lamparter2019-06-112-3/+3
|\ | | | | More compiler cleanup
| * lib, pimd, sharpd: Various output string cleanupsDonald Sharp2019-06-072-3/+3
| | | | | | | | | | | | | | Various compilers in our CI system were complaining about various auto-conversions. Let's get these cleaned up a bit more. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib, pbrd, sharpd, vtysh: Add autocompletion for 'nexthop-group'Donald Sharp2019-06-051-1/+1
|/ | | | | | Add some auto-completion for the nexthop-group command Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use ZAPI_CALLBACK_ARGS macro for zapi handlersQuentin Young2019-05-031-18/+10
| | | | | | | | | | | | This macro: - Marks ZAPI callbacks for readability - Standardizes argument names - Makes it simple to add ZAPI arguments in the future - Ensures proper types - Looks better - Shortens function declarations Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* sharpd: Add code to allow nexthops to be watched from non-default vrfDonald Sharp2019-03-011-6/+32
| | | | | | | Add a bit of code to the sharp cli to allow it to specify a non-default vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Add ability to pass vrf we want to watchDonald Sharp2019-03-013-6/+8
| | | | | | | | Add the ability for the sharp zebra code to pass down the vrf that we want to watch. At this point in time, we cannot use it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Add cli to allow vrf route installationDonald Sharp2019-03-011-5/+25
| | | | | | | Add a bit of code to allow the end user to specify a [vrf NAME] for route installation/deletion. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Setup route installation to be able to select vrf to useDonald Sharp2019-03-014-22/+32
| | | | | | | | Modify the sharp code to allow for vrf route installation. At this point in time the code is nascent. Future commits will turn on this behavior. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #3797 from donaldsharp/allow_in_dir_buildDavid Lamparter2019-02-181-0/+10
|\ | | | | build: non-recursive sharpd
| * build: non-recursive sharpdDonald Sharp2019-02-131-0/+10
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | sharpd: Add ability to track import-check nexthopsDonald Sharp2019-02-131-4/+19
| | | | | | | | | | | | | | Add the ability to sharp to track import-check type routes from the cli. Update docs too. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | sharpd: Allow the registration of import checks to zebraDonald Sharp2019-02-133-8/+19
|/ | | | | | | | Minor code modification to allow the sharp_zebra.c code to differentiate between import check or nexthop watch types. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Add 'sharp data nexthop' data dumpDonald Sharp2019-02-077-0/+138
| | | | | | | Add some basic data dumping about what we have watched from the vty/vtysh cli for nexthops. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Add 'sharp data route" dump commandDonald Sharp2019-02-072-0/+23
| | | | | | | | When you are using the install/remove routes command, the output goes to a log file. This command allows for ease of dump of timing information from the vty or vtysh. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Move route global variables into the global data structureDonald Sharp2019-02-074-65/+68
| | | | | | Clean up the route global variables into a global data structure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Add start of global data structuresDonald Sharp2019-02-073-1/+38
| | | | | | | | | | | | We have a bit of a mess with globals in the sharp daemon. Let's start formalizing it a bit. Future commits will take advantage of this, as that we need to have the ability to start dumping stats about commands we have issued. These changes will be useful for debugging and understanding what is going on. Signed-off-by: Donald sharp <sharpd@cumulusnetworks.com>
* sharpd: Allow nhop tracking to specify connectedDonald Sharp2019-02-073-9/+12
| | | | | | | Allow the sharp daemon to specify whether or not a watched nexthop should be connected or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-1/+1
| | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
* sharpd: Clean up vtysh warning about insufficient doc stringDonald Sharp2019-01-111-2/+3
| | | | | | | Not sure why this wasn't caught by our CI system. I thought it would. My screw up this should have been right from the start. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
* sharpd: Do addition/subtraction for meDonald Sharp2019-01-111-2/+13
| | | | | | | Write a bit of code to track the start/stop times and do subtraction! In the future we expect this code to slice and dice as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Allow route install/removal of v6 routes.Donald Sharp2019-01-112-13/+44
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Add code to allow install/uninstall repeatedlyDonald Sharp2019-01-032-25/+45
| | | | | | | | | | | | Add a bit of test code to allow the tester to install/uninstall the routes via: sharp install routes A.B.C.D nexthop Y.Z.M.D 1000000 repeat 100 This will install 1000000 routes wait for them to be finished then uninstall them then start installation over 100 times. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
* sharpd: Abstract the route install/delete functions a bitDonald Sharp2019-01-023-19/+63
| | | | | | | Abstract the route install/delete functions a bit to allow me to expand on them in the with future commits. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: Allow sharpd to accept nexthop group as part of route installDonald Sharp2019-01-021-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing routes via sharpd 'sharp install route... ' command add the ability to specify a nexthop-group to use. This will allow sharpd to create ECMP routes into zebra. Nexthop-group: ! nexthop-group JANELLE nexthop 192.168.209.1 nexthop 192.168.210.1 ! The install: donna.cumulusnetworks.com# sharp install routes 10.0.50.0 nexthop-group JANELLE 10 donna.cumulusnetworks.com# end donna.cumulusnetworks.com# show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric, > - selected route, * - FIB route K>* 0.0.0.0/0 [0/106] via 10.0.2.2, enp0s3, 00:20:38 C>* 10.0.2.0/24 is directly connected, enp0s3, 00:20:38 D>* 10.0.50.0/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.1/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.2/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.3/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.4/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.5/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.6/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.7/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.8/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 D>* 10.0.50.9/32 [150/0] via 192.168.209.1, enp0s8, 00:00:02 * via 192.168.210.1, enp0s9, 00:00:02 C>* 192.168.209.0/24 is directly connected, enp0s8, 00:20:38 C>* 192.168.210.0/24 is directly connected, enp0s9, 00:20:38 donna.cumulusnetworks.com# Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd/vtysh: Allow sharpd to use nexthop-groupsDonald Sharp2019-01-021-0/+1
| | | | | | | | | Allow the sharp daemon to understand and use nexthop-groups. This commit is merely to allow sharpd to understand them when accepted in a future commit Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharp: Modify route install to take nexthop groupsDonald Sharp2019-01-024-9/+41
| | | | | | | | Modify the route_add function to take nexthop groups. Future commits will allow sharpd to use nexthop groups as the install mechanism for routes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* sharpd: return check (Coverity 1475198)F. Aragon2018-12-031-1/+3
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* *: Replace zclient_new with zclient_new_notifyDonald Sharp2018-11-121-1/+1
| | | | | | | It's been a year since we added the new optional parameters to instantiation. Let's switch over to the new name. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: add empty array of YANG modulesRenato Westphal2018-10-271-1/+5
| | | | | | | | | | FRR_DAEMON_INFO should now contain an array of 'frr_yang_module_info' structures describing the YANG modules implemented by the daemon. This array will be used by frr_init() function to load all YANG modules and initialize the northbound callbacks during the daemon initialization. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-1/+1
| | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-15/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+2
| | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #2989 from donaldsharp/static_debugDavid Lamparter2018-09-081-0/+15
|\ | | | | Static debug
| * sharpd: Fix missing 'show debug' commandDonald Sharp2018-09-071-0/+15
| | | | | | | | | | | | | | The sharp daemon was not properly handling 'show debug' commands. Fix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | sharpd: Modify route install to allow v6 nexthopsDonald Sharp2018-09-062-6/+12
|/ | | | | | Allow the user to create a v4 route with a v6 nexthop. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: add a vrf update hook to be informed of the vrf namePhilippe Guibert2018-08-281-1/+1
| | | | | | | | The Vrf aliases can be known with a specific hook. That hook will then, from zebra propagate the information to the relevant zapi clients. The registration hook function is the same for all daemons. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>