mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 08:00:18 +01:00
acd: log the MAC when announcing an IP
(cherry picked from commit 314024ea96)
This commit is contained in:
parent
17987b7546
commit
786cd854d7
1 changed files with 8 additions and 3 deletions
|
|
@ -188,6 +188,7 @@ acd_event(int fd, GIOCondition condition, gpointer data)
|
|||
char to_string_buffer[ACD_EVENT_TO_STRING_BUF_SIZE];
|
||||
gs_free char *hwaddr_str = NULL;
|
||||
gboolean check_probing_done = FALSE;
|
||||
char buf[ETH_ALEN * 3];
|
||||
|
||||
switch (event->event) {
|
||||
case N_ACD_EVENT_READY:
|
||||
|
|
@ -202,8 +203,9 @@ acd_event(int fd, GIOCondition condition, gpointer data)
|
|||
nm_platform_link_get_name(NM_PLATFORM_GET, self->ifindex),
|
||||
acd_error_to_string(r));
|
||||
} else {
|
||||
_LOGD("announcing address %s",
|
||||
_nm_utils_inet4_ntop(info->address, address_str));
|
||||
_LOGD("announcing address %s (hw-addr %s)",
|
||||
_nm_utils_inet4_ntop(info->address, address_str),
|
||||
_nm_utils_hwaddr_ntoa(self->hwaddr, ETH_ALEN, TRUE, buf, sizeof(buf)));
|
||||
}
|
||||
}
|
||||
check_probing_done = TRUE;
|
||||
|
|
@ -394,6 +396,7 @@ nm_acd_manager_announce_addresses(NMAcdManager *self)
|
|||
int r;
|
||||
int fd;
|
||||
gboolean success = TRUE;
|
||||
char buf[ETH_ALEN * 3];
|
||||
|
||||
r = acd_init(self);
|
||||
if (r) {
|
||||
|
|
@ -428,7 +431,9 @@ nm_acd_manager_announce_addresses(NMAcdManager *self)
|
|||
acd_error_to_string(r));
|
||||
success = FALSE;
|
||||
} else
|
||||
_LOGD("announcing address %s", _nm_utils_inet4_ntop(info->address, sbuf));
|
||||
_LOGD("announcing address %s (hw-addr %s)",
|
||||
_nm_utils_inet4_ntop(info->address, sbuf),
|
||||
_nm_utils_hwaddr_ntoa(self->hwaddr, ETH_ALEN, TRUE, buf, sizeof(buf)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue