bgpd: fix BGP ORF Prefix-length matching

BGP ORF Prefix list incorrectly rejected list with a GE or LE to match the actual
prefix.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
Martin Winter 2021-12-14 14:53:53 +01:00
parent a64829d3c5
commit e574b842a1
No known key found for this signature in database
GPG Key ID: 05A4ECF8C0102306

View File

@ -1480,9 +1480,9 @@ int prefix_bgp_orf_set(char *name, afi_t afi, struct orf_prefix *orfp,
struct prefix_list_entry *pentry;
/* ge and le value check */
if (orfp->ge && orfp->ge <= orfp->p.prefixlen)
if (orfp->ge && orfp->ge < orfp->p.prefixlen)
return CMD_WARNING_CONFIG_FAILED;
if (orfp->le && orfp->le <= orfp->p.prefixlen)
if (orfp->le && orfp->le < orfp->p.prefixlen)
return CMD_WARNING_CONFIG_FAILED;
if (orfp->le && orfp->ge > orfp->le)
return CMD_WARNING_CONFIG_FAILED;