mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 10:00:07 +01:00
l3cfg: merge branch 'bg/dad-failure-log-rh2123212'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1710
This commit is contained in:
commit
9fab55ad4c
3 changed files with 21 additions and 8 deletions
|
|
@ -4247,6 +4247,20 @@ _dev_l3_cfg_notify_cb(NML3Cfg *l3cfg, const NML3ConfigNotifyData *notify_data, N
|
|||
case NM_L3_CONFIG_NOTIFY_TYPE_ACD_EVENT:
|
||||
{
|
||||
const NML3AcdAddrInfo *addr_info = ¬ify_data->acd_event.info;
|
||||
char buf_addr[NM_INET_ADDRSTRLEN];
|
||||
|
||||
if (addr_info->state == NM_L3_ACD_ADDR_STATE_USED) {
|
||||
_LOGI(LOGD_DEVICE,
|
||||
"IP address %s cannot be configured because it is already in use in the "
|
||||
"network by host %s",
|
||||
nm_inet4_ntop(addr_info->addr, buf_addr),
|
||||
nm_ether_addr_to_string_a(&addr_info->last_conflict_addr));
|
||||
} else if (addr_info->state == NM_L3_ACD_ADDR_STATE_CONFLICT) {
|
||||
_LOGI(LOGD_DEVICE,
|
||||
"conflict detected for IP address %s with host %s",
|
||||
nm_inet4_ntop(addr_info->addr, buf_addr),
|
||||
nm_ether_addr_to_string_a(&addr_info->last_conflict_addr));
|
||||
}
|
||||
|
||||
if (addr_info->state > NM_L3_ACD_ADDR_STATE_PROBING)
|
||||
_dev_ipmanual_check_ready(self);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -2676,7 +2674,7 @@ handle_init:
|
|||
_l3_acd_data_timeout_schedule(acd_data, ACD_WAIT_TIME_PROBING_FULL_RESTART_MSEC);
|
||||
|
||||
if (!_l3_acd_data_defendconflict_warning_ratelimited(acd_data, p_now_msec)) {
|
||||
_LOGI("IPv4 address %s is used on network connected to interface %d%s%s%s from "
|
||||
_LOGD("IPv4 address %s is used on network connected to interface %d%s%s%s from "
|
||||
"host %s",
|
||||
nm_inet4_ntop(acd_data->info.addr, sbuf_addr),
|
||||
self->priv.ifindex,
|
||||
|
|
@ -2707,7 +2705,7 @@ handle_init:
|
|||
nm_ether_addr_to_string_a(sender_addr));
|
||||
|
||||
if (!_l3_acd_data_defendconflict_warning_ratelimited(acd_data, p_now_msec)) {
|
||||
_LOGW("IPv4 address collision detection sees conflict on interface %d%s%s%s for "
|
||||
_LOGD("IPv4 address collision detection sees conflict on interface %d%s%s%s for "
|
||||
"address %s from host %s",
|
||||
self->priv.ifindex,
|
||||
NM_PRINT_FMT_QUOTED(self->priv.plobj_next,
|
||||
|
|
@ -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