]> 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)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 24 Feb 2023 14:29:24 +0000 (14:29 +0000)
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>
(cherry picked from commit d782e3ffa24832b05aec2871332a3a8523ab3e97)

bgpd/bgp_updgrp.c
bgpd/bgp_vty.c
bgpd/bgpd.c

index 9ca57f08daa55ffb2205a597c2f44aa7a67df4e2..a91c9411fe59ff794a5c1a65d94909b1ef281099 100644 (file)
@@ -332,7 +332,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;
@@ -516,8 +516,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 3acd72f21008d5c30cf11067d290f1d892977a89..4ec087641142911540f79c5202941ec0cc4ca89f 100644 (file)
@@ -5555,7 +5555,7 @@ DEFUN (no_neighbor_capability_enhe,
 }
 
 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;
@@ -5574,13 +5574,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 0610ff4f1ca90e34a600114ee6f91b135ce29a37..1abd8e9a87a120d0424a7d1ad44ebd1ba96e7df6 100644 (file)
@@ -2704,7 +2704,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);
 
@@ -4449,7 +4449,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)) {