]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Convert missing uint32_t to uint64_t for for af_flags/flags
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 23 Feb 2023 21:02:35 +0000 (23:02 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 23 Feb 2023 21:02:35 +0000 (23:02 +0200)
It was hard to catch those unless using higher values than uint32_t, but
already hit, it's time to fix completely.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_updgrp.c
bgpd/bgp_vty.c
bgpd/bgpd.c

index a32cdb1ba42c1a212d1b928ece14083af1d525ce..277492157fdf2a2119d2cce4954eab28a4d605be 100644 (file)
@@ -317,7 +317,7 @@ static unsigned int updgrp_hash_key_make(const void *p)
        const struct update_group *updgrp;
        const struct peer *peer;
        const struct bgp_filter *filter;
-       uint32_t flags;
+       uint64_t flags;
        uint32_t key;
        afi_t afi;
        safi_t safi;
@@ -501,8 +501,8 @@ static bool updgrp_hash_cmp(const void *p1, const void *p2)
        const struct update_group *grp2;
        const struct peer *pe1;
        const struct peer *pe2;
-       uint32_t flags1;
-       uint32_t flags2;
+       uint64_t flags1;
+       uint64_t flags2;
        const struct bgp_filter *fl1;
        const struct bgp_filter *fl2;
        afi_t afi;
index 928a41e9ede0fa4504f0633939d49d49a837d775..cf9a05b198f582dbb7dfe5f10c925c65c7335ca8 100644 (file)
@@ -5671,7 +5671,7 @@ DEFPY(neighbor_capability_software_version,
 }
 
 static int peer_af_flag_modify_vty(struct vty *vty, const char *peer_str,
-                                  afi_t afi, safi_t safi, uint32_t flag,
+                                  afi_t afi, safi_t safi, uint64_t flag,
                                   int set)
 {
        int ret;
@@ -5690,13 +5690,13 @@ static int peer_af_flag_modify_vty(struct vty *vty, const char *peer_str,
 }
 
 static int peer_af_flag_set_vty(struct vty *vty, const char *peer_str,
-                               afi_t afi, safi_t safi, uint32_t flag)
+                               afi_t afi, safi_t safi, uint64_t flag)
 {
        return peer_af_flag_modify_vty(vty, peer_str, afi, safi, flag, 1);
 }
 
 static int peer_af_flag_unset_vty(struct vty *vty, const char *peer_str,
-                                 afi_t afi, safi_t safi, uint32_t flag)
+                                 afi_t afi, safi_t safi, uint64_t flag)
 {
        return peer_af_flag_modify_vty(vty, peer_str, afi, safi, flag, 0);
 }
index 26da5d3e26be12d35a04f866e4adb4ed1b9dfb50..f97004dc1278bf06df91450574b812a490fe847d 100644 (file)
@@ -2726,7 +2726,7 @@ struct peer_group *peer_group_get(struct bgp *bgp, const char *name)
 static void peer_group2peer_config_copy(struct peer_group *group,
                                        struct peer *peer)
 {
-       uint32_t flags_tmp;
+       uint64_t flags_tmp;
        struct peer *conf;
        bool config_node = !!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE);
 
@@ -4518,7 +4518,7 @@ static int peer_flag_action_set(const struct peer_flag_action *action_list,
        return found;
 }
 
-static void peer_flag_modify_action(struct peer *peer, uint32_t flag)
+static void peer_flag_modify_action(struct peer *peer, uint64_t flag)
 {
        if (flag == PEER_FLAG_SHUTDOWN) {
                if (CHECK_FLAG(peer->flags, flag)) {