<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>Requires</key>
<array>
<string>com.apple.SystemConfiguration.IPConfiguration</string>
/*
- * Copyright (c) 2004-2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2012 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
+ CFDictionarySetValue(targetOptions,
+ kSCNetworkReachabilityOptionServerBypass,
+ kCFBooleanTrue);
if (targetInterface != NULL) {
CFDictionarySetValue(targetOptions,
kSCNetworkReachabilityOptionInterface,
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
</dict>
</plist>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>Requires</key>
<array>
<string>com.apple.SystemConfiguration.InterfaceNamer</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>Requires</key>
<array>
<string>com.apple.SystemConfiguration.InterfaceNamer</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>Enabled</key>
<false/>
<key>Verbose</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>Enabled</key>
<false/>
<key>Verbose</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>Builtin</key>
<true/>
<key>Requires</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
</dict>
</plist>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFPlugInDynamicRegistration</key>
<string>NO</string>
<key>CFPlugInFactories</key>
watcher_add_lan(MyType *myInstance)
{
SCDynamicStoreContext context = { 0, (void *)myInstance, NULL, NULL, NULL };
- CFDictionaryRef dict;
CFStringRef key;
CFArrayRef keys;
SCDynamicStoreRef store;
myInstance->monitorRls,
kCFRunLoopDefaultMode);
- // initialize the list of known interfaces
- myInstance->interfaces_known = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
- dict = SCDynamicStoreCopyValue(store, key);
- if (dict != NULL) {
- if (isA_CFDictionary(dict)) {
- CFIndex i;
- CFArrayRef interfaces;
- CFIndex n;
-
- interfaces = CFDictionaryGetValue(dict, kSCPropNetInterfaces);
- n = isA_CFArray(interfaces) ? CFArrayGetCount(interfaces) : 0;
- for (i = 0; i < n; i++) {
- CFStringRef bsdName;
-
- bsdName = CFArrayGetValueAtIndex(interfaces, i);
- if (isA_CFString(bsdName)) {
- SCNetworkInterfaceRef interface;
-
- interface = _SCNetworkInterfaceCreateWithBSDName(NULL, bsdName, kIncludeNoVirtualInterfaces);
- if (interface != NULL) {
- CFSetAddValue(myInstance->interfaces_known, interface);
- CFRelease(interface);
+ // check if we already have the "admin" (kSCPreferencesWriteAuthorizationRight)
+ // right. If so, we can automatically configure (without user intervention) any
+ // "new" network interfaces that are present at login (e.g. a USB ethernet
+ // dongle that was plugged in before login).
+ if (!hasAuthorization(myInstance)) {
+ CFDictionaryRef dict;
+
+ // ... and if we don't have the right then we populate the list of
+ // known interfaces with those already named so that we avoid any
+ // login prompts (that the user might have no choice but to dismiss)
+ dict = SCDynamicStoreCopyValue(store, key);
+ if (dict != NULL) {
+ if (isA_CFDictionary(dict)) {
+ CFIndex i;
+ CFArrayRef interfaces;
+ CFIndex n;
+
+ interfaces = CFDictionaryGetValue(dict, kSCPropNetInterfaces);
+ n = isA_CFArray(interfaces) ? CFArrayGetCount(interfaces) : 0;
+ for (i = 0; i < n; i++) {
+ CFStringRef bsdName;
+
+ bsdName = CFArrayGetValueAtIndex(interfaces, i);
+ if (isA_CFString(bsdName)) {
+ SCNetworkInterfaceRef interface;
+
+ interface = _SCNetworkInterfaceCreateWithBSDName(NULL, bsdName, kIncludeNoVirtualInterfaces);
+ if (interface != NULL) {
+ CFSetAddValue(myInstance->interfaces_known, interface);
+ CFRelease(interface);
+ }
}
}
}
- }
- CFRelease(dict);
+ CFRelease(dict);
+ }
}
CFRelease(key);
myInstance->monitorRls = NULL;
}
- if (myInstance->interfaces_known != NULL) {
- CFRelease(myInstance->interfaces_known);
- myInstance->interfaces_known = NULL;
- }
-
return;
}
typedef struct {
io_registry_entry_t interface;
+ io_registry_entry_t interface_node;
MyType *myInstance;
io_object_t notification;
} MyNode;
}
// remove no-longer-needed notification
+ if (myNode->interface != myNode->interface_node) {
+ IOObjectRelease(myNode->interface_node);
+ }
if (myNode->interface != MACH_PORT_NULL) {
IOObjectRelease(myNode->interface);
- myNode->interface = MACH_PORT_NULL;
}
IOObjectRelease(myNode->notification);
i = CFArrayGetFirstIndexOfValue(myInstance->notifyNodes,
myNode = (MyNode *)(void *)CFDataGetBytePtr(myData);
bzero(myNode, sizeof(MyNode));
- if (interface != MACH_PORT_NULL) {
- IOObjectRetain(interface);
+ myNode->interface = interface;
+ if (myNode->interface != MACH_PORT_NULL) {
+ IOObjectRetain(myNode->interface);
+ }
+ myNode->interface_node = (interface == MACH_PORT_NULL) ? node : interface;
+ if (myNode->interface != myNode->interface_node) {
+ IOObjectRetain(myNode->interface_node);
}
- myNode->interface = interface;
- myNode->myInstance = myInstance;
- myNode->notification = MACH_PORT_NULL;
+ myNode->myInstance = myInstance;
+ myNode->notification = MACH_PORT_NULL;
kr = IOServiceAddInterestNotification(myInstance->notifyPort, // IONotificationPortRef
node, // io_service_t
IOObjectRelease(obj);
}
- updateInterfaceList(myInstance);
return;
}
+static void
+update_serial_nodes(void *refcon, io_iterator_t iter)
+{
+ MyType *myInstance = (MyType *)refcon;
+
+ update_serial(refcon, iter);
+ updateInterfaceList(myInstance);
+}
+
+
static void
watcher_add_serial(MyType *myInstance)
{
kr = IOServiceAddMatchingNotification(myInstance->notifyPort,
kIOFirstMatchNotification,
IOServiceMatching("IOSerialBSDClient"),
- &update_serial,
+ &update_serial_nodes,
(void *)myInstance, // refCon
&myInstance->notifyIterator); // notification
if (kr != KERN_SUCCESS) {
// future interface arrivals.
update_serial((void *)myInstance, myInstance->notifyIterator);
+ if (myInstance->notifyNodes != NULL) {
+ // if we have any serial nodes, check if we already have the
+ // "admin" (kSCPreferencesWriteAuthorizationRight) right. If
+ // so, we can automatically configure (without user intervention)
+ // any "new" network interfaces that are present at login (e.g. a
+ // USB modem that was plugged in before login).
+
+ if (!hasAuthorization(myInstance)) {
+ CFIndex i;
+ CFIndex n = CFArrayGetCount(myInstance->notifyNodes);
+
+ // ... and if we don't have the right then we populate the list of
+ // known interfaces with those already named so that we avoid any
+ // login prompts (that the user might have no choice but to dismiss)
+
+ for (i = 0; i < n; i++) {
+ SCNetworkInterfaceRef interface;
+ CFDataRef myData;
+ MyNode *myNode;
+
+ myData = CFArrayGetValueAtIndex(myInstance->notifyNodes, i);
+
+ /* ALIGN: CF aligns to at least >8 bytes */
+ myNode = (MyNode *)(void *)CFDataGetBytePtr(myData);
+
+ interface = _SCNetworkInterfaceCreateWithIONetworkInterfaceObject(myNode->interface_node);
+ if (interface != NULL) {
+ CFSetAddValue(myInstance->interfaces_known, interface);
+ CFRelease(interface);
+ }
+ }
+ }
+ }
+
// and keep watching
CFRunLoopAddSource(CFRunLoopGetCurrent(),
IONotificationPortGetRunLoopSource(myInstance->notifyPort),
/* ALIGN: CF aligns to at least >8 bytes */
myNode = (MyNode *)(void *)CFDataGetBytePtr(myData);
+ if (myNode->interface != myNode->interface_node) {
+ IOObjectRelease(myNode->interface_node);
+ }
if (myNode->interface != MACH_PORT_NULL) {
IOObjectRelease(myNode->interface);
}
}
}
+ // initialize the list of known interfaces
+ myInstance->interfaces_known = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks);
+
+ // add LAN interfaces
watcher_add_lan(myInstance);
+
+ // add SERIAL interfaces
watcher_add_serial(myInstance);
+
+ // auto-configure (as needed)
+ updateInterfaceList(myInstance);
+
return;
}
watcher_remove_lan(myInstance);
watcher_remove_serial(myInstance);
+ if (myInstance->interfaces_known != NULL) {
+ CFRelease(myInstance->interfaces_known);
+ myInstance->interfaces_known = NULL;
+ }
+
asl_free(myInstance->log_msg);
myInstance->log_msg = NULL;
return;
<key>CFBundleExecutable</key>
<string>SystemConfiguration</string>
<key>CFBundleGetInfoString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleIdentifier</key>
<string>com.apple.SystemConfiguration</string>
<key>CFBundleInfoDictionaryVersion</key>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
</dict>
</plist>
<key>CFBundleExecutable</key>
<string>SystemConfiguration</string>
<key>CFBundleGetInfoString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleIdentifier</key>
<string>com.apple.SystemConfiguration</string>
<key>CFBundleInfoDictionaryVersion</key>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.12</string>
+ <string>1.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.12</string>
+ <string>1.12.2</string>
</dict>
</plist>
{
dispatch_group_t drainGroup = NULL;
dispatch_queue_t drainQueue = NULL;
+ dispatch_group_t group = NULL;
mach_port_t mp;
Boolean ok = FALSE;
dispatch_source_t source;
// the group to empty and use the group's finalizer to release
// our reference to the SCDynamicStore.
//
- storePrivate->dispatchGroup = dispatch_group_create();
+ group = dispatch_group_create();
+ storePrivate->dispatchGroup = group;
CFRetain(store);
dispatch_set_context(storePrivate->dispatchGroup, (void *)store);
dispatch_set_finalizer_f(storePrivate->dispatchGroup, (dispatch_function_t)CFRelease);
msgid = notify_msg.msg.header.msgh_id;
CFRetain(store);
- dispatch_group_async(storePrivate->dispatchGroup, storePrivate->dispatchQueue, ^{
+ dispatch_group_async(group, queue, ^{
if (msgid == MACH_NOTIFY_NO_SENDERS) {
// re-establish notification and inform the client
(void)__SCDynamicStoreReconnectNotifications(store);
}
+static CFStringRef
+__SC_IORegistryEntryCopyPath(io_registry_entry_t entry, const io_name_t plane)
+{
+ /*
+ * Create a path for a registry entry.
+ */
+ io_string_t path;
+ IOReturn status;
+ CFStringRef str = NULL;
+
+ status = IORegistryEntryGetPath(entry, plane, path);
+ if (status == kIOReturnSuccess) {
+ str = CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8);
+ } else if (status == kIOReturnBadArgument) {
+ io_registry_entry_t parent;
+
+ status = IORegistryEntryGetParentEntry(entry, plane, &parent);
+ if (status == kIOReturnSuccess) {
+ CFStringRef str_parent;
+
+ str_parent = __SC_IORegistryEntryCopyPath(parent, plane);
+ if (str_parent != NULL) {
+ io_name_t name;
+
+ status = IORegistryEntryGetNameInPlane(entry, plane, name);
+ if (status == kIOReturnSuccess) {
+ io_name_t location;
+
+ status = IORegistryEntryGetLocationInPlane(entry, plane, location);
+ if (status == kIOReturnSuccess) {
+ str = CFStringCreateWithFormat(NULL,
+ NULL,
+ CFSTR("%@/%s@%s"),
+ str_parent,
+ name,
+ location);
+ } else {
+ str = CFStringCreateWithFormat(NULL,
+ NULL,
+ CFSTR("%@/%s"),
+ str_parent,
+ name);
+ }
+ }
+
+ CFRelease(str_parent);
+ }
+
+ IOObjectRelease(parent);
+ }
+ }
+
+ return str;
+}
+
+
static SCNetworkInterfaceRef
createInterface(io_registry_entry_t interface, processInterface func)
{
CFMutableDictionaryRef bus_dict = NULL;
io_registry_entry_t controller = MACH_PORT_NULL;
CFMutableDictionaryRef controller_dict = NULL;
+ uint64_t entryID = 0;
SCNetworkInterfacePrivateRef interfacePrivate = NULL;
CFMutableDictionaryRef interface_dict = NULL;
kern_return_t kr;
- io_string_t path;
CFTypeRef val;
- uint64_t entryID = 0;
-
- kr = IORegistryEntryGetPath(interface, kIOServicePlane, path);
- if (kr != kIOReturnSuccess) {
- SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetPath() failed, kr = 0x%x"), kr);
- goto done;
- }
kr = IORegistryEntryCreateCFProperties(interface, &interface_dict, NULL, kNilOptions);
if (kr != kIOReturnSuccess) {
}
interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL);
- interfacePrivate->path = (path != NULL) ? CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8) : NULL;
+ interfacePrivate->path = __SC_IORegistryEntryCopyPath(interface, kIOServicePlane);
interfacePrivate->entryID = entryID;
// configuration [PPP, Modem, DNS, IPv4, IPv6, Proxies, SMB] template overrides
}
}
+
// add flags
if (targetPrivate->scheduled) {
str = _SCNetworkReachabilityCopyTargetFlags(target);
dispatch_sync(queue, ^{
reachPerform((void *)target);
dispatch_group_leave(group);
- dispatch_release(queue);
});
+ dispatch_release(queue);
} else {
if (targetPrivate->rls != NULL) {
CFRunLoopSourceSignal(targetPrivate->rls);
queue = targetPrivate->dispatchQueue;
if (queue != NULL) {
- dispatch_retain(queue);
CFRetain(target);
dispatch_group_async(targetPrivate->dispatchGroup, queue, ^{
reachPerform((void *)target);
CFRelease(target);
- dispatch_release(queue);
});
} else {
if (targetPrivate->rls != NULL) {
dispatch_sync(queue, ^{
reachPerform((void *)target);
CFRelease(target);
- dispatch_release(queue);
});
+ dispatch_release(queue);
});
} else if (targetPrivate->rls != NULL) {
CFRunLoopSourceSignal(targetPrivate->rls);
targetPrivate->onDemandServer = NULL;
targetPrivate->onDemandServiceID = NULL;
+#ifdef HAVE_REACHABILITY_SERVER
+ targetPrivate->serverBypass = D_serverBypass;
+#endif // HAVE_REACHABILITY_SERVER
+
targetPrivate->llqActive = FALSE;
targetPrivate->llqBypass = D_llqBypass;
#ifdef HAVE_REACHABILITY_SERVER
targetPrivate->serverActive = FALSE;
- targetPrivate->serverBypass = D_serverBypass;
targetPrivate->serverScheduled = FALSE;
targetPrivate->serverInfo = NOT_REACHABLE;
static Boolean haveCPU_old = TRUE;
Boolean haveCPU_new;
- powerStatusChanged = TRUE;
-
haveCPU_new = (power_capabilities & kIOPMSystemPowerStateCapabilityCPU) != 0;
if ((haveCPU_old != haveCPU_new) && haveCPU_new) {
/*
dnsConfigChanged = TRUE;
}
haveCPU_old = haveCPU_new;
+ } else {
+ power_capabilities = kIOPMSytemPowerStateCapabilitiesMask;
}
CFRelease(num);
+ } else {
+ power_capabilities = kIOPMSytemPowerStateCapabilitiesMask;
}
+
+ powerStatusChanged = TRUE;
}
CFRelease(key);
#endif // !TARGET_OS_IPHONE
/*
- * Copyright (c) 2002-2008, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2008, 2010-2012 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
}
+__private_extern__ kern_return_t
+_IORegistryEntryGetLocationInPlane(io_registry_entry_t entry, const io_name_t plane, io_name_t location)
+{
+#undef IORegistryEntryGetLocationInPlane
+ static typeof (IORegistryEntryGetLocationInPlane) *dyfunc = NULL;
+ if (!dyfunc) {
+ void *image = __loadIOKit();
+ if (image) dyfunc = dlsym(image, "IORegistryEntryGetLocationInPlane");
+ }
+ return dyfunc ? dyfunc(entry, plane, location) : KERN_FAILURE;
+}
+
+
__private_extern__ kern_return_t
_IORegistryEntryGetName(io_registry_entry_t entry, io_name_t name)
{
}
+__private_extern__ kern_return_t
+_IORegistryEntryGetNameInPlane(io_registry_entry_t entry, const io_name_t plane, io_name_t name)
+{
+ #undef IORegistryEntryGetNameInPlane
+ static typeof (IORegistryEntryGetNameInPlane) *dyfunc = NULL;
+ if (!dyfunc) {
+ void *image = __loadIOKit();
+ if (image) dyfunc = dlsym(image, "IORegistryEntryGetNameInPlane");
+ }
+ return dyfunc ? dyfunc(entry, plane, name) : KERN_FAILURE;
+}
+
+
__private_extern__ kern_return_t
_IORegistryEntryGetParentEntry(io_registry_entry_t entry, const io_name_t plane, io_registry_entry_t *parent)
{
/*
- * Copyright (c) 2002-2008, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2008, 2010-2012 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
);
#define IORegistryEntryCreateIterator _IORegistryEntryCreateIterator
+kern_return_t
+_IORegistryEntryGetLocationInPlane (
+ io_registry_entry_t entry,
+ const io_name_t plane,
+ io_name_t location
+ );
+#define IORegistryEntryGetLocationInPlane _IORegistryEntryGetLocationInPlane
+
kern_return_t
_IORegistryEntryGetName (
io_registry_entry_t entry,
);
#define IORegistryEntryGetName _IORegistryEntryGetName
+kern_return_t
+_IORegistryEntryGetNameInPlane (
+ io_registry_entry_t entry,
+ const io_name_t plane,
+ io_name_t name
+ );
+#define IORegistryEntryGetNameInPlane _IORegistryEntryGetNameInPlane
+
kern_return_t
_IORegistryEntryGetParentEntry (
io_registry_entry_t entry,
int64_t if_index;
const char *if_name = NULL;
bool onDemandBypass = FALSE;
+ bool resolverBypass = FALSE;
uint64_t target_id;
size_t len;
xpc_connection_t remote;
xpc_object_t reply;
- bool resolverBypass = FALSE;
uint64_t status = REACH_REQUEST_REPLY_FAILED;
Boolean added;
name = xpc_dictionary_get_string(request, REACH_TARGET_NAME);
if (name != NULL) {
+ CC_SHA1_Update(&ctx, REACH_TARGET_NAME, sizeof(REACH_TARGET_NAME));
CC_SHA1_Update(&ctx, name, strlen(name));
}
serv = xpc_dictionary_get_string(request, REACH_TARGET_SERV);
if (serv != NULL) {
+ CC_SHA1_Update(&ctx, REACH_TARGET_SERV, sizeof(REACH_TARGET_SERV));
CC_SHA1_Update(&ctx, serv, strlen(serv));
}
if (localAddress != NULL) {
if ((len == localAddress->sa_len) && (len <= sizeof(struct sockaddr_storage))) {
sanitize_address(localAddress, (struct sockaddr *)&localAddress0);
+ CC_SHA1_Update(&ctx, REACH_TARGET_LOCAL_ADDR, sizeof(REACH_TARGET_LOCAL_ADDR));
CC_SHA1_Update(&ctx, &localAddress0, len);
} else {
xpc_dictionary_set_string(reply,
if (remoteAddress != NULL) {
if ((len == remoteAddress->sa_len) && (len <= sizeof(struct sockaddr_storage))) {
sanitize_address(remoteAddress, (struct sockaddr *)&remoteAddress0);
+ CC_SHA1_Update(&ctx, REACH_TARGET_REMOTE_ADDR, sizeof(REACH_TARGET_REMOTE_ADDR));
CC_SHA1_Update(&ctx, &remoteAddress0, len);
} else {
xpc_dictionary_set_string(reply,
hints = xpc_dictionary_get_data(request, REACH_TARGET_HINTS, &len);
if (hints != NULL) {
if (len == sizeof(struct addrinfo)) {
+ CC_SHA1_Update(&ctx, REACH_TARGET_HINTS, sizeof(REACH_TARGET_HINTS));
CC_SHA1_Update(&ctx, hints, len);
} else {
xpc_dictionary_set_string(reply,
if (if_index != 0) {
if_name = xpc_dictionary_get_string(request, REACH_TARGET_IF_NAME);
if (if_name != NULL) {
+ CC_SHA1_Update(&ctx, REACH_TARGET_IF_NAME, sizeof(REACH_TARGET_IF_NAME));
CC_SHA1_Update(&ctx, if_name, strlen(if_name));
}
}
onDemandBypass = xpc_dictionary_get_bool(request, REACH_TARGET_ONDEMAND_BYPASS);
if (onDemandBypass) {
+ CC_SHA1_Update(&ctx, REACH_TARGET_ONDEMAND_BYPASS, sizeof(REACH_TARGET_ONDEMAND_BYPASS));
CC_SHA1_Update(&ctx, &onDemandBypass, sizeof(onDemandBypass));
}
resolverBypass = xpc_dictionary_get_bool(request, REACH_TARGET_RESOLVER_BYPASS);
if (resolverBypass) {
+ CC_SHA1_Update(&ctx, REACH_TARGET_RESOLVER_BYPASS, sizeof(REACH_TARGET_RESOLVER_BYPASS));
CC_SHA1_Update(&ctx, &resolverBypass, sizeof(resolverBypass));
}