mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 13:28:02 +02:00
platform: assert the seq_status is known to be unknown on sending a nl message
This guards against accidental use of a stale result.
This commit is contained in:
parent
1e74b755ee
commit
ef6d8cf1a8
1 changed files with 6 additions and 0 deletions
|
|
@ -7059,6 +7059,8 @@ delayed_action_schedule_WAIT_FOR_RESPONSE(NMPlatform *pla
|
|||
.response.out_data = response_out_data,
|
||||
};
|
||||
|
||||
nm_assert(!out_seq_result || *out_seq_result == WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
|
||||
|
||||
delayed_action_schedule(
|
||||
platform,
|
||||
nmp_netlink_protocol_info(netlink_protocol)->delayed_action_type_wait_for_response,
|
||||
|
|
@ -7423,6 +7425,8 @@ _nl_send_nlmsghdr(NMPlatform *platform,
|
|||
|
||||
nm_assert(nlhdr);
|
||||
|
||||
nm_assert(out_seq_result && *out_seq_result == WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
|
||||
|
||||
seq = _nlh_seq_next_get(priv, NMP_NETLINK_ROUTE);
|
||||
nlhdr->nlmsg_seq = seq;
|
||||
|
||||
|
|
@ -7481,6 +7485,8 @@ _netlink_send_nlmsg(NMPlatform *platform,
|
|||
guint32 seq;
|
||||
int nle;
|
||||
|
||||
nm_assert(!out_seq_result || *out_seq_result == WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
|
||||
|
||||
nlhdr = nlmsg_hdr(nlmsg);
|
||||
seq = _nlh_seq_next_get(priv, netlink_protocol);
|
||||
nlhdr->nlmsg_seq = seq;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue