From 965d9e2579bf6d422308ba4e23ef146bd27e6f72 Mon Sep 17 00:00:00 2001 From: Apple Date: Wed, 31 Jul 2019 06:13:43 +0000 Subject: [PATCH] configd-963.260.1.tar.gz --- Plugins/KernelEventMonitor/ev_dlil.c | 4 ++-- Plugins/LinkConfiguration/linkconfig.c | 6 +++--- SystemConfiguration.fproj/BondConfiguration.c | 14 +++++++------- SystemConfiguration.fproj/LinkConfiguration.c | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Plugins/KernelEventMonitor/ev_dlil.c b/Plugins/KernelEventMonitor/ev_dlil.c index dd45883..c1b136b 100644 --- a/Plugins/KernelEventMonitor/ev_dlil.c +++ b/Plugins/KernelEventMonitor/ev_dlil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2018 Apple Inc. All rights reserved. + * Copyright (c) 2002-2019 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -388,7 +388,7 @@ S_link_update_status(const char *if_name, CFStringRef interface, boolean_t attac bzero((char *)&ifm, sizeof(ifm)); (void) strlcpy(ifm.ifm_name, if_name, sizeof(ifm.ifm_name)); - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) { + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)&ifm) == -1) { /* if media status not available for this interface */ goto update; } diff --git a/Plugins/LinkConfiguration/linkconfig.c b/Plugins/LinkConfiguration/linkconfig.c index 16fe3c4..5ce1cf6 100644 --- a/Plugins/LinkConfiguration/linkconfig.c +++ b/Plugins/LinkConfiguration/linkconfig.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2007, 2011, 2013, 2015-2018 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2011, 2013, 2015-2019 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -265,8 +265,8 @@ _SCNetworkInterfaceSetMediaOptions(SCNetworkInterfaceRef interface, bzero((char *)&ifm, sizeof(ifm)); (void)_SC_cfstring_to_cstring(interfaceName, ifm.ifm_name, sizeof(ifm.ifm_name), kCFStringEncodingASCII); - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) { - SC_log(LOG_ERR, "%@: ioctl(SIOCGIFMEDIA) failed: %s", interfaceName, strerror(errno)); + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)&ifm) == -1) { + SC_log(LOG_ERR, "%@: ioctl(SIOCGIFXMEDIA) failed: %s", interfaceName, strerror(errno)); goto done; } diff --git a/SystemConfiguration.fproj/BondConfiguration.c b/SystemConfiguration.fproj/BondConfiguration.c index f6a566f..3135897 100644 --- a/SystemConfiguration.fproj/BondConfiguration.c +++ b/SystemConfiguration.fproj/BondConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2018 Apple Inc. All rights reserved. + * Copyright (c) 2004-2019 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -71,7 +71,7 @@ inet_dgram_socket() } static int -siocgifmedia(int s, const char * ifname, int * status, int * active) +siocgifxmedia(int s, const char * ifname, int * status, int * active) { struct ifmediareq ifmr; @@ -79,7 +79,7 @@ siocgifmedia(int s, const char * ifname, int * status, int * active) *active = 0; bzero(&ifmr, sizeof(ifmr)); strlcpy(ifmr.ifm_name, ifname, sizeof(ifmr.ifm_name)); - if (ioctl(s, SIOCGIFMEDIA, &ifmr) == -1) { + if (ioctl(s, SIOCGIFXMEDIA, &ifmr) == -1) { return (-1); } if (ifmr.ifm_count != 0) { @@ -1253,14 +1253,14 @@ SCBondInterfaceCopyStatus(SCBondInterfaceRef bond) if_name, sizeof(if_name), kCFStringEncodingASCII); - if (siocgifmedia(s, if_name, &bond_if_status, &bond_if_active) == -1) { + if (siocgifxmedia(s, if_name, &bond_if_status, &bond_if_active) == -1) { _SCErrorSet(errno); switch (errno) { case EBUSY : case ENXIO : break; default : - SC_log(LOG_NOTICE, "siocgifmedia(%s) failed: %s", + SC_log(LOG_NOTICE, "siocgifxmedia(%s) failed: %s", if_name, strerror(errno)); } @@ -1314,13 +1314,13 @@ SCBondInterfaceCopyStatus(SCBondInterfaceRef bond) int status = 0; static lacp_system zeroes = { {0, 0, 0, 0, 0, 0}}; - if (siocgifmedia(s, scan_p->ibs_if_name, &status, &active) == -1) { + if (siocgifxmedia(s, scan_p->ibs_if_name, &status, &active) == -1) { switch (errno) { case EBUSY : case ENXIO : break; default : - SC_log(LOG_NOTICE, "siocgifmedia(%s) failed: %s", + SC_log(LOG_NOTICE, "siocgifxmedia(%s) failed: %s", if_name, strerror(errno)); break; diff --git a/SystemConfiguration.fproj/LinkConfiguration.c b/SystemConfiguration.fproj/LinkConfiguration.c index 0f17586..6d5335e 100644 --- a/SystemConfiguration.fproj/LinkConfiguration.c +++ b/SystemConfiguration.fproj/LinkConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2018 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2019 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -410,15 +410,15 @@ __copyMediaList(CFStringRef interfaceName) goto done; } - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) { -// SC_log(LOG_NOTICE, "ioctl(SIOCGIFMEDIA) failed: %s", strerror(errno)); + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)ifm) == -1) { +// SC_log(LOG_NOTICE, "ioctl(SIOCGIFXMEDIA) failed: %s", strerror(errno)); goto done; } if (ifm->ifm_count > 0) { ifm->ifm_ulist = (int *)CFAllocatorAllocate(NULL, ifm->ifm_count * sizeof(int), 0); - if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) { - SC_log(LOG_NOTICE, "ioctl(SIOCGIFMEDIA) failed: %s", strerror(errno)); + if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)ifm) == -1) { + SC_log(LOG_NOTICE, "ioctl(SIOCGIFXMEDIA) failed: %s", strerror(errno)); goto done; } } -- 2.45.2