mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-24 21:22:35 +00:00
Merge pull request #14422 from cscarpitta/bugfix/fix-coverity-isis-srv6
isisd: Fix a bunch of coverity issues in IS-IS
This commit is contained in:
commit
1f5809e44f
@ -2751,7 +2751,7 @@ static int unpack_item_srv6_end_sid(uint16_t mtid, uint8_t len,
|
||||
void *dest, int indent)
|
||||
{
|
||||
struct isis_subtlvs *subtlvs = dest;
|
||||
struct isis_srv6_end_sid_subtlv *sid;
|
||||
struct isis_srv6_end_sid_subtlv *sid = NULL;
|
||||
size_t consume;
|
||||
uint8_t subsubtlv_len;
|
||||
|
||||
@ -2763,7 +2763,7 @@ static int unpack_item_srv6_end_sid(uint16_t mtid, uint8_t len,
|
||||
log, indent,
|
||||
"Not enough data left. (expected 19 or more bytes, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
sid = XCALLOC(MTYPE_ISIS_SUBTLV, sizeof(*sid));
|
||||
|
@ -1017,12 +1017,15 @@ void isis_zebra_srv6_adj_sid_install(struct srv6_adjacency *sra)
|
||||
struct seg6local_context ctx = {};
|
||||
uint16_t prefixlen = IPV6_MAX_BITLEN;
|
||||
struct interface *ifp;
|
||||
struct isis_circuit *circuit = sra->adj->circuit;
|
||||
struct isis_area *area = circuit->area;
|
||||
struct isis_circuit *circuit;
|
||||
struct isis_area *area;
|
||||
|
||||
if (!sra)
|
||||
return;
|
||||
|
||||
circuit = sra->adj->circuit;
|
||||
area = circuit->area;
|
||||
|
||||
sr_debug("ISIS-SRv6 (%s): setting adjacency SID %pI6", area->area_tag,
|
||||
&sra->sid);
|
||||
|
||||
@ -1071,12 +1074,15 @@ void isis_zebra_srv6_adj_sid_uninstall(struct srv6_adjacency *sra)
|
||||
enum seg6local_action_t action = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC;
|
||||
struct interface *ifp;
|
||||
uint16_t prefixlen = IPV6_MAX_BITLEN;
|
||||
struct isis_circuit *circuit = sra->adj->circuit;
|
||||
struct isis_area *area = circuit->area;
|
||||
struct isis_circuit *circuit;
|
||||
struct isis_area *area;
|
||||
|
||||
if (!sra)
|
||||
return;
|
||||
|
||||
circuit = sra->adj->circuit;
|
||||
area = circuit->area;
|
||||
|
||||
switch (sra->behavior) {
|
||||
case SRV6_ENDPOINT_BEHAVIOR_END_X:
|
||||
prefixlen = IPV6_MAX_BITLEN;
|
||||
@ -1130,6 +1136,9 @@ static int isis_zebra_process_srv6_locator_chunk(ZAPI_CALLBACK_ARGS)
|
||||
enum srv6_endpoint_behavior_codepoint behavior;
|
||||
bool allocated = false;
|
||||
|
||||
if (!isis)
|
||||
return -1;
|
||||
|
||||
/* Decode the received zebra message */
|
||||
s = zclient->ibuf;
|
||||
if (zapi_srv6_locator_chunk_decode(s, chunk) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user