summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2024-04-23 14:05:16 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2024-04-26 17:11:53 +0200
commitbb46027596524707480a423bd6ef63bad0a8ce0e (patch)
tree772b6258172d3e506b09d91a101e50ec33403e30
parenttopotests: add lower_up to expected interface flags (diff)
downloadfrr-bb46027596524707480a423bd6ef63bad0a8ce0e.tar.xz
frr-bb46027596524707480a423bd6ef63bad0a8ce0e.zip
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 <louis.scalbert@6wind.com>
-rw-r--r--zebra/fpm_listener.c2
1 files changed, 1 insertions, 1 deletions
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;