summaryrefslogtreecommitdiff
path: root/ospfd/ospf_dump.c
AgeCommit message (Collapse)Author
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-23ospfd: Remove unused functionDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-17Revert "ospfd: rSPF calc and messaging for optimal route reflection"Donatas Abraitis
This reverts commit a3d3a14c09cf212c7d402670247c4d518b99d8b7.
2023-01-17Revert "bgpd, ospfd: BGP ORR CI warning fixes"Donatas Abraitis
This reverts commit d6b2761134352ad22acac6cc39acd70bd0c21ad4.
2023-01-17Revert "ospfd: few fixes in rSPF calc when LSA received from non root node"Donatas Abraitis
This reverts commit 9f2984d97c2e23198db47d39a725f3c50d2ee0ed.
2022-10-26build, vtysh: extract vtysh commands from .xrefDavid Lamparter
Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-12ospfd: few fixes in rSPF calc when LSA received from non root nodeMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-10-12bgpd, ospfd: BGP ORR CI warning fixesMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-10-12ospfd: rSPF calc and messaging for optimal route reflectionMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-10-12Merge pull request #12074 from donaldsharp/lib_debugsDonatas Abraitis
*: Create and use infrastructure to show debugs in lib
2022-10-07*: Create and use infrastructure to show debugs in libDonald Sharp
There are lib debugs being set but never show up in `show debug` commands because there was no way to show that they were being used. Add a bit of infrastructure to allow this and then use it for `debug route-map` Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-09-20ospfd: fix for few debug commands lost in config after debug ospf packet is ↵Madhuri Kuruganti
enabled Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-09-20ospfd: fix for debug ospf <inst> packet fails with instance not runningMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-09-19ospfd: fix for some of ospf debug commands config lost after rebootMadhuri Kuruganti
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
2022-06-15bgpd, ospfd: Remove extra newline for `show debugging`Donald Sharp
This extra newline was adding a weird output to `show debugging` display where there would be extra newlines sometims and not others. Make it consistent. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-01ospfd: cli: add client api debug optionChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-01-31ospfd: Convert output to host order from network order for route_tagDonald Sharp
FRR stores the route_tag in network byte order. Bug filed indicates that the `show ip ospf route` command shows the correct value. Every place route_tag is dumped in ospf_vty.c the ntohl function is used first. Fixes: #10450 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-20Merge pull request #9683 from volta-networks/sr-minor-fixesIgor Ryzhov
ospfd, isisd: minor SR fixes
2021-10-26ospfd: Adding apropriate ism state in ptop neighbors.rgirada
Description: In PointToPoint networks, There wont be DR and BDR. But by default, All neighbours ism state is shown as DR_OTHER. Changed the nbr state format to <nbrsate>/- (ex : FULL/-) to P2pnetworks. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-10-13ospfd: Add `converged` and `role` json output for neighbor commandDonald Sharp
The `show ip ospf neighbor json` command was displaying state:`Full\/DR` Where state was both the role and whether or not the neigbhor was converged. While from a OSPF perspective this is the state. This state is a combination of two things. This creates a problem in testing because we have no guarantee that a particular ospf router will actually have a particular role given how loaded our topotest systems are. So add a bit of json output to display both the converged status as well as the role this router is playing on this neighbor/interface. The above becomes: state:`Full\/DR` converged:`Full` role:`DR` Tests can now be modified to look for `Full` and allow it to continue. Most of the tests do not actually care if this router is the DR or Backup. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-28ospfd: fix display of debug flagsFredi Raspall
* Some of the debug flags were not shown in show debugging. * The check for TI-LFA debug was made against the wrong variable. * Some of the debugs were not cleared with 'no debug ospf' Signed-off-by: Fredi Raspall <fredi@voltanet.io>
2021-07-05ospfd: adjust log config for GRGalaxyGorilla
Remove previous log config debug ospf graceful-restart helper and just use debug ospf graceful-restart for everything related to OSPF GR. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-05-19ospfd: Correct Coverity defectsOlivier Dugeon
When browsing or parsing OSPF LSA TLVs, we need to use the LSA length which is part of the LSA header. This length, encoded in 16 bits, must be first converted to host byte order with ntohs() function. However, Coverity Scan considers that ntohs() function return TAINTED data. Thus, when the length is used to control for() loop, Coverity Scan marks this part of the code as defect with "Untrusted Loop Bound" due to the usage of Tainted variable. Similar problems occur when browsing sub-TLV where length is extracted with ntohs(). To overcome this limitation, a size attribute has been added to the ospf_lsa structure. The size is set when lsa->data buffer is allocated. In addition, when an OSPF packet is received, the size of the payload is controlled before contains is processed. For OSPF LSA, this allow a secure buffer allocation. Thus, new size attribute contains the exact buffer allocation allowing a strict control during TLV browsing. This patch adds extra control to bound for() loop during TLV browsing to avoid potential problem as suggested by Coverity Scan. Controls are based on new size attribute of the ospf_lsa structure to avoid any ambiguity. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-04-13ospfd: show seconds in timeval_dumpMark Stapp
If the number of seconds is < one minute, show seconds and msecs. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-23ospfd: fix checkpatch warningsRafael Zalamena
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-23ospfd: add debug option for BFDRafael Zalamena
Add specialized debug option for BFD which also enables library debugging. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-02-24ospfd: don't rely on instance existence in vtyIgor Ryzhov
Store instance index at startup and use it when processing vty commands. The instance itself may be created and deleted by the user in runtime using `[no] router ospf X` command. Fixes #7908 Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-01-19ospfd: Add 'debug ospf ti-lfa' commandGalaxyGorilla
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-11-01ospfd: OSPF external summarisation debug supportrgirada
Description: Changes to enable/disable debugs for external LSA sumarisation. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-10-22ospfd: replace inet_ntoaMark Stapp
Stop using inet_ntoa, use %pI4 etc or inet_ntop instead Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-22ospfd: Debug support to ospf GR helper functionalityrgirada
Description: Added the following debug commands to enable debugs GR helper functionality. [no] debug ospf gr helper Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-22ospfd: ospf GR helper initializationrgirada
Description: 1. Graceful restart helper init/de-init. 2. Defining dedicated memory for helper. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2020-09-09ospfd: ldp-igp-sync feature: adding ospf supportlynne
Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-07-07ospf: Default-information originate with routemapSantosh P K
Default originate with route-map was broken. Routemap was not getting applied for redistribute route but was getting applied default route itself. No default route was originated even when routemap was satisfied. Signed-off-by: Santosh P K <sapk@vmware.com>
2020-04-20*: sprintf -> snprintfQuentin Young
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-16*: move CLI node names to cmd_node->nameDavid Lamparter
And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: remove second parameter on install_node()David Lamparter
There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: remove cmd_node->vtyshDavid Lamparter
The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-16*: clean up cmd_node initializersDavid Lamparter
... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
2020-03-08*: Replace `sizeof something` to sizeof(something)Donatas Abraitis
Satisfy checkpatch.pl requirements (check for sizeof without parenthesis) Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-27ospfd: Cleanup set but unused variablesDonald Sharp
There existed some variables set but never used. Clean this up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-11-19ospfd: The ip header dump is crazy long and uselessDonald Sharp
Turning on packet debugs and seeing a header dump that is 11 lines long is useless 2019/11/07 01:07:05.941798 OSPF: ip_v 4 2019/11/07 01:07:05.941806 OSPF: ip_hl 5 2019/11/07 01:07:05.941813 OSPF: ip_tos 192 2019/11/07 01:07:05.941821 OSPF: ip_len 68 2019/11/07 01:07:05.941831 OSPF: ip_id 48576 2019/11/07 01:07:05.941838 OSPF: ip_off 0 2019/11/07 01:07:05.941845 OSPF: ip_ttl 1 2019/11/07 01:07:05.941857 OSPF: ip_p 89 2019/11/07 01:07:05.941865 OSPF: ip_sum 0xcf33 2019/11/07 01:07:05.941873 OSPF: ip_src 200.254.30.14 2019/11/07 01:07:05.941882 OSPF: ip_dst 224.0.0.5 We already have this debugged, it's not going to change and the end developer can stick this back in if needed by hand to debug something that is not working properly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-26ospfd: strncpy -> strlcpyQuentin Young
strncpy is a byte copy function not a string copy function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-10-01ospfd: fix symbol collisionDavid Lamparter
debug_init() was recently added in libfrr, which is now causing a build error with static linking. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-06-18Merge pull request #2486 from pacovn/cppcheck_fmt_validationDonald Sharp
babeld, lib, ospfd, tests: fmt fixes (cppcheck)
2018-06-18ospfd, pimd: redundant memset (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-18babeld, lib, ospfd, tests: fmt fixes (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>