mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
bgpd: don't call strtol on null pointer
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
d7fa34c1bc
commit
4c9dee9878
@ -1007,7 +1007,7 @@ bgp_maxpaths_config_vty (struct vty *vty, int peer_type, const char *mpaths,
|
|||||||
u_int16_t options, int set)
|
u_int16_t options, int set)
|
||||||
{
|
{
|
||||||
struct bgp *bgp;
|
struct bgp *bgp;
|
||||||
u_int16_t maxpaths = strtol(mpaths, NULL, 10);
|
u_int16_t maxpaths = 0;
|
||||||
int ret;
|
int ret;
|
||||||
afi_t afi;
|
afi_t afi;
|
||||||
safi_t safi;
|
safi_t safi;
|
||||||
@ -1017,7 +1017,10 @@ bgp_maxpaths_config_vty (struct vty *vty, int peer_type, const char *mpaths,
|
|||||||
safi = bgp_node_safi (vty);
|
safi = bgp_node_safi (vty);
|
||||||
|
|
||||||
if (set)
|
if (set)
|
||||||
|
{
|
||||||
|
strtol(mpaths, NULL, 10);
|
||||||
ret = bgp_maximum_paths_set (bgp, afi, safi, peer_type, maxpaths, options);
|
ret = bgp_maximum_paths_set (bgp, afi, safi, peer_type, maxpaths, options);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ret = bgp_maximum_paths_unset (bgp, afi, safi, peer_type);
|
ret = bgp_maximum_paths_unset (bgp, afi, safi, peer_type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user