From 9a70684b76e9e1246cf8b8599c8feb1b14bc76da Mon Sep 17 00:00:00 2001 From: guanjing Date: Tue, 11 Mar 2025 08:51:19 +0900 Subject: [PATCH] selftests: netfilter: Fix missing return values in conntrack_dump_flush BugLink: https://bugs.launchpad.net/bugs/2101915 [ Upstream commit 041bd1e4f2d82859690cd8b41c35f0f9404c3770 ] Fix the bug of some functions were missing return values. Fixes: eff3c558bb7e ("netfilter: ctnetlink: support filtering by zone") Signed-off-by: Guan Jing Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin [koichiroden: applied to an older path due to missing commit: 3f189349e52a ("selftests: netfilter: move to net subdir")] Signed-off-by: Koichiro Den Signed-off-by: Stefan Bader --- tools/testing/selftests/netfilter/conntrack_dump_flush.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/netfilter/conntrack_dump_flush.c b/tools/testing/selftests/netfilter/conntrack_dump_flush.c index a1da8e66650c..66b3057148a8 100644 --- a/tools/testing/selftests/netfilter/conntrack_dump_flush.c +++ b/tools/testing/selftests/netfilter/conntrack_dump_flush.c @@ -43,6 +43,8 @@ static int build_cta_tuple_v4(struct nlmsghdr *nlh, int type, mnl_attr_nest_end(nlh, nest_proto); mnl_attr_nest_end(nlh, nest); + + return 0; } static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, @@ -71,6 +73,8 @@ static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, mnl_attr_nest_end(nlh, nest_proto); mnl_attr_nest_end(nlh, nest); + + return 0; } static int build_cta_proto(struct nlmsghdr *nlh) @@ -90,6 +94,8 @@ static int build_cta_proto(struct nlmsghdr *nlh) mnl_attr_nest_end(nlh, nest_proto); mnl_attr_nest_end(nlh, nest); + + return 0; } static int conntrack_data_insert(struct mnl_socket *sock, struct nlmsghdr *nlh,