summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-01-10 12:17:19 +0200
committerGitHub <noreply@github.com>2024-01-10 12:17:19 +0200
commit26be39c2f145630feb2ad69dc32c44c66dcb3c1f (patch)
treeeb5fe50d8fbe7343634f4aaf6b62c1d17161aa17
parent4c875482a5097288a0fa20fc91c079c93e98c0d3 (diff)
parent54ed53f36f42b52fd84ad010d31031454f20bd13 (diff)
Merge pull request #15100 from donaldsharp/SA_problems_local
Sa problems local
-rw-r--r--bgpd/bgp_packet.c2
-rw-r--r--bgpd/bgp_snmp_bgp4v2.c8
-rw-r--r--ospf6d/ospf6_neighbor.c2
-rw-r--r--pimd/pim_upstream.c2
-rw-r--r--zebra/redistribute.c8
5 files changed, 11 insertions, 11 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index ca8dade8e8..f94b64d0bd 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -3349,7 +3349,7 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action,
memcpy(&str, data, len);
str[len] = '\0';
}
- data += len;
+ /* data += len; In case new code is ever added */
if (len) {
XFREE(MTYPE_BGP_PEER_HOST, peer->domainname);
diff --git a/bgpd/bgp_snmp_bgp4v2.c b/bgpd/bgp_snmp_bgp4v2.c
index 48db73a343..0c8ed33d43 100644
--- a/bgpd/bgp_snmp_bgp4v2.c
+++ b/bgpd/bgp_snmp_bgp4v2.c
@@ -436,7 +436,6 @@ bgp4v2PathAttrLookup(struct variable *v, oid name[], size_t *length,
struct bgp_path_info *path, *min;
struct bgp_dest *dest;
union sockunion su;
- unsigned int len;
struct ipaddr paddr = {};
size_t namelen = v ? v->namelen : BGP4V2_NLRI_ENTRY_OFFSET;
sa_family_t family;
@@ -544,11 +543,9 @@ bgp4v2PathAttrLookup(struct variable *v, oid name[], size_t *length,
/* Set OID offset for prefix type */
offset = name + namelen;
offsetlen = *length - namelen;
- len = offsetlen;
if (offsetlen == 0) {
dest = bgp_table_top(bgp->rib[afi][SAFI_UNICAST]);
- safi = SAFI_UNICAST;
} else {
/* bgp4V2NlriAfi is already get */
@@ -595,11 +592,6 @@ bgp4v2PathAttrLookup(struct variable *v, oid name[], size_t *length,
return NULL;
if (offsetlen > 0) {
- len = offsetlen;
- if (len > afi_len)
- len = afi_len;
-
-
/* get bgp4V2PeerRemoteAddrType */
peer_addr_type = *offset;
if (peer_addr_type == IANA_AFI_IPV4)
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 0cf3aade10..a6089b2641 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -741,7 +741,7 @@ DEFPY(ipv6_ospf6_p2xp_neigh, ipv6_ospf6_p2xp_neigh_cmd,
return CMD_SUCCESS;
}
- p2xp_cfg = ospf6_if_p2xp_get(oi, &neighbor);
+ (void)ospf6_if_p2xp_get(oi, &neighbor);
return CMD_SUCCESS;
}
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 335c8a454b..45c4df0e7e 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -909,7 +909,7 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim,
* Set the right RPF so that future changes will
* be right
*/
- rpf_result = pim_rpf_update(pim, up, NULL, __func__);
+ (void)pim_rpf_update(pim, up, NULL, __func__);
pim_upstream_keep_alive_timer_start(
up, pim->keep_alive_time);
}
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 18eac0044a..70ace35a86 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -332,6 +332,14 @@ void redistribute_delete(const struct route_node *rn,
/* Send a delete for the 'old' re to any subscribed client. */
if (zebra_redistribute_check(rn, old_re, client)) {
+ /*
+ * SA is complaining that old_re could be false
+ * SA is wrong because old_re is checked for NULL
+ * in zebra_redistribute_check and false is
+ * returned in that case. Let's just make SA
+ * happy.
+ */
+ assert(old_re);
is_table_direct = zebra_redistribute_is_table_direct(old_re);
zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_DEL,
client, rn, old_re,