Skip to content

Commit

Permalink
Merge pull request #15100 from donaldsharp/SA_problems_local
Browse files Browse the repository at this point in the history
Sa problems local
  • Loading branch information
ton31337 authored Jan 10, 2024
2 parents 4c87548 + 54ed53f commit 26be39c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions bgpd/bgp_snmp_bgp4v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ospf6d/ospf6_neighbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion pimd/pim_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 8 additions & 0 deletions zebra/redistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 26be39c

Please sign in to comment.