From bb46027596524707480a423bd6ef63bad0a8ce0e Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Tue, 23 Apr 2024 14:05:16 +0200 Subject: zebra: fix fpm_listener compilation I don't know why it appears only now. > ../sdist/zebra/fpm_listener.c:420:8: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] > if (!RTNH_OK(rtnh, len)) { > ^~~~~~~~~~~~~~~~~~ > ../sdist/include/linux/rtnetlink.h:437:31: note: expanded from macro 'RTNH_OK' > ((int)(rtnh)->rtnh_len) <= (len)) len is set with RTA_PAYLOAD and should be an integer. > len = RTA_PAYLOAD(mpath_rtattr); > #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) Signed-off-by: Louis Scalbert --- zebra/fpm_listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/fpm_listener.c b/zebra/fpm_listener.c index 5ffc0561b..65067d2dd 100644 --- a/zebra/fpm_listener.c +++ b/zebra/fpm_listener.c @@ -405,7 +405,7 @@ static int netlink_msg_ctx_add_nh(struct netlink_msg_ctx *ctx, int if_index, static int parse_multipath_attr(struct netlink_msg_ctx *ctx, struct rtattr *mpath_rtattr) { - size_t len; + int len; struct rtnexthop *rtnh; struct rtattr *rtattrs[RTA_MAX + 1]; struct rtattr *gateway; -- cgit v1.2.3