summaryrefslogtreecommitdiff
path: root/lib/plist.c
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2021-12-14 14:53:53 +0100
committerMartin Winter <mwinter@opensourcerouting.org>2021-12-14 14:53:53 +0100
commite574b842a1584a245e8dbd6bf4e418bfd78ec7b7 (patch)
treef21fcba9af7588fa087409d8b3814ba537d70231 /lib/plist.c
parenta64829d3c55b9c83e275d78698eab0899ebfcaae (diff)
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>
Diffstat (limited to 'lib/plist.c')
-rw-r--r--lib/plist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/plist.c b/lib/plist.c
index 046ccadc09..d6a63c1b0c 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -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;