From: Martin Winter Date: Tue, 14 Dec 2021 13:53:53 +0000 (+0100) Subject: bgpd: fix BGP ORF Prefix-length matching X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=581c5ff4e29fadbb5ca1f2c6dca3ce110a1a6311;p=matthieu%2Ffrr.git 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 (cherry picked from commit e574b842a1584a245e8dbd6bf4e418bfd78ec7b7) --- diff --git a/lib/plist.c b/lib/plist.c index 2f9f06f43b..76dfd6813d 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1489,9 +1489,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;