Skip to content

Commit

Permalink
selftests: netfilter: Fix missing return values in conntrack_dump_flush
Browse files Browse the repository at this point in the history
[ Upstream commit 041bd1e ]

Fix the bug of some functions were missing return values.

Fixes: eff3c55 ("netfilter: ctnetlink: support filtering by zone")
Signed-off-by: Guan Jing <guanjing@cmss.chinamobile.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
guanjing authored and gregkh committed Dec 5, 2024
1 parent 56e5c00 commit fd741c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit fd741c2

Please sign in to comment.