only perform automatic sequence checking if auto-ack mode is enabled
This commit is contained in:
parent
09daef3d83
commit
063a2ebf53
18
lib/nl.c
18
lib/nl.c
|
@ -548,14 +548,18 @@ continue_reading:
|
||||||
/* Sequence number checking. The check may be done by
|
/* Sequence number checking. The check may be done by
|
||||||
* the user, otherwise a very simple check is applied
|
* the user, otherwise a very simple check is applied
|
||||||
* enforcing strict ordering */
|
* 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);
|
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])
|
/* Only do sequence checking if auto-ack mode is enabled */
|
||||||
NL_CB_CALL(cb, NL_CB_INVALID, msg);
|
} else if (!(sk->s_flags & NL_NO_AUTO_ACK)) {
|
||||||
else {
|
if (hdr->nlmsg_seq != sk->s_seq_expect) {
|
||||||
err = -NLE_SEQ_MISMATCH;
|
if (cb->cb_set[NL_CB_INVALID])
|
||||||
goto out;
|
NL_CB_CALL(cb, NL_CB_INVALID, msg);
|
||||||
|
else {
|
||||||
|
err = -NLE_SEQ_MISMATCH;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue