mirror_frr/ospfd
Donald Sharp 37a74717c7 *: Fix usage of bfd_adj_event
Valgrind reports:

469901-==469901==
469901-==469901== Conditional jump or move depends on uninitialised value(s)
469901:==469901==    at 0x3A090D: bgp_bfd_dest_update (bgp_bfd.c:416)
469901-==469901==    by 0x497469E: zclient_read (zclient.c:3701)
469901-==469901==    by 0x4955AEC: thread_call (thread.c:1684)
469901-==469901==    by 0x48FF64E: frr_run (libfrr.c:1126)
469901-==469901==    by 0x213AB3: main (bgp_main.c:540)
469901-==469901==  Uninitialised value was created by a stack allocation
469901:==469901==    at 0x3A0725: bgp_bfd_dest_update (bgp_bfd.c:376)
469901-==469901==
469901-==469901== Conditional jump or move depends on uninitialised value(s)
469901:==469901==    at 0x3A093C: bgp_bfd_dest_update (bgp_bfd.c:421)
469901-==469901==    by 0x497469E: zclient_read (zclient.c:3701)
469901-==469901==    by 0x4955AEC: thread_call (thread.c:1684)
469901-==469901==    by 0x48FF64E: frr_run (libfrr.c:1126)
469901-==469901==    by 0x213AB3: main (bgp_main.c:540)
469901-==469901==  Uninitialised value was created by a stack allocation
469901:==469901==    at 0x3A0725: bgp_bfd_dest_update (bgp_bfd.c:376)

On looking at bgp_bfd_dest_update the function call into bfd_get_peer_info
when it fails to lookup the ifindex ifp pointer just returns leaving
the dest and src prefix pointers pointing to whatever was passed in.

Let's do two things:

a) The src pointer was sometimes assumed to be passed in and sometimes not.
Forget that.  Make it always be passed in
b) memset the src and dst pointers to be all zeros.  Then when we look
at either of the pointers we are not making decisions based upon random
data in the pointers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-07 14:59:53 -05:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
ChangeLog.opaque.txt Initial revision 2003-02-03 16:31:16 +00:00
Makefile build: non-recursive ospf* 2017-08-04 11:09:50 +02:00
ospf_abr.c ospfd: fix NSSA translator 2020-11-18 23:23:14 -08:00
ospf_abr.h ospfd: fix NSSA translator 2020-11-18 23:23:14 -08:00
ospf_api.c ospfd: Limit possible message read to our buffer size 2020-04-22 07:31:07 -04:00
ospf_api.h ospfd: Remove ORIGINAL_CODING check 2019-11-19 07:47:19 -05:00
ospf_apiserver.c * : update signature of thread_cancel api 2020-10-23 08:59:34 -04:00
ospf_apiserver.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_asbr.c ospfd: Cleanup some clang sa issues 2020-11-04 11:47:57 -05:00
ospf_asbr.h ospfd: External LSA summarisation config commands. 2020-11-01 22:02:37 -08:00
ospf_ase.c ospfd: Remove #if 0 code 2021-01-28 13:21:12 -05:00
ospf_ase.h *: reindent 2017-07-17 14:04:07 +02:00
ospf_bfd.c *: Fix usage of bfd_adj_event 2021-02-07 14:59:53 -05:00
ospf_bfd.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
ospf_dump_api.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_dump_api.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_dump.c ospfd: Add 'debug ospf ti-lfa' command 2021-01-19 15:32:13 +00:00
ospf_dump.h ospfd: Add 'debug ospf ti-lfa' command 2021-01-19 15:32:13 +00:00
ospf_errors.c ospfd: Add Segment Routing Local Block 2020-08-20 14:37:40 +02:00
ospf_errors.h ospfd: Add Segment Routing Local Block 2020-08-20 14:37:40 +02:00
ospf_ext.c ospfd: Add more Segment Routing controls 2020-10-23 19:01:15 +02:00
ospf_ext.h ospfd: Add Segment Routing Local Block 2020-08-20 14:37:40 +02:00
ospf_flood.c ospfd: OSPF external summarisation scenarios 2020-11-01 22:34:11 -08:00
ospf_flood.h ospfd: OSPFv2 VRF Support 2017-10-03 09:15:19 -07:00
ospf_gr_helper.c * : clean up format specifiers for gcc-10 2020-11-04 16:56:17 -05:00
ospf_gr_helper.h ospfd: make reason string production safer 2020-10-14 12:51:52 -04:00
ospf_ia.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_ia.h *: reindent 2017-07-17 14:04:07 +02:00
ospf_interface.c ospfd: Set Curr_mtu to when we get the mtu 2020-12-02 06:55:31 -05:00
ospf_interface.h ospfd : Fix for ospf dead interval and hello due. 2020-09-19 00:29:25 -07:00
ospf_ism.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_ism.h *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
ospf_ldp_sync.c ospfd: Prevent sending of uninited data to zebra 2021-01-30 14:13:34 -05:00
ospf_ldp_sync.h ldpd, isisd, ospfd: Remove periodic ldp-sync hello message 2020-12-09 14:11:38 -05:00
ospf_lsa.c Merge pull request #7953 from mjstapp/fix_more_ntoa 2021-01-29 08:01:03 -03:00
ospf_lsa.h ospfd: TI-LFA basic infrastructure and algorithms 2021-01-19 15:32:13 +00:00
ospf_lsdb.c ospfd: replace pqueue_* with DECLARE_SKIPLIST 2019-04-27 19:33:45 +02:00
ospf_lsdb.h ospfd: replace pqueue_* with DECLARE_SKIPLIST 2019-04-27 19:33:45 +02:00
ospf_main.c ospfd: ldp-igp-sync feature: adding ospf support 2020-09-09 14:38:44 -04:00
ospf_memory.c ospfd: TI-LFA basic infrastructure and algorithms 2021-01-19 15:32:13 +00:00
ospf_memory.h ospfd: TI-LFA basic infrastructure and algorithms 2021-01-19 15:32:13 +00:00
ospf_neighbor.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_neighbor.h ospfd: ospf GR helper data structure definitions. 2020-09-21 23:59:59 -07:00
ospf_network.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_network.h ospfd: basic support for VRF NETNS backend 2018-02-27 11:11:24 +01:00
ospf_nsm.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_nsm.h * : update signature of thread_cancel api 2020-10-23 08:59:34 -04:00
ospf_opaque.c ospfd: reset mpls-te prior to ospf router removal 2020-11-16 12:29:35 +01:00
ospf_opaque.h Merge pull request #7448 from mjstapp/fix_gcc10_formats 2020-11-10 11:23:02 -05:00
ospf_packet.c * : update signature of thread_cancel api 2020-10-23 08:59:34 -04:00
ospf_packet.h ospfd: fix typos 2020-10-07 01:53:13 -07:00
ospf_ri.c ospfd: replace inet_ntoa 2020-10-22 13:37:25 -04:00
ospf_ri.h ospfd: Add Segment Routing Local Block 2020-08-20 14:37:40 +02:00
ospf_route.c ospfd: enhance TI-LFA memory management 2021-01-19 15:32:13 +00:00
ospf_route.h tests: Integrate unit tests for TI-LFA 2021-01-19 15:32:13 +00:00
ospf_routemap.c ospfd: Prevent crash by accessing memory not owned. 2020-11-25 09:49:28 -05:00
ospf_snmp.c ospfd: ospf_nbr_nbma_lookup_next always returns NULL 2021-01-28 14:56:11 -05:00
ospf_spf.c ospfd: Remove #if 0 code 2021-01-28 13:21:12 -05:00
ospf_spf.h ospfd: Add support for TI-LFA node protection 2021-01-19 15:32:13 +00:00
ospf_sr.c ospfd: Make use of adjacency SIDs in TI-LFA 2021-01-19 15:32:13 +00:00
ospf_sr.h ospfd: Make use of adjacency SIDs in TI-LFA 2021-01-19 15:32:13 +00:00
ospf_te.c ospfd: reset mpls-te prior to ospf router removal 2020-11-16 12:29:35 +01:00
ospf_te.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_ti_lfa.c ospfd: Minor memory fixes 2021-01-19 15:32:13 +00:00
ospf_ti_lfa.h ospfd: Add support for TI-LFA node protection 2021-01-19 15:32:13 +00:00
ospf_vty.c *: fix all backets 2021-02-02 19:11:25 +03:00
ospf_vty.h ospfd: TI-LFA basic infrastructure and algorithms 2021-01-19 15:32:13 +00:00
ospf_zebra.c ospfd: Fix backup path RIB handling 2021-01-19 15:32:13 +00:00
ospf_zebra.h ospfd: Add Label Manager for Segment Routing 2020-08-20 14:33:00 +02:00
OSPF-ALIGNMENT.txt *: Remove cvs control points 2017-12-05 17:28:12 -05:00
ospfd.c ospfd: ospf_nbr_nbma_lookup_next always returns NULL 2021-01-28 14:56:11 -05:00
ospfd.conf.sample Initial revision 2002-12-13 20:15:29 +00:00
ospfd.h ospfd: ospf_nbr_nbma_lookup_next always returns NULL 2021-01-28 14:56:11 -05:00
subdir.am ospfd: TI-LFA basic infrastructure and algorithms 2021-01-19 15:32:13 +00:00