From f6c5c830bc65554ad67db1b0077179384678cab6 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 23 Feb 2023 23:02:35 +0200 Subject: [PATCH] bgpd: Convert missing uint32_t to uint64_t for for af_flags/flags 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 (cherry picked from commit d782e3ffa24832b05aec2871332a3a8523ab3e97) --- bgpd/bgp_updgrp.c | 6 +++--- bgpd/bgp_vty.c | 6 +++--- bgpd/bgpd.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 9ca57f08da..a91c9411fe 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -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; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 3acd72f210..4ec0876411 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -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); } diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 0610ff4f1c..1abd8e9a87 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -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)) { -- 2.39.5