mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 02:50:10 +01:00
l3cfg: return the conflicting MAC address with ACD events
When a collision is detected by the Address Conflict Detection mechanism, store the conflicting MAC address in NML3AcdAddrInfo, so that it is available to listeners of NML3Cfg for events of type NM_L3_CONFIG_NOTIFY_TYPE_ACD_EVENT.
This commit is contained in:
parent
995539cd30
commit
db307e69cb
2 changed files with 5 additions and 6 deletions
|
|
@ -101,8 +101,6 @@ typedef struct {
|
|||
* timestamp when we start probing. */
|
||||
guint32 probing_timeout_msec;
|
||||
|
||||
NMEtherAddr last_conflict_addr;
|
||||
|
||||
NML3AcdDefendType acd_defend_type_desired : 3;
|
||||
NML3AcdDefendType acd_defend_type_current : 3;
|
||||
bool acd_defend_type_is_active : 1;
|
||||
|
|
@ -2663,8 +2661,8 @@ handle_init:
|
|||
nm_assert(acd_data->info.state == NM_L3_ACD_ADDR_STATE_PROBING);
|
||||
nm_assert(acd_data->nacd_probe);
|
||||
|
||||
acd_data->nacd_probe = n_acd_probe_free(acd_data->nacd_probe);
|
||||
acd_data->last_conflict_addr = *sender_addr;
|
||||
acd_data->nacd_probe = n_acd_probe_free(acd_data->nacd_probe);
|
||||
acd_data->info.last_conflict_addr = *sender_addr;
|
||||
_l3_acd_data_state_set_full(self,
|
||||
acd_data,
|
||||
NM_L3_ACD_ADDR_STATE_USED,
|
||||
|
|
@ -2719,8 +2717,8 @@ handle_init:
|
|||
nm_ether_addr_to_string_a(sender_addr));
|
||||
}
|
||||
|
||||
acd_data->nacd_probe = n_acd_probe_free(acd_data->nacd_probe);
|
||||
acd_data->last_conflict_addr = *sender_addr;
|
||||
acd_data->nacd_probe = n_acd_probe_free(acd_data->nacd_probe);
|
||||
acd_data->info.last_conflict_addr = *sender_addr;
|
||||
_l3_acd_data_state_set(self, acd_data, NM_L3_ACD_ADDR_STATE_CONFLICT, TRUE);
|
||||
if (!acd_data->acd_data_timeout_source)
|
||||
_l3_acd_data_timeout_schedule(acd_data, ACD_WAIT_TIME_CONFLICT_RESTART_MSEC);
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ typedef struct {
|
|||
NML3AcdAddrState state;
|
||||
NML3Cfg *l3cfg;
|
||||
const NML3AcdAddrTrackInfo *track_infos;
|
||||
NMEtherAddr last_conflict_addr;
|
||||
} NML3AcdAddrInfo;
|
||||
|
||||
static inline const NML3AcdAddrTrackInfo *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue