summaryrefslogtreecommitdiffstats
path: root/ospfd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'pull/3197'David Lamparter2018-10-231-1/+1
|\ | | | | | | | | | | ...with a nit fix Signed-off-by: David Lamparter <equinox@diac24.net>
| * *: Replace hash_cmp function return value to a boolDonald Sharp2018-10-191-1/+1
| | | | | | | | | | | | | | | | | | The ->hash_cmp and linked list ->cmp functions were sometimes being used interchangeably and this really is not a good thing. So let's modify the hash_cmp function pointer to return a boolean and convert everything to use the new syntax. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #3209 from opensourcerouting/cli-fuzzer-fixesQuentin Young2018-10-221-0/+3
|\ \ | | | | | | CLI fuzzer fixes
| * | ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" commandRenato Westphal2018-10-201-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | Add a missing check to bail out earlier when SR is not configured. The same command without the "no" prefix has the same check as it prevents unexpected things (i.e. crashes) from happening. Fixes the following segfaults: ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32" ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 65535 no-php-flag" Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* / ospfd: Do not allow thread dropDonald Sharp2018-10-201-3/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ospf->oi_write_q is not empty that means that ospf could already have a thread scheduled for running. Just dropping the pointer before resheduling does not stop the one currently scheduled for running from running. The calling of thread_add_write checks to see if we are already running and does the right thing here so it is sufficient to just call thread_add_write. This issue was tracked down from this stack trace: Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [EC 134217739] interface eth2.1032:172.16.4.110: ospf_check_md5 bad sequence 5333618 (expect 5333649) Oct 19 18:04:00 VYOS-R1 ospfd[1811]: message repeated 3 times: [ [EC 134217739] interface eth2.1032:172.16.4.110: ospf_check_md5 bad sequence 5333618 (expect 5333649)] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Assertion `node’ failed in file ospfd/ospf_packet.c, line 666, function ospf_write Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Backtrace for 8 stack frames: Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 0] /usr/lib/libfrr.so.0(zlog_backtrace+0x3a) [0x7fef3efe9f8a] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 1] /usr/lib/libfrr.so.0(_zlog_assert_failed+0x61) [0x7fef3efea501] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 2] /usr/lib/frr/ospfd(+0x2f15e) [0x562e0c91815e] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 3] /usr/lib/libfrr.so.0(thread_call+0x60) [0x7fef3f00d430] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 4] /usr/lib/libfrr.so.0(frr_run+0xd8) [0x7fef3efe7938] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 5] /usr/lib/frr/ospfd(main+0x153) [0x562e0c901753] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fef3d83db45] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: [bt 7] /usr/lib/frr/ospfd(+0x190be) [0x562e0c9020be] Oct 19 18:04:00 VYOS-R1 ospfd[1811]: Current thread function ospf_write, scheduled from file ospfd/ospf_packet.c, line 881 Oct 19 18:04:00 VYOS-R1 zebra[1771]: [EC 4043309116] Client ‘ospf’ encountered an error and is shutting down. Oct 19 18:04:00 VYOS-R1 zebra[1771]: client 41 disconnected. 0 ospf routes removed from the rib We had an assert(node) in ospf_write, which means that the list was empty. So I just searched until I saw a code path that allowed multiple writes to the ospf_write function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #3077 from rgirada/ospf_2980_fixOlivier Dugeon2018-10-092-29/+130
|\ | | | | ospfd: Resolved the inconsistency behavior when “default-info origina…
| * ospfd: issue with the "default-information originate always" command #2980rgirada2018-10-092-29/+130
| | | | | | | | | | | | | | Made changes such that message wont be sent to zebra to validate default route existence if user configured with “always”. Signed-off-by: rgirada <rgirada@vmware.com>
* | ospfd: default route got flushed after lsa refresh timer.rgirada2018-10-081-1/+1
| | | | | | | | | | | | | | Default route type is not considered while processing lsa refresh timer expiry which intern makes it flushed from lsdb. Signed-off-by: rgirada <rgirada@vmware.com>
* | *: list_delete_and_null() -> list_delete()David Lamparter2018-10-0215-55/+55
| | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | Merge pull request #3097 from opensourcerouting/static-linkingLou Berger2018-10-013-3/+3
|\ \ | | | | | | build: add --enable-static-bin option
| * | ospfd: fix symbol collisionDavid Lamparter2018-10-013-3/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge pull request #3086 from patrasar/1836David Lamparter2018-10-012-1/+6
|\ \ \ | |/ / |/| | ospfd: handling of OSPF_AREA_RANGE_ADVERTISE flag
| * | ospfd: handling of OSPF_AREA_RANGE_ADVERTISE flagSarita Patra2018-09-252-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: # https://github.com/FRRouting/frr/issues/1836 Issue 1: if the router ospf current configuration is "area 0.0.0.2 range 1.0.0.0/24 cost 23" and user try to configure "area 0.0.0.2 range 1.0.0.0/24 not-advertise", the existing o/p is "area 0.0.0.2 range 1.0.0.0/24 cost 23 not-advertise". The keywords "not-advertise" & "cost" are multually exclusive, so they should not come together. The vice versa way configuration is working fine. Fix: When ospf area range "not-advertise", the cost should be initialized to OSPF_AREA_RANGE_COST_UNSPEC. Issue 2: if the router ospf current configuration "area 0.0.0.2 range 1.0.0.0/24 substitute 2.0.0.0/24" and user try to configure "area 0.0.0.2 range 1.0.0.0/24 not-advertise" the existing o/p is "area 0.0.0.2 range 1.0.0.0/24 not-advertise substitute 2.0.0.0/24". The keywords "not-advertise" & "substiture" are multually exclusive, so they should not come together. The vice versa way configuration is working fine. Fix: When ospf area range "not-advertise" is configured, ospf_area_range_substitute_unset() should be get called. Issue 3: if the router ospf6 current configuration is "area 0.0.0.2 range 2001::/64 cost 23" and user try to configure "area 0.0.0.2 range 2001::/64 advertise", the existing o/p is area 0.0.0.2 range 2001::/64. The keyword "cost 23" disappears. Fix: When ospf area range "advertise" is configured and the range is not NULL, the cost should not be modified. Signed-off-by: Sarita Patra <saritap@vmware.com>
* | ospfd: dead code (Coverity 1302499)F. Aragon2018-10-011-1/+1
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | ospfd: dead code (Coverity 1472227)F. Aragon2018-09-261-2/+2
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* ospfd: remove unnecessary housekeeping code when using linked listsRenato Westphal2018-09-243-21/+0
| | | | | | | | The head and tail pointers of linked lists should never be modified manually, the linked list API guarantees that these pointers are always valid and up-to-date. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #2978 from ton31337/fix/default_originate_after_second_enterDavid Lamparter2018-09-212-17/+9
|\ | | | | osfpd: Install default route after second try instantly
| * osfpd: Install default route after second try instantlyDonatas Abraitis2018-09-202-17/+9
| | | | | | | | Signed-off-by: Donatas Abraitis donatas.abraitis@gmail.com
* | *: style for EC replacementsQuentin Young2018-09-134-32/+28
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-133-15/+15
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | ospfd: OSPF_[ERR|WARN] -> EC_OSPFQuentin Young2018-09-1315-232/+232
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #3006 from pacovn/static_analysis__shadow_variables1Donald Sharp2018-09-136-15/+3
|\ \ | | | | | | bgpd isisd ospf6d ospfd: variable shadowing fixes
| * | bgpd isisd ospf6d ospfd: variable shadowing fixesF. Aragon2018-09-126-15/+3
| | | | | | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | | Merge remote-tracking branch 'frr/master' into warningsDavid Lamparter2018-09-124-16/+15
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: zebra/if_ioctl_solaris.c zebra/rtread_getmsg.c Signed-off-by: David Lamparter <equinox@diac24.net>
| * | Merge pull request #2977 from opensourcerouting/doc-fixDonald Sharp2018-09-091-1/+1
| |\ \ | | | | | | | | build: fix not building docs w/o sphinx
| | * | 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>
| * | | Merge pull request #2965 from opensourcerouting/buildfoo-20180904Donald Sharp2018-09-091-0/+4
| |\ \ \ | | |/ / | |/| | more build fixes & warning-free build
| | * | *: fix config.h/zebra.h include orderDavid Lamparter2018-09-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | Merge pull request #2862 from opensourcerouting/non-recursiveDonald Sharp2018-09-092-15/+11
| |\| | | | | | | | | | final non-recursive make
| | * | *: 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/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | *: fix clang-6 SA warningsDavid Lamparter2018-09-081-1/+0
| |/ / | | | | | | | | | | | | | | | | | | I don't see these in CI, but my local clang-6 does emit warnings for these. Signed-off-by: David Lamparter <equinox@diac24.net>
* | | *: style for flog_warn conversionsQuentin Young2018-09-0610-83/+106
| | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | ospfd: Convert ospf_sr.c to use error-card subsystem.Donald Sharp2018-09-061-22/+25
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Modify ospf_spf.c to use error-card subsystemDonald Sharp2018-09-061-1/+3
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert ospf_ri to use error-code subsystemDonald Sharp2018-09-061-9/+12
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospf_nsm.c: Convert warn->err and use error-codeDonald Sharp2018-09-063-9/+17
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Fix warn -> debug for neighbor addDonald Sharp2018-09-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | If we detect we already have a neighbor, no need to re-add so no need to warn since we do not do anything with the data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert ospf_lsa.c to use new error-card SyntaxDonald Sharp2018-09-063-18/+45
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert ospf_asbr.c to use error-codes subsystemDonald Sharp2018-09-061-5/+6
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Modify ospf_abr.c to use new error-code subsystemDonald Sharp2018-09-063-3/+14
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert ospf_ext.c to use new error-code subsystemDonald Sharp2018-09-064-50/+62
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Add OSPF_WARN_LSA_INSTALL_FAILURE error codeDonald Sharp2018-09-067-24/+37
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Modify ospf_ri.c to use new error-code subsystemDonald Sharp2018-09-061-12/+3
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert opsfd.c to use new error-code subysstemDonald Sharp2018-09-061-3/+3
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert ospf_te.c to use new error-card subsystemDonald Sharp2018-09-063-46/+54
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Add OSPF_WARN_OPAQUE_REGISTRATIONDonald Sharp2018-09-066-11/+25
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | lib: Convert ospf_opaque.c to use the err-card systemDonald Sharp2018-09-063-91/+122
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Modify ospf_packet.c to use new error-cards subsystemDonald Sharp2018-09-063-75/+151
| | | | | | | | | | | | Signed-off-by: Donald sharp <sharpd@cumulusnetworks.com>
* | | ospfd: Convert ospf_routemap.c to use error card subsystemDonald Sharp2018-09-063-2/+17
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>