mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:50:29 +00:00
Merge pull request #10313 from anlancs/fix-ospf-check
ospfd,ospf6d: fix wrong comparison of routemap name
This commit is contained in:
commit
421ea99ebf
@ -1936,13 +1936,13 @@ DEFPY (ospf6_default_route_originate,
|
|||||||
if (mtype_str == NULL)
|
if (mtype_str == NULL)
|
||||||
mtype = -1;
|
mtype = -1;
|
||||||
|
|
||||||
/* To check ,if user is providing same route map */
|
/* To check if user is providing same route map */
|
||||||
if ((rtmap == ROUTEMAP_NAME(red))
|
if ((!rtmap && !ROUTEMAP_NAME(red)) ||
|
||||||
|| (rtmap && ROUTEMAP_NAME(red)
|
(rtmap && ROUTEMAP_NAME(red) &&
|
||||||
&& (strcmp(rtmap, ROUTEMAP_NAME(red)) == 0)))
|
(strcmp(rtmap, ROUTEMAP_NAME(red)) == 0)))
|
||||||
sameRtmap = true;
|
sameRtmap = true;
|
||||||
|
|
||||||
/* Don't allow if the same lsa is aleardy originated. */
|
/* Don't allow if the same lsa is already originated. */
|
||||||
if ((sameRtmap) && (red->dmetric.type == mtype)
|
if ((sameRtmap) && (red->dmetric.type == mtype)
|
||||||
&& (red->dmetric.value == mval)
|
&& (red->dmetric.value == mval)
|
||||||
&& (cur_originate == default_originate))
|
&& (cur_originate == default_originate))
|
||||||
|
@ -9275,7 +9275,7 @@ DEFUN (ospf_default_information_originate,
|
|||||||
struct ospf_redist *red;
|
struct ospf_redist *red;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
int cur_originate = ospf->default_originate;
|
int cur_originate = ospf->default_originate;
|
||||||
int sameRtmap = 0;
|
bool sameRtmap = false;
|
||||||
char *rtmap = NULL;
|
char *rtmap = NULL;
|
||||||
|
|
||||||
red = ospf_redist_add(ospf, DEFAULT_ROUTE, 0);
|
red = ospf_redist_add(ospf, DEFAULT_ROUTE, 0);
|
||||||
@ -9300,13 +9300,13 @@ DEFUN (ospf_default_information_originate,
|
|||||||
if (argv_find(argv, argc, "WORD", &idx))
|
if (argv_find(argv, argc, "WORD", &idx))
|
||||||
rtmap = argv[idx]->arg;
|
rtmap = argv[idx]->arg;
|
||||||
|
|
||||||
/* To check ,if user is providing same route map */
|
/* To check if user is providing same route map */
|
||||||
if ((rtmap == ROUTEMAP_NAME(red)) ||
|
if ((!rtmap && !ROUTEMAP_NAME(red)) ||
|
||||||
(rtmap && ROUTEMAP_NAME(red)
|
(rtmap && ROUTEMAP_NAME(red) &&
|
||||||
&& (strcmp(rtmap, ROUTEMAP_NAME(red)) == 0)))
|
(strcmp(rtmap, ROUTEMAP_NAME(red)) == 0)))
|
||||||
sameRtmap = 1;
|
sameRtmap = true;
|
||||||
|
|
||||||
/* Don't allow if the same lsa is aleardy originated. */
|
/* Don't allow if the same lsa is already originated. */
|
||||||
if ((sameRtmap)
|
if ((sameRtmap)
|
||||||
&& (red->dmetric.type == type)
|
&& (red->dmetric.type == type)
|
||||||
&& (red->dmetric.value == metric)
|
&& (red->dmetric.value == metric)
|
||||||
|
Loading…
Reference in New Issue
Block a user