mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 14:27:36 +00:00
ospf6d: fix redistribute configuration
ospf6_asbr_redistribute_unset must not be called if the redistribution is not yet configured, because it decrements redistribution counter and makes it negative in this case. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
2fdc4f8dea
commit
bf84c96dae
@ -1577,11 +1577,12 @@ DEFUN (ospf6_redistribute,
|
|||||||
if (type < 0)
|
if (type < 0)
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
|
||||||
red = ospf6_redist_add(ospf6, type, 0);
|
red = ospf6_redist_lookup(ospf6, type, 0);
|
||||||
if (!red)
|
if (!red)
|
||||||
return CMD_SUCCESS;
|
ospf6_redist_add(ospf6, type, 0);
|
||||||
|
else
|
||||||
|
ospf6_asbr_redistribute_unset(ospf6, red, type);
|
||||||
|
|
||||||
ospf6_asbr_redistribute_unset(ospf6, red, type);
|
|
||||||
ospf6_asbr_redistribute_set(ospf6, type);
|
ospf6_asbr_redistribute_set(ospf6, type);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -1607,11 +1608,12 @@ DEFUN (ospf6_redistribute_routemap,
|
|||||||
if (type < 0)
|
if (type < 0)
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
|
||||||
red = ospf6_redist_add(ospf6, type, 0);
|
red = ospf6_redist_lookup(ospf6, type, 0);
|
||||||
if (!red)
|
if (!red)
|
||||||
return CMD_SUCCESS;
|
red = ospf6_redist_add(ospf6, type, 0);
|
||||||
|
else
|
||||||
|
ospf6_asbr_redistribute_unset(ospf6, red, type);
|
||||||
|
|
||||||
ospf6_asbr_redistribute_unset(ospf6, red, type);
|
|
||||||
ospf6_asbr_routemap_set(red, argv[idx_word]->arg);
|
ospf6_asbr_routemap_set(red, argv[idx_word]->arg);
|
||||||
ospf6_asbr_redistribute_set(ospf6, type);
|
ospf6_asbr_redistribute_set(ospf6, type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user