From: Pablo Neira Ayuso Date: Tue, 16 Jul 2013 20:35:07 +0000 (+0200) Subject: mnl: use nft_*_list_add_tail X-Git-Tag: v0.099~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f6c75e40ac8898feaa5ca39f7934268a7f7796a;p=thirdparty%2Fnftables.git mnl: use nft_*_list_add_tail Adapt it to the semantic fix that has been applied to libnftables, nft_*_list_add now inserts nodes, instead of appending them. Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/mnl.c b/src/mnl.c index ea9637c8..a58f7ea8 100644 --- a/src/mnl.c +++ b/src/mnl.c @@ -93,7 +93,7 @@ static int rule_cb(const struct nlmsghdr *nlh, void *data) if (nft_rule_nlmsg_parse(nlh, r) < 0) goto err_free; - nft_rule_list_add(r, nlr_list); + nft_rule_list_add_tail(r, nlr_list); return MNL_CB_OK; err_free: @@ -169,7 +169,7 @@ static int chain_cb(const struct nlmsghdr *nlh, void *data) if (nft_chain_nlmsg_parse(nlh, c) < 0) goto err_free; - nft_chain_list_add(c, nlc_list); + nft_chain_list_add_tail(c, nlc_list); return MNL_CB_OK; err_free: @@ -264,7 +264,7 @@ static int table_cb(const struct nlmsghdr *nlh, void *data) if (nft_table_nlmsg_parse(nlh, t) < 0) goto err_free; - nft_table_list_add(t, nlt_list); + nft_table_list_add_tail(t, nlt_list); return MNL_CB_OK; err_free: @@ -365,7 +365,7 @@ static int set_cb(const struct nlmsghdr *nlh, void *data) if (nft_set_nlmsg_parse(nlh, s) < 0) goto err_free; - nft_set_list_add(s, nls_list); + nft_set_list_add_tail(s, nls_list); return MNL_CB_OK; err_free: