summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospf6d/ospf6_intra.c6
-rw-r--r--ospf6d/ospf6_message.c4
-rw-r--r--ospf6d/ospf6_spf.c19
-rw-r--r--pimd/pim_msdp.c2
-rw-r--r--tools/valgrind.supp48
5 files changed, 70 insertions, 9 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 85a2713c0a..277af4b1c5 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -1495,7 +1495,6 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
struct listnode *anode, *anext;
struct listnode *nnode, *rnode, *rnext;
struct ospf6_nexthop *nh, *rnh;
- char buf[PREFIX2STR_BUFFER];
bool route_found = false;
struct interface *ifp = NULL;
struct ospf6_lsa *lsa;
@@ -1679,8 +1678,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
if (ls_entry == NULL) {
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX))
zlog_debug(
- "%s: ls_prfix %s ls_entry not found.",
- __func__, buf);
+ "%s: ls_prfix %pFX ls_entry not found.",
+ __func__,
+ &o_path->ls_prefix);
continue;
}
lsa = ospf6_lsdb_lookup(o_path->origin.type,
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index 53f3c3468a..64de9bae41 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -1878,11 +1878,13 @@ static void ospf6_make_header(uint8_t type, struct ospf6_interface *oi,
oh->version = (uint8_t)OSPFV3_VERSION;
oh->type = type;
-
+ oh->length = 0;
oh->router_id = oi->area->ospf6->router_id;
oh->area_id = oi->area->area_id;
+ oh->checksum = 0;
oh->instance_id = oi->instance_id;
oh->reserved = 0;
+
stream_forward_endp(s, OSPF6_HEADER_SIZE);
}
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index e4de6ccf91..0e7a2f8fa8 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -440,11 +440,22 @@ void ospf6_spf_table_finish(struct ospf6_route_table *result_table)
}
static const char *const ospf6_spf_reason_str[] = {
- "R+", "R-", "N+", "N-", "L+", "L-", "R*", "N*", "C", "A", "GR"};
-
-void ospf6_spf_reason_string(unsigned int reason, char *buf, int size)
+ "R+", /* OSPF6_SPF_FLAGS_ROUTER_LSA_ADDED */
+ "R-", /* OSPF6_SPF_FLAGS_ROUTER_LSA_REMOVED */
+ "N+", /* OSPF6_SPF_FLAGS_NETWORK_LSA_ADDED */
+ "N-", /* OSPF6_SPF_FLAGS_NETWORK_LSA_REMOVED */
+ "L+", /* OSPF6_SPF_FLAGS_NETWORK_LINK_LSA_ADDED */
+ "L-", /* OSPF6_SPF_FLAGS_NETWORK_LINK_LSA_REMOVED */
+ "R*", /* OSPF6_SPF_FLAGS_ROUTER_LSA_ORIGINATED */
+ "N*", /* OSPF6_SPF_FLAGS_NETWORK_LSA_ORIGINATED */
+ "C", /* OSPF6_SPF_FLAGS_CONFIG_CHANGE */
+ "A", /* OSPF6_SPF_FLAGS_ASBR_STATUS_CHANGE */
+ "GR", /* OSPF6_SPF_FLAGS_GR_FINISH */
+};
+
+void ospf6_spf_reason_string(uint32_t reason, char *buf, int size)
{
- unsigned int bit;
+ uint32_t bit;
int len = 0;
if (!buf)
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index da8916ddbf..ddba33ff9d 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -720,7 +720,7 @@ static int pim_msdp_sa_comp(const void *p1, const void *p2)
/* XXX: this can use a bit of refining and extensions */
bool pim_msdp_peer_rpf_check(struct pim_msdp_peer *mp, struct in_addr rp)
{
- struct pim_nexthop nexthop;
+ struct pim_nexthop nexthop = {0};
if (mp->peer.s_addr == rp.s_addr) {
return true;
diff --git a/tools/valgrind.supp b/tools/valgrind.supp
index fbfb640b2a..88f46bf575 100644
--- a/tools/valgrind.supp
+++ b/tools/valgrind.supp
@@ -30,3 +30,51 @@
...
fun:sqlite3_step
}
+{
+ <libyang2 prefix_data stuff>
+ Memcheck:Leak
+ fun:calloc
+ fun:ly_store_prefix_data
+ ...
+ fun:yang_module_load
+}
+{
+ <libyang2 lys_compile_type_union>
+ Memcheck:Leak
+ fun:realloc
+ fun:lys_compile_type_union
+ ...
+ fun:yang_module_load
+}
+{
+ <libyang2 pcre2_compile>
+ Memcheck:Leak
+ fun:malloc
+ fun:pcre2_compile_8
+ ...
+ fun:yang_module_load
+}
+{
+ <libyang2 lys_compile_type_patterns malloc>
+ Memcheck:Leak
+ fun:malloc
+ fun:lys_compile_type_patterns
+ ...
+ fun:yang_module_load
+}
+{
+ <libyang2 lys_compile_type_patterns calloc>
+ Memcheck:Leak
+ fun:calloc
+ fun:lys_compile_type_patterns
+ ...
+ fun:yang_module_load
+}
+{
+ <libyang2 lys_compile_type>
+ Memcheck:Leak
+ fun:calloc
+ fun:lys_compile_type
+ ...
+ fun:yang_module_load
+}