mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 23:23:35 +00:00
Merge pull request #17294 from FRRouting/mergify/bp/stable/9.1/pr-17245
bgpd: fix crash when polling bgp4v2PathAttrTable (backport #17245)
This commit is contained in:
commit
02aa53f365
@ -887,7 +887,9 @@ static uint8_t *bgp4v2PathAttrTable(struct variable *v, oid name[],
|
||||
else
|
||||
return SNMP_IPADDRESS(bgp_empty_addr);
|
||||
case BGP4V2_NLRI_AS_PATH_CALC_LENGTH:
|
||||
return SNMP_INTEGER(path->attr->aspath->segments->length);
|
||||
return SNMP_INTEGER((path->attr->aspath && path->attr->aspath->segments)
|
||||
? path->attr->aspath->segments->length
|
||||
: 0);
|
||||
case BGP4V2_NLRI_AS_PATH:
|
||||
return aspath_snmp_pathseg(path->attr->aspath, var_len);
|
||||
case BGP4V2_NLRI_PATH_ATTR_UNKNOWN:
|
||||
|
Loading…
Reference in New Issue
Block a user