diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-18 11:51:20 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-18 11:51:20 (GMT) |
commit | 063a2ebf5350699406f49036756295eddc74547b (patch) | |
tree | 99134da4a1881ece93a47e8fa069e2ab76ee4fd8 /lib | |
parent | 09daef3d83253076270970c7492f1ca1a29927c1 (diff) | |
download | libnl-063a2ebf5350699406f49036756295eddc74547b.zip libnl-063a2ebf5350699406f49036756295eddc74547b.tar.gz libnl-063a2ebf5350699406f49036756295eddc74547b.tar.bz2 |
only perform automatic sequence checking if auto-ack mode is enabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nl.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -548,14 +548,18 @@ continue_reading: /* Sequence number checking. The check may be done by * the user, otherwise a very simple check is applied * enforcing strict ordering */ - if (cb->cb_set[NL_CB_SEQ_CHECK]) + if (cb->cb_set[NL_CB_SEQ_CHECK]) { NL_CB_CALL(cb, NL_CB_SEQ_CHECK, msg); - else if (hdr->nlmsg_seq != sk->s_seq_expect) { - if (cb->cb_set[NL_CB_INVALID]) - NL_CB_CALL(cb, NL_CB_INVALID, msg); - else { - err = -NLE_SEQ_MISMATCH; - goto out; + + /* Only do sequence checking if auto-ack mode is enabled */ + } else if (!(sk->s_flags & NL_NO_AUTO_ACK)) { + if (hdr->nlmsg_seq != sk->s_seq_expect) { + if (cb->cb_set[NL_CB_INVALID]) + NL_CB_CALL(cb, NL_CB_INVALID, msg); + else { + err = -NLE_SEQ_MISMATCH; + goto out; + } } } |