]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Return enum RPKI_NOT_BEING_USED instead of 0
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 5 Apr 2022 12:52:40 +0000 (15:52 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 6 Apr 2022 07:35:37 +0000 (10:35 +0300)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_rpki.c

index 45fcbc86b78b5a8872a47128ec3fe7ec344e7984..5d6cbc63462be18af3d378a6d260403d71fe9db3 100644 (file)
@@ -729,7 +729,7 @@ static int rpki_validate_prefix(struct peer *peer, struct attr *attr,
        enum pfxv_state result;
 
        if (!is_synchronized())
-               return 0;
+               return RPKI_NOT_BEING_USED;
 
        // No aspath means route comes from iBGP
        if (!attr->aspath || !attr->aspath->segments) {
@@ -769,7 +769,7 @@ static int rpki_validate_prefix(struct peer *peer, struct attr *attr,
                break;
 
        default:
-               return 0;
+               return RPKI_NOT_BEING_USED;
        }
 
        // Do the actual validation
@@ -799,7 +799,7 @@ static int rpki_validate_prefix(struct peer *peer, struct attr *attr,
                        prefix, as_number);
                break;
        }
-       return 0;
+       return RPKI_NOT_BEING_USED;
 }
 
 static int add_cache(struct cache *cache)