]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: event_hdl: fix rid storage type
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 22 Feb 2023 08:26:41 +0000 (09:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:17 +0000 (08:58 +0200)
rid is stored as a uint32_t within struct server, but it was stored as
a signed int within the server event data struct.

Switching from signed int to uint32_t in event_hdl_cb_data_server struct
to make sure it won't overflow.

If 129ecf441 ("MINOR: server/event_hdl: add support for SERVER_ADD and SERVER_DEL events")
is being backported, then this commit should be backported with it.

include/haproxy/server-t.h

index d3e49d81fa57ee187d5dbbad26f1ddaea246ef79..e7f7747629e56359dc28dfce5b27d229adc9f762 100644 (file)
@@ -430,7 +430,7 @@ struct event_hdl_cb_data_server {
                char name[64];       /* server name/id */
                char proxy_name[64]; /* id of proxy the server belongs to */
                int puid;            /* proxy-unique server ID */
-               int rid;             /* server id revision */
+               uint32_t rid;        /* server id revision */
                unsigned int flags;  /* server flags */
        } safe;
        struct {