summaryrefslogtreecommitdiffstats
path: root/ospfd (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | ospfd: add bfd up event tracePhilippe Guibert2019-05-061-0/+7
| | | | | | | | | | | | | | | | | | that bfd trace is visible when using 'debug ospf nsm event' command. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | Merge pull request #4253 from qlyoung/zapi-handler-args-macroRenato Westphal2019-05-062-28/+16
|\ \ \ | |/ / |/| | ZAPI callback args macro
| * | *: use ZAPI_CALLBACK_ARGS macro for zapi handlersQuentin Young2019-05-032-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ospfd: continue statement is redundantDonald Sharp2019-05-031-1/+0
|/ / | | | | | | | | | | | | The continue statement is redundant because DISCARD_LSA has one in it already. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* / ospfd: replace pqueue_* with DECLARE_SKIPLISTDavid Lamparter2019-04-275-78/+59
|/ | | | | | This replaces the SPF pqueue_* with a DECLARE_SKIPLIST_* skiplist. Signed-off-by: David Lamparter <equinox@diac24.net>
* ospfd: make ECMP nexthop order deterministicDavid Lamparter2019-04-171-1/+8
| | | | | | | | | | | | | | | The order of ECMP nexthops currently depends on whatever order the pqueue code returns the vertices in, which is essentially random since they compare as equal. While this shouldn't cause issues normally, it is nondeterministic and causes the ldp-topo1 test to fail when the ordering comes up different. Also, nondeterministic behaviour is not a nice thing to have here in general. Just sort by nexthop address; realistic numbers of ECMP nexthops should hopefully not make this a performance issue. (Also, nexthops should be hot in the caches here.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: fix clang-SA warningDavid Lamparter2019-04-171-1/+1
| | | | | | Need to clear refresh_list before dropping the reference. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #4103 from qlyoung/fix-ospf-+metricRuss White2019-04-113-10/+11
|\ | | | | ospfd: fix behavior of +/-metric
| * ospfd: fix behavior of +/-metricQuentin Young2019-04-083-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | OSPFD uses -1 as a sentinel value for uninitialized metrics. When applying a route map with a +/-metric to redistributed routes, we were using -1 as our base value to increment or decrement on, which meant that if you set e.g. +10, you would end up with a redistributed route of metric 9. This patch also removes an off-by-one sanity check that would cause a set metric +1 or set metric 0 to result in a metric value of 20 :-) Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #4102 from opensourcerouting/sendbuf_recvbuf_privsQuentin Young2019-04-091-3/+3
|\ \ | | | | | | *: setting the socket send/recv buffer sizes doesn't need elevated privs
| * | *: setting the socket send/recv buffer sizes doesn't need elevated privsRenato Westphal2019-04-081-3/+3
| |/ | | | | | | | | | | The less code running under elevated privileges the better. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* / ospfd: rn may be nullDonald Sharp2019-04-071-12/+12
|/ | | | | | | | rn is not set the first time through the do {} while (); loop As such we need to protect against it from being null( although highly unlikely to ever happen given the ospf code base. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospfd: Remaining packet calculation while fragmenting lsu, ls-ack and ls-reqSaravanan K2019-03-251-6/+22
| | | | | | | | | | | | | | While fragmenting ospf ls packets, before appending the link state info, wrong value is checked to see if current packet can fit in another ls info. Because of this, when a lower mtu is configured, it couldn't fit in even 1 ls ack, which tries to send all the available ls ack in the list in loop. This keeps allocating memory to send the packet and ends up putting the packet buffer without ls-ack into deferred send que(ospf_ls_ack_send_delayed). This infinite loop causes infinite memory being allocated in a loop causing system to be unstable. This commit takes care of calculating the right value to compare for checking oif this buffer can fit in more. Signed-off-by: Saravanan K <saravanank@vmware.com>
* ospfd: remove empty debugMark Stapp2019-03-191-1/+0
| | | | | | | Remove empty debug line - empty format string generates a compile warning. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* Merge pull request #3949 from qlyoung/remove-zlog-newlinesSri Mohana Singamsetty2019-03-156-12/+12
|\ | | | | *: remove trailing newlines from zlog messages
| * *: remove trailing newlines from zlog messagesQuentin Young2019-03-146-12/+12
| | | | | | | | | | | | Zlog puts its own newlines on, and doing this makes logs look nasty. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | ospfd: fix some json timer outputMark Stapp2019-03-131-14/+14
|/ | | | | | | Fix a few json output values: a few are in seconds, not msecs, and one is a number-per-second, not a duration. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* ospfd: When converting to ms divide by 1000Donald Sharp2019-03-131-6/+6
| | | | | | | When converting to miliseconds divide by 1000 not the other way around. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #3869 from qlyoung/cocci-fixesDavid Lamparter2019-03-064-31/+16
|\ | | | | Assorted Coccinelle fixes
| * *: remove casts of XMALLOC / XCALLOCQuentin Young2019-02-262-6/+3
| | | | | | | | | | | | No cast necessary for void * Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * *: use array_size instead of raw divisionQuentin Young2019-02-261-22/+12
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * *: remove useless return variablesQuentin Young2019-02-261-3/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | ospfd: strncpy -> strlcpyQuentin Young2019-02-262-15/+11
| | | | | | | | | | | | strncpy is a byte copy function not a string copy function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #3866 from donaldsharp/ospf_allow_vrf_starupRuss White2019-02-261-2/+6
|\ \ | |/ |/| ospfd: Allow pre-existing vrf's to work
| * ospfd: Allow pre-existing vrf's to workDonald Sharp2019-02-251-2/+6
| | | | | | | | | | | | | | | | When creating a ospf vrf based instance allow it to work if the vrf has been created *before* we create the ospf instance. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #3864 from qlyoung/fix-ospf-mtu-warning-styleOlivier Dugeon2019-02-262-7/+3
|\ \ | | | | | | ospfd: fix link MTU warning style
| * | ospfd: fix link MTU warning styleQuentin Young2019-02-252-7/+3
| |/ | | | | | | | | | | Kernel style dictates that we do not break log messages across lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* / *: Rename backet to bucketTim Bray2019-02-251-16/+16
|/ | | | | | Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>
* Merge pull request #3693 from chiragshah6/ospf_vrf_devRuss White2019-02-051-5/+17
|\ | | | | ospfd: address CVE-2017-3224
| * ospfd: address CVE-2017-3224Chirag Shah2019-02-031-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the vulnerability mentioned in 793496 an attacker can craft an LSA with MaxSequence number wtih invalid links and not set age to MAX_AGE so the lsa would not be flush from the database. To address the issue, check incoming LSA is MaxSeq but Age is not set to MAX_AGE 3600, discard the LSA from processing it. Based on RFC-2328 , When a LSA update sequence reaches MaxSequence number, it should be prematurely aged out from the database with age set to MAX_AGE (3600). Ticket:CM-18989 Reviewed By: Testing Done: Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | ospfd: Added changes to track route-map usagergirada2019-02-042-7/+20
|/ | | | | | | | | | Made changes and updated the routemap applied counter in the following flows. 1.Increment the routemap applied counter when route map attached to a redistribution list. The counter will be updated if the routemap exists. 2.Decrement when route map removed / modified from a redistribution  list. 3.Increment/decrement when route map create/delete callback triggered. Signed-off-by: RajeshGirada <rgirada@vmware.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>
* Merge pull request #3657 from nitinsoniism/ospf_mtu_crashRuss White2019-01-293-0/+25
|\ | | | | ospfd: ospfd core if hello packet exceeds link MTU
| * ospfd: ospfd core if hello packet exceeds link MTUNitin Soni2019-01-283-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Ospfd cored because of an assert when we try to write more than the MTU size to the ospf packet buffer stream. The problem is - we allocate only MTU sized buffer. The expectation is that Hello packets are never large enough to approach MTU. Instead of crashing, this fix discards hello and logs an error. One should not have so many neighbors behind an interface. Ticket: CM-22380 Signed-off-by: Nitin Soni <nsoni@cumulusnetworks.com> Reviewed-by: CCR-8204
* | Treewide: use ANSI function definitionsRuben Kerkhof2019-01-248-11/+11
|/ | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* Merge pull request #3627 from manuhalo/fix_ospf_vl_del_masterDonald Sharp2019-01-221-4/+7
|\ | | | | ospfd: fix no virtual-link cmd
| * ospfd: fix no virtual-link cmdEmanuele Di Pascale2019-01-181-4/+7
| | | | | | | | | | | | | | | | | | | | | | the command was not checking correctly in all cases whether the virtual link existed. This caused bugs in some corner cases, e.g. when two virtual links were created, one of them was deleted, and the second one was reset with no authentication - this would instead create a new virtual link with the area in decimal format. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
* | Merge pull request #3631 from opensourcerouting/zapi_fixesRuss White2019-01-221-2/+2
|\ \ | | | | | | Small zapi fixes
| * | lib: use the correct VRF ID when parsing INTERFACE_LINK_PARAMS messagesRenato Westphal2019-01-181-2/+2
| |/ | | | | | | | | | | Bug found during code inspection. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* / ospfd: remove default origin max age lsaChirag Shah2019-01-163-0/+20
|/ | | | | | | | | | | | | default-information originate does not work if config is removed and re-added. Ticket:CM-20026 Testing Done: Validate default-information originate config removed and re-added, check ospf lsa database, and peer route cache entry for default route. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* lib, zebra: add AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_* messagesRenato Westphal2019-01-142-8/+9
| | | | | | | | | | | | | | | | | | | | | Some daemons like ospfd and isisd have the ability to advertise a default route to their peers only if one exists in the RIB. This is what the "default-information originate" commands do when used without the "always" parameter. For that to work, these daemons use the ZEBRA_REDISTRIBUTE_DEFAULT_ADD message to request default route information to zebra. The problem is that this message didn't have an AFI parameter, so a default route from any address-family would satisfy the requests from both daemons (e.g. ::/0 would trigger ospfd to advertise a default route to its peers, and 0.0.0.0/0 would trigger isisd to advertise a default route to its IPv6 peers). Fix this by adding an AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_{ADD,DELETE} messages and making the corresponding code changes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ospfd: convert a couple of "show" commands to DEFPYRenato Westphal2018-12-311-34/+11
| | | | | | | | DEFPY commands are easier to maintain and less susceptible to bugs. In the long term we should try to merge the plethora of "show ip ospf neighbor" commands (total of 14) into a single DEFPY. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ospfd: fix wrong argv index in the "show ip ospf neighbor" commandRenato Westphal2018-12-311-2/+5
| | | | | | Fixes Issue #3544. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3335 from pguibert6WIND/ospf_remove_if_lookup_all_vrfRenato Westphal2018-12-172-43/+75
|\ | | | | ospfd: remove call to if_lookup_all_vrf
| * ospfd: remove call to if_lookup_all_vrfPhilippe Guibert2018-12-102-43/+75
| | | | | | | | | | | | | | so as to isolate ospf contexts separately for each vrf, the interface used is cornered to the passed vrf context. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | *: remove all MIBs for DFSG complianceDavid Lamparter2018-12-143-3168/+0
|/ | | | | | | | | cf. https://wiki.debian.org/NonFreeIETFDocuments These MIBs were in our git purely for documentation purposes, they are not installed and not needed for building SNMP support. Signed-off-by: David Lamparter <equinox@diac24.net>
* Revert "isisd lib ospfd pbrd python: fix empty init"David Lamparter2018-12-011-1/+1
| | | | | | | | | This reverts commit 48944eb65e1d1ced03d46121d923d9d613a480d5. We're using GNU C, not ISO C - and this commit triggers new (real) warnings about {0} instead of bogus ones about {}. Signed-off-by: David Lamparter <equinox@diac24.net>
* isisd lib ospfd pbrd python: fix empty initF. Aragon2018-11-211-1/+1
| | | | | | | ISO C forbids empty initializer braces. Empty initializers have been replaced with {0} Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #3295 from pguibert6WIND/ospf_area_unconfigureDavid Lamparter2018-11-133-2/+33
|\ | | | | ospfd: permit reconfiguring network after area suppressed
| * ospfd: permit reconfiguring network after area suppressedPhilippe Guibert2018-11-093-2/+33
| | | | | | | | | | | | | | | | | | avoid counting twice the number of areas configured, when entering back to router ospf config node. PR=61288 Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Acked-by: Emmanuel Vize <emmanuel.vize@6wind.com>