summaryrefslogtreecommitdiffstats
path: root/ospfd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ospfd: Remove deprecated command `graceful-restart helper-only`Donatas Abraitis2022-09-231-45/+0
| | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* Merge pull request #11911 from mruprich/ospf-apiJafar Al-Gharaibeh2022-09-071-0/+5
|\ | | | | ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.c
| * ospfd: Adding SUPPORT_OSPF_API define in ospf_spf.cMichal Ruprich2022-09-061-0/+5
| | | | | | | | | | | | | | | | | | It is not possible to build ospf_spf.c file with --disable-ospfapi because ospf_apiserver.c has SUPPORT_OSPF_API around all function definitions and that results in an undefined reference to the ospf_apiserver_notify_reachable function error while building. Signed-off-by: Michal Ruprich <mruprich@redhat.com>
* | Merge pull request #11864 from manojvn/clisDonatas Abraitis2022-09-065-3/+46
|\ \ | |/ |/| ospfd: Added clis to change default timers for LSA refresh and maxage remove delay.
| * ospfd: Added clis to change default timers for LSA refresh and maxage remove ↵Manoj Naragund2022-09-015-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | delay. Description: Added hidden clis that will allow you to reset the default timers for LSA refresh and LSA maxage remove delay, these will help in testing LSA refresh scenarios in upcoming OSPFv2 Flood reduction feature(rfc4136). IETF Link : https://datatracker.ietf.org/doc/html/rfc4136 Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
* | ospfd: crash when router acts as GR helper upon a topo changergirada2022-08-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: ospf process is crashing when the current router acts as GR helper and it received a new lsa. Here, ospf_lsa_different() is being called without checking 'old' pointer. It is asserted in ospf_lsa_different() api if the 'old' pointer is NULL. corrected this by validaing old pointer before calling ospf_lsa_different() api. back tarce: Program terminated with signal SIGABRT, Aborted. 0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 [Current thread is 1 (Thread 0x6b84348827c0 (LWP 3155))] 0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 1 0x00006b8433aa4801 in __GI_abort () at abort.c:79 2 0x00006b8433a9439a in __assert_fail_base (fmt=0x6b8433c1b7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x162ffc0630bc "l1", file=file@entry=0x162ffc062ff7 "ospfd/ospf_lsa.c", line=line@entry=3520, function=function@entry=0x162ffc0646f0 <__PRETTY_FUNCTION__.18732> "ospf_lsa_different") at assert.c:92 3 0x00006b8433a94412 in __GI___assert_fail (assertion=assertion@entry=0x162ffc0630bc "l1", file=file@entry=0x162ffc062ff7 "ospfd/ospf_lsa.c", line=line@entry=3520, function=function@entry=0x162ffc0646f0 <__PRETTY_FUNCTION__.18732> "ospf_lsa_different") at assert.c:101 4 0x0000162ffc008c25 in ospf_lsa_different (l1=l1@entry=0x0, l2=l2@entry=0x162ffe535c60, ignore_rcvd_flag=ignore_rcvd_flag@entry=true) at ospfd/ospf_lsa.c:3520 5 0x0000162ffc00a8e8 in ospf_lsa_install (ospf=ospf@entry=0x162ffe513650, oi=oi@entry=0x162ffe531c30, lsa=lsa@entry=0x162ffe535c60) at ospfd/ospf_lsa.c:2892 6 0x0000162ffc059d16 in ospf_flood (ospf=0x162ffe513650, nbr=nbr@entry=0x162ffe52cc90, current=current@entry=0x0, new=new@entry=0x162ffe535c60) at ospfd/ospf_flood.c:429 7 0x0000162ffc01838f in ospf_ls_upd (size=<optimized out>, oi=0x162ffe531c30, s=<optimized out>, ospfh=<optimized out>, iph=<optimized out>, ospf=<optimized out>) at ospfd/ospf_packet.c:2162 8 ospf_read_helper (ospf=<optimized out>) at ospfd/ospf_packet.c:3241 9 ospf_read (thread=<optimized out>) at ospfd/ospf_packet.c:3272 10 0x00006b843450139c in thread_call (thread=thread@entry=0x7780f42c7480) at lib/thread.c:1692 11 0x00006b84344cfb18 in frr_run (master=0x162ffe34d130) at lib/libfrr.c:1068 Signed-off-by: Rajesh Girada <rgirada@vmware.com>
* | Merge pull request #11867 from sri-mohan1/sri-ospf-dbg1mobash-rasool2022-08-293-22/+18
|\ \ | | | | | | ospfd: changes for code maintainability
| * | ospfd: changes for code maintainabilitysri-mohan12022-08-283-22/+18
| | | | | | | | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | | Merge pull request #11863 from sri-mohan1/sri-ospf-dbg1Donald Sharp2022-08-261-45/+39
|\| | | | | | | | ospfd: changes for code maintainability
| * | ospfd: changes for code maintainabilitysri-mohan12022-08-261-45/+39
| | | | | | | | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | | Merge pull request #11862 from sri-mohan1/sri-ospf-dbg1mobash-rasool2022-08-261-37/+37
|\| | | |/ |/| ospfd: changes for code maintainability
| * ospfd: changes for code maintainabilitysri-mohan12022-08-251-37/+37
| | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | Merge pull request #11858 from sri-mohan1/sri-ospf-dbg1Donald Sharp2022-08-251-30/+24
|\| | | | | ospfd: changes for code maintainability
| * ospfd: changes for code maintainabilitysri-mohan12022-08-241-30/+24
| | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | Merge pull request #11848 from rgirada/ospf_gr_nbrDonatas Abraitis2022-08-241-0/+27
|\ \ | |/ |/| ospfd: Adding per neighbour json details to GR helper detail command
| * ospfd: Adding per neighbour json details to GR helper detail commandrgirada2022-08-241-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Per neighbor GR enabled information is missing from json output in "show ip ospf gr helper details json" command. Example config: frr(config-router)# graceful-restart helper enable 2.2.2.2 frr(config-router)# frr(config-router)# do show ip ospf graceful-restart helper detail OSPF Router with ID (10.112.156.220) Graceful restart helper support disabled. Strict LSA check is enabled. Helper supported for Planned and Unplanned Restarts. Supported Graceful restart interval: 1800(in seconds). Enable Router list: 2.2.2.2, frr(config-router)# do show ip ospf graceful-restart helper detail json { "routerId":"10.112.156.220", "helperSupport":"Disabled", "strictLsaCheck":"Enabled", "restartSupoort":"Planned and Unplanned Restarts", "supportedGracePeriod":1800, } frr(config-router)# Signed-off-by: Rajesh Girada <rgirada@vmware.com>
* | ospfd: changes for code maintainabilitysri-mohan12022-08-231-97/+57
| | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | ospfd: changes for code maintainabilitysri-mohan12022-08-231-16/+15
| | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | ospfd: changes for code maintainabilitysri-mohan12022-08-221-21/+22
| | | | | | | | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* | ospfd: changes for code maintainabilitysri-mohan12022-08-221-61/+52
|/ | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* ospfd: changes for code maintainabilitysri-mohan12022-08-221-101/+74
| | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* ospfd: changes code maintainabilitysri-mohan12022-08-191-220/+198
| | | | | | these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* Merge pull request #11781 from donaldsharp/ospf_packet_helperDonatas Abraitis2022-08-157-227/+277
|\ | | | | Ospf packet helper
| * ospfd: Add how many packets the interface has queued to sendDonald Sharp2022-08-111-8/+10
| | | | | | | | | | | | | | In `show ip ospf interface traffic` how many packets this interface has queued to send. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * ospfd: Refactor fifo_flush for the interfaceDonald Sharp2022-08-113-18/+18
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * ospfd: When a neighbor goes down clear the oi->obuf if we canDonald Sharp2022-08-111-0/+40
| | | | | | | | | | | | | | | | | | When a neighbor goes down on an interface and that interface has no more neighbors in a viable state where packets should be being sent, then let's clear up the oi->obuf associated with the interface the neighbor is on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * ospfd: Cleanup indentation surrounding oi->nbrDonald Sharp2022-08-115-198/+215
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * ospfd: Increase packets sent at one time in ospf_writeDonald Sharp2022-08-111-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ospf_write pulls an interface off the ospf->oi_write_q then writes one packet and places it back on the queue, keeping track of the first one sent. Then it will stop sending packets even if we get back to the first interface written too but before we have sent the full pkt_count. I do not believe this makes a whole bunch of sense and is very restrictive of how much data can be sent especially if you have a limited number of peers but large amounts of data. Why be so restrictive? Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | ospfd: debug string correctedsri-mohan12022-08-121-1/+1
|/ | | | | | Debug string for ospf is corrected Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* ospfd: Remove usage of inet_ntopDonald Sharp2022-07-302-10/+5
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfd: Coverity warns that we could possibly use unininted dataDonald Sharp2022-07-271-1/+1
| | | | | | | | | In ospf_handle_exnl_lsa_lsId_chg there is a code path where that we may be using uninitialized data for decisions. Doubtful that this happens but let's make it less likely to even more. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfd: Convert thread_cancel to THREAD_OFFDonald Sharp2022-07-213-7/+7
| | | | | | Just convert all uses of thread_cancel to THREAD_OFF. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfd: Remove various macros that overlap THREAD_OFFDonald Sharp2022-07-2113-75/+67
| | | | | | | | Let's just use THREAD_OFF consistently in the code base instead of each daemon having a special macro that needs to be looked at and remembered what it does. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfd: correct one debug info for lsaanlan_cs2022-07-201-3/+3
| | | | | | The index about slots should be displayed as `slot`. Additionally, adjust format. Signed-off-by: anlan_cs <vic.lan@pica8.com>
* ospfd: free unreachable router LSA node so that it is not left unreachableLou Berger2022-07-161-2/+7
| | | | | | allows for an LSA to be unreachable via one link and reachable via another Signed-off-by: Lou Berger <lberger@labn.net>
* ospfd: set/unset bfd profileDmitrii Turlupov2022-06-301-2/+8
| | | | | | | Before this patch we can enable 'ip ospf bfd' via '[no] ip ospf bfd profile ...' commads. After patch '[no] ip ospf bfd profile ...' actual only if 'ip ospf bfd' is set. Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
* Merge pull request #11460 from LabNConsulting/chopps/ospfapi-routeridDonald Sharp2022-06-235-0/+66
|\ | | | | Chopps/ospfapi routerid
| * ospfd: add router id support to ospf apiChristian Hopps2022-06-235-0/+66
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | ospfd: fixing few coverity issue in 'show_ip_ospf_neighbour_brief'rgirada2022-06-231-1/+1
|/ | | | | | | | | Description: timerval data structure is being used without initialization. Using these uninitialized parameters can lead unexpected results so initializing before using it. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
* ospfd: Fixing "show ip ospf neighbour <nbrid>" commandrgirada2022-06-221-187/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: "show ip ospf neighbour [nbrid] [json]" is expected to give brief output of the specific neighbour. But it gives the detailed output without the detail keyword. "show ip ospf neighbour [nbrid] [deatil] [json]" command is failed to fetch the ecpected o/p. Corrected it. Ex o/p: frr(config-if)# do show ip ospf neighbor Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 8.8.8.8 1 Full/DR 17m03s 31.192s 20.1.1.194 ens192:20.1.1.220 0 0 0 30.1.1.100 1 Full/DR 56.229s 32.000s 30.1.1.100 ens224:30.1.1.220 0 0 0 frr(config-if)# frr(config-if)# frr(config-if)# do show ip ospf neighbor 8.8.8.8 Neighbor 8.8.8.8, interface address 20.1.1.194 In the area 0.0.0.0 via interface ens192 Neighbor priority is 1, State is Full/DR, 6 state changes Most recent state change statistics: Progressive change 17m18s ago DR is 20.1.1.194, BDR is 20.1.1.220 Options 2 *|-|-|-|-|-|E|- Dead timer due in 35.833s Database Summary List 0 Link State Request List 0 Link State Retransmission List 0 Thread Inactivity Timer on Thread Database Description Retransmision off Thread Link State Request Retransmission on Thread Link State Update Retransmission on Graceful restart Helper info: Graceful Restart HELPER Status : None frr(config-if)# do show ip ospf neighbor 8.8.8.8 detail No such interface. frr(config-if)# do show ip ospf neighbor 8.8.8.8 detail json {} frr(config-if)# Signed-off-by: Rajesh Girada <rgirada@vmware.com>
* bgpd, ospfd: Remove extra newline for `show debugging`Donald Sharp2022-06-151-2/+0
| | | | | | | | 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>
* *: Use autocomplete for route-maps under commands that require itDonatas Abraitis2022-06-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | For example: ``` donatas-laptop# show bgp ipv4 unicast neighbors 127.0.0.2 advertised-routes route-map ? RMAP_NAME Name of the route map testas2 testas donatas-laptop(config)# router bgp donatas-laptop(config-router)# address-family ipv4 donatas-laptop(config-router-af)# redistribute connected route-map ? RMAP_NAME Pointer to route-map entries testas2 testas donatas-laptop(config-router-af)# network 192.168.0.0/23 route-map ? RMAP_NAME Name of the route map testas2 testas ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* ospfd: Fixup ospfd.h to declare variable namesDonald Sharp2022-06-082-50/+64
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #11334 from ton31337/fix/deprecation_warningOlivier Dugeon2022-06-071-80/+0
|\ | | | | ospfd: Remove local-block deprecated command
| * ospfd: Remove local-block deprecated commandDonatas Abraitis2022-06-071-80/+0
| | | | | | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | ospfd: api: always ready to receive opaque from clientChristian Hopps2022-06-021-31/+6
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | ospfd: api: add new ISM and NSM sync requestsChristian Hopps2022-06-023-4/+90
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | ospfd: api: remove unused api code/message creationChristian Hopps2022-06-022-42/+9
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* | ospfd: api: fix recovery of LSA after restart of api clientChristian Hopps2022-06-024-52/+73
| | | | | | | | | | | | | | | | | | Prior to this fix, restarting the client just failed b/c the code tried to "refresh" the existing LSA being added, except that code checked for meta-data to exist, which was deleted when the client disconnected previously (or had never connected and the LSA state was picked up from the network). Signed-off-by: Christian Hopps <chopps@labn.net>
* | ospfd: cli: add "show ip ospf reachable-routers" CLIChristian Hopps2022-06-021-2/+118
| | | | | | | | Signed-off-by: Christian Hopps <chopps@labn.net>