diff options
author | Thomas Graf <tgr@plip.localdomain> | 2008-10-20 11:12:13 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@plip.localdomain> | 2008-10-20 11:12:13 (GMT) |
commit | cfcfca070355b246028df60da79813f09ed65755 (patch) | |
tree | f61521813cc56aef4cfc0c6464cca9aa11b2fb2f /lib/netfilter | |
parent | 2bdee95a765457fe4206b89d51974ae56e75c588 (diff) | |
download | libnl-cfcfca070355b246028df60da79813f09ed65755.zip libnl-cfcfca070355b246028df60da79813f09ed65755.tar.gz libnl-cfcfca070355b246028df60da79813f09ed65755.tar.bz2 |
Add internal wait_for_ack() which only waits for ACK if !NL_NO_AUTO_ACK
This changeset ensures that internal code properly synchronizes to
ACKs if ACKs are enabled and otherwise return immediately.
Diffstat (limited to 'lib/netfilter')
-rw-r--r-- | lib/netfilter/ct.c | 6 | ||||
-rw-r--r-- | lib/netfilter/log.c | 2 | ||||
-rw-r--r-- | lib/netfilter/queue.c | 2 | ||||
-rw-r--r-- | lib/netfilter/queue_msg.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/netfilter/ct.c b/lib/netfilter/ct.c index d4d5a0c..9d61b6c 100644 --- a/lib/netfilter/ct.c +++ b/lib/netfilter/ct.c @@ -488,7 +488,7 @@ int nfnl_ct_add(struct nl_sock *sk, const struct nfnl_ct *ct, int flags) if (err < 0) return err; - return nl_wait_for_ack(sk); + return wait_for_ack(sk); } int nfnl_ct_build_delete_request(const struct nfnl_ct *ct, int flags, @@ -510,7 +510,7 @@ int nfnl_ct_del(struct nl_sock *sk, const struct nfnl_ct *ct, int flags) if (err < 0) return err; - return nl_wait_for_ack(sk); + return wait_for_ack(sk); } int nfnl_ct_build_query_request(const struct nfnl_ct *ct, int flags, @@ -532,7 +532,7 @@ int nfnl_ct_query(struct nl_sock *sk, const struct nfnl_ct *ct, int flags) if (err < 0) return err; - return nl_wait_for_ack(sk); + return wait_for_ack(sk); } /** diff --git a/lib/netfilter/log.c b/lib/netfilter/log.c index 6d3e23a..96ae6c5 100644 --- a/lib/netfilter/log.c +++ b/lib/netfilter/log.c @@ -63,7 +63,7 @@ static int send_log_request(struct nl_sock *sk, struct nl_msg *msg) if (err < 0) return err; - return nl_wait_for_ack(sk); + return wait_for_ack(sk); } int nfnl_log_build_pf_bind(uint8_t pf, struct nl_msg **result) diff --git a/lib/netfilter/queue.c b/lib/netfilter/queue.c index 3af2a48..8d3c7ce 100644 --- a/lib/netfilter/queue.c +++ b/lib/netfilter/queue.c @@ -33,7 +33,7 @@ static int send_queue_request(struct nl_sock *sk, struct nl_msg *msg) if (err < 0) return err; - return nl_wait_for_ack(sk); + return wait_for_ack(sk); } /** diff --git a/lib/netfilter/queue_msg.c b/lib/netfilter/queue_msg.c index 68f25f2..af50fa0 100644 --- a/lib/netfilter/queue_msg.c +++ b/lib/netfilter/queue_msg.c @@ -203,7 +203,7 @@ int nfnl_queue_msg_send_verdict(struct nl_sock *nlh, nlmsg_free(nlmsg); if (err < 0) return err; - return nl_wait_for_ack(nlh); + return wait_for_ack(nlh); } #define NFNLMSG_QUEUE_TYPE(type) NFNLMSG_TYPE(NFNL_SUBSYS_QUEUE, (type)) |