]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_rpki.c
Merge pull request #5703 from ton31337/feature/limit_outgoing_prefixes
[mirror_frr.git] / bgpd / bgp_rpki.c
index 352e3b87e81fdb0adaa4f610b61b36851b63ac47..7247210c93d7305300e645a88fd1830271ca8525 100644 (file)
@@ -143,7 +143,7 @@ static int rpki_sync_socket_rtr;
 static int rpki_sync_socket_bgpd;
 
 static struct cmd_node rpki_node = {RPKI_NODE, "%s(config-rpki)# ", 1};
-static struct route_map_rule_cmd route_match_rpki_cmd = {
+static const struct route_map_rule_cmd route_match_rpki_cmd = {
        "rpki", route_match, route_match_compile, route_match_free};
 
 static void *malloc_wrapper(size_t size)
@@ -406,7 +406,7 @@ static int bgpd_sync_callback(struct thread *thread)
                }
        }
 
-       prefix_free(prefix);
+       prefix_free(&prefix);
        return 0;
 }
 
@@ -1234,7 +1234,8 @@ DEFPY (show_rpki_prefix,
                const struct pfx_record *record = &matches[i];
 
                if (record->max_len >= prefix->prefixlen
-                   && ((asn != 0 && asn == record->asn) || asn == 0)) {
+                   && ((asn != 0 && (uint32_t)asn == record->asn)
+                       || asn == 0)) {
                        print_record(&matches[i], vty);
                }
        }