From 78403150fdf95618c483be7dbe6bca9459b92a9f Mon Sep 17 00:00:00 2001 From: Apple Date: Fri, 24 Oct 2014 18:01:57 +0000 Subject: [PATCH 1/1] configd-699.1.5.tar.gz --- IPMonitorControl/IPMonitorControl.c | 403 + IPMonitorControl/IPMonitorControl.h | 55 + IPMonitorControl/IPMonitorControlPrivate.h | 29 + IPMonitorControl/IPMonitorControlServer.c | 552 + IPMonitorControl/IPMonitorControlServer.h | 49 + IPMonitorControl/Makefile | 39 + IPMonitorControl/main.c | 142 + IPMonitorControl/symbol_scope.h | 16 + Makefile | 15 +- .../IPMonitor/Info-EmbeddedSimulator.plist | 47 + Plugins/IPMonitor/Info.plist | 13 +- Plugins/IPMonitor/Makefile | 72 +- Plugins/IPMonitor/dns-configuration.c | 162 +- Plugins/IPMonitor/ip_plugin.c | 12678 ++++++---- Plugins/IPMonitor/ip_plugin.h | 46 +- Plugins/IPMonitor/proxy-configuration.c | 9 +- ...t_filter.sh => routelist_output_filter.sh} | 0 Plugins/IPMonitor/set-hostname.c | 475 +- Plugins/IPMonitor/smb-configuration.c | 457 +- .../test_ipv4_routelist_reference.txt | 19357 +++++++++++++++- .../test_ipv6_routelist_reference.txt | 1400 ++ Plugins/InterfaceNamer/Info.plist | 4 +- Plugins/InterfaceNamer/ifnamer.c | 39 +- Plugins/KernelEventMonitor/Info.plist | 4 +- Plugins/KernelEventMonitor/ev_dlil.c | 46 +- Plugins/KernelEventMonitor/ev_extra.h | 44 + Plugins/KernelEventMonitor/ev_extra.m | 150 + Plugins/KernelEventMonitor/ev_ipv4.c | 40 +- Plugins/KernelEventMonitor/ev_ipv4.h | 15 +- Plugins/KernelEventMonitor/ev_ipv6.c | 5 +- Plugins/KernelEventMonitor/eventmon.c | 126 +- Plugins/LinkConfiguration/Info.plist | 4 +- Plugins/Logger/Info-Embedded.plist | 4 +- Plugins/Logger/Info.plist | 4 +- Plugins/Logger/logger.c | 22 +- Plugins/PreferencesMonitor/Info.plist | 4 +- Plugins/PreferencesMonitor/prefsmon.c | 16 +- .../Info-EmbeddedSimulator.plist | 31 + Plugins/SCNetworkReachability/Info.plist | 9 +- Plugins/SimulatorSupport/Info.plist | 4 +- SCMonitor/Info.plist | 4 +- SCMonitor/monitor.c | 44 +- SystemConfiguration.fproj/BondConfiguration.c | 62 +- .../BridgeConfiguration.c | 63 +- SystemConfiguration.fproj/DHCP.c | 12 +- .../English.lproj/NetworkInterface.strings | Bin 6418 -> 6510 bytes SystemConfiguration.fproj/Info-Embedded.plist | 6 +- SystemConfiguration.fproj/Info.plist | 6 +- .../NetworkConfiguration.plist | 2 +- SystemConfiguration.fproj/SCD.c | 208 +- SystemConfiguration.fproj/SCDAdd.c | 10 +- SystemConfiguration.fproj/SCDGet.c | 8 +- SystemConfiguration.fproj/SCDHostName.c | 29 +- SystemConfiguration.fproj/SCDList.c | 4 +- SystemConfiguration.fproj/SCDNotifierAdd.c | 4 +- .../SCDNotifierInformViaCallback.c | 2 +- .../SCDNotifierInformViaFD.c | 4 +- SystemConfiguration.fproj/SCDNotifierRemove.c | 4 +- .../SCDNotifierSetKeys.c | 6 +- SystemConfiguration.fproj/SCDNotify.c | 4 +- SystemConfiguration.fproj/SCDPrivate.c | 77 +- SystemConfiguration.fproj/SCDRemove.c | 4 +- SystemConfiguration.fproj/SCDSet.c | 12 +- .../SCNetworkConfigurationInternal.c | 5 + .../SCNetworkConfigurationInternal.h | 143 +- .../SCNetworkConfigurationPrivate.h | 147 +- .../SCNetworkConnection.c | 1020 +- .../SCNetworkConnectionPrivate.h | 9 +- .../SCNetworkInterface.c | 1327 +- .../SCNetworkMigration.c | 3683 +++ .../SCNetworkReachability.c | 4320 ++-- .../SCNetworkReachabilityInternal.h | 80 +- SystemConfiguration.fproj/SCNetworkService.c | 662 +- SystemConfiguration.fproj/SCNetworkSet.c | 328 +- .../SCNetworkSignature.c | 29 +- SystemConfiguration.fproj/SCP.c | 97 +- SystemConfiguration.fproj/SCPCommit.c | 25 +- SystemConfiguration.fproj/SCPLock.c | 8 +- SystemConfiguration.fproj/SCPOpen.c | 15 +- SystemConfiguration.fproj/SCPUnlock.c | 6 +- .../SCPreferencesGetSpecificPrivate.h | 10 + .../SCPreferencesInternal.h | 19 +- .../SCPreferencesKeychainPrivate.c | 35 +- SystemConfiguration.fproj/SCPrivate.h | 123 +- SystemConfiguration.fproj/SCProxies.c | 91 +- .../SCSchemaDefinitions.c | 48 +- .../SCSchemaDefinitions.h | 34 +- .../SCSchemaDefinitionsPrivate.h | 192 +- SystemConfiguration.fproj/SNHelper.c | 34 +- SystemConfiguration.fproj/SNHelperPrivate.h | 4 + SystemConfiguration.fproj/VLANConfiguration.c | 56 +- SystemConfiguration.fproj/VPNAppLayer.c | 2 +- .../VPNAppLayerPrivate.h | 2 +- SystemConfiguration.fproj/VPNConfiguration.c | 2 +- SystemConfiguration.fproj/VPNConfiguration.h | 2 +- SystemConfiguration.fproj/VPNFlow.c | 2 +- SystemConfiguration.fproj/VPNFlowPrivate.h | 2 +- SystemConfiguration.fproj/VPNPrivate.c | 2 +- SystemConfiguration.fproj/VPNPrivate.h | 2 +- SystemConfiguration.fproj/VPNService.c | 106 +- SystemConfiguration.fproj/dy_framework.c | 120 +- SystemConfiguration.fproj/dy_framework.h | 71 +- SystemConfiguration.fproj/genSCPreferences.c | 100 +- .../helper/SCHelper_client.c | 6 +- .../helper/SCHelper_server.c | 131 +- SystemConfiguration.fproj/moh.c | 12 +- .../SCNetworkReachabilityServer_client.c | 145 +- .../SCNetworkReachabilityServer_server.c | 151 +- SystemConfiguration.fproj/scprefs_observer.c | 57 +- SystemConfiguration.fproj/scprefs_observer.h | 21 +- configd.tproj/_configadd.c | 7 +- configd.tproj/_configget.c | 8 +- configd.tproj/_configlist.c | 4 +- configd.tproj/_configset.c | 4 +- configd.tproj/_notifyadd.c | 4 +- configd.tproj/_notifychanges.c | 4 +- configd.tproj/com.apple.configd.plist | 6 - configd.tproj/com.apple.configd_sim.plist | 6 - configd.tproj/configd.h | 3 +- configd.tproj/configd.m | 15 +- ...itlements.plist => entitlements-ios.plist} | 16 +- configd.tproj/plugin_support.c | 95 +- configd.tproj/session.c | 14 +- configd.tproj/session.h | 6 +- configd.tproj/update-mach-services | 143 + configd.xcodeproj/project.pbxproj | 284 +- dnsinfo/dnsinfo_copy.c | 2 +- dnsinfo/dnsinfo_create.c | 10 +- dnsinfo/dnsinfo_flatfile.c | 6 +- dnsinfo/dnsinfo_server.c | 36 +- get-mobility-info | 317 +- .../libSystemConfiguration_server.c | 63 +- nwi/network_information.c | 6 +- nwi/network_information_priv.c | 17 +- nwi/network_information_server.c | 24 +- scselect.tproj/scselect.c | 4 +- scutil.tproj/commands.c | 16 +- scutil.tproj/dictionary.c | 8 +- scutil.tproj/nc.c | 110 +- scutil.tproj/net.c | 126 +- scutil.tproj/net.h | 9 +- scutil.tproj/net_interface.c | 54 +- scutil.tproj/net_protocol.c | 6 +- scutil.tproj/net_service.c | 33 +- scutil.tproj/net_set.c | 54 +- scutil.tproj/notifications.c | 6 +- scutil.tproj/prefs.c | 23 +- scutil.tproj/scutil.c | 59 +- scutil.tproj/tests.c | 338 +- scutil.tproj/tests.h | 12 +- 150 files changed, 41330 insertions(+), 11276 deletions(-) create mode 100644 IPMonitorControl/IPMonitorControl.c create mode 100644 IPMonitorControl/IPMonitorControl.h create mode 100644 IPMonitorControl/IPMonitorControlPrivate.h create mode 100644 IPMonitorControl/IPMonitorControlServer.c create mode 100644 IPMonitorControl/IPMonitorControlServer.h create mode 100644 IPMonitorControl/Makefile create mode 100644 IPMonitorControl/main.c create mode 100644 IPMonitorControl/symbol_scope.h create mode 100644 Plugins/IPMonitor/Info-EmbeddedSimulator.plist rename Plugins/IPMonitor/{test_ipv4_routelist_filter.sh => routelist_output_filter.sh} (100%) create mode 100644 Plugins/IPMonitor/test_ipv6_routelist_reference.txt create mode 100644 Plugins/KernelEventMonitor/ev_extra.h create mode 100644 Plugins/KernelEventMonitor/ev_extra.m create mode 100644 Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist create mode 100644 SystemConfiguration.fproj/SCNetworkMigration.c rename configd.tproj/{entitlements.plist => entitlements-ios.plist} (84%) create mode 100755 configd.tproj/update-mach-services diff --git a/IPMonitorControl/IPMonitorControl.c b/IPMonitorControl/IPMonitorControl.c new file mode 100644 index 0000000..83c6f10 --- /dev/null +++ b/IPMonitorControl/IPMonitorControl.c @@ -0,0 +1,403 @@ +/* + * Copyright (c) 2013-2014 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * IPMonitorControl.c + * - IPC channel to IPMonitor + * - used to create interface rank assertions + */ + +/* + * Modification History + * + * December 16, 2013 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +#include "IPMonitorControl.h" +#include "IPMonitorControlPrivate.h" +#include "symbol_scope.h" +#include +#include +#include +#include +#include + +#ifdef TEST_IPMONITOR_CONTROL +#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) + +#else /* TEST_IPMONITOR_CONTROL */ + +#define my_log(__level, fmt, ...) SCLog(TRUE, __level, CFSTR(fmt), ## __VA_ARGS__) +#endif /* TEST_IPMONITOR_CONTROL */ + +/** + ** IPMonitorControl CF object glue + **/ + +struct IPMonitorControl { + CFRuntimeBase cf_base; + + dispatch_queue_t queue; + xpc_connection_t connection; + CFMutableDictionaryRef assertions; /* ifname = rank */ +}; + +STATIC CFStringRef __IPMonitorControlCopyDebugDesc(CFTypeRef cf); +STATIC void __IPMonitorControlDeallocate(CFTypeRef cf); + +STATIC CFTypeID __kIPMonitorControlTypeID = _kCFRuntimeNotATypeID; + +STATIC const CFRuntimeClass __IPMonitorControlClass = { + 0, /* version */ + "IPMonitorControl", /* className */ + NULL, /* init */ + NULL, /* copy */ + __IPMonitorControlDeallocate, /* deallocate */ + NULL, /* equal */ + NULL, /* hash */ + NULL, /* copyFormattingDesc */ + __IPMonitorControlCopyDebugDesc /* copyDebugDesc */ +}; + +STATIC CFStringRef +__IPMonitorControlCopyDebugDesc(CFTypeRef cf) +{ + CFAllocatorRef allocator = CFGetAllocator(cf); + IPMonitorControlRef control = (IPMonitorControlRef)cf; + + return (CFStringCreateWithFormat(allocator, NULL, + CFSTR(""), + control)); +} + +STATIC void +__IPMonitorControlDeallocate(CFTypeRef cf) +{ + IPMonitorControlRef control = (IPMonitorControlRef)cf; + + if (control->connection != NULL) { + xpc_release(control->connection); + } + if (control->queue != NULL) { + xpc_release(control->queue); + } + return; +} + +/** + ** IPMonitorControl support functions + **/ +STATIC void +__IPMonitorControlRegisterClass(void) +{ + STATIC dispatch_once_t once; + + dispatch_once(&once, ^{ + __kIPMonitorControlTypeID + = _CFRuntimeRegisterClass(&__IPMonitorControlClass); + }); + return; +} + +STATIC IPMonitorControlRef +__IPMonitorControlAllocate(CFAllocatorRef allocator) +{ + IPMonitorControlRef control; + int size; + + __IPMonitorControlRegisterClass(); + size = sizeof(*control) - sizeof(CFRuntimeBase); + control = (IPMonitorControlRef) + _CFRuntimeCreateInstance(allocator, + __kIPMonitorControlTypeID, size, NULL); + bzero(((void *)control) + sizeof(CFRuntimeBase), size); + return (control); +} + +STATIC Boolean +IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, + Boolean * retry_p) +{ + Boolean retry = FALSE; + Boolean success = FALSE; + xpc_type_t type; + + type = xpc_get_type(event); + if (type == XPC_TYPE_DICTIONARY) { + if (async) { + /* we don't expect async responses messages */ + my_log(LOG_NOTICE, "IPMonitorControl: unexpected message"); + } + else { + int64_t error; + + error = xpc_dictionary_get_int64(event, + kIPMonitorControlResponseKeyError); + if (error != 0) { + success = FALSE; +#ifdef TEST_IPMONITOR_CONTROL + my_log(LOG_NOTICE, + "IPMonitorControl: failure code %lld", error); +#endif /* TEST_IPMONITOR_CONTROL */ + } + else { + success = TRUE; + } + } + } + else if (type == XPC_TYPE_ERROR) { + if (event == XPC_ERROR_CONNECTION_INTERRUPTED) { +#ifdef TEST_IPMONITOR_CONTROL + my_log(LOG_NOTICE, "IPMonitorControl: can retry"); +#endif /* TEST_IPMONITOR_CONTROL */ + retry = TRUE; + } + else { + const char * desc; + + desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); + my_log(LOG_NOTICE, "IPMonitorControl: %s", desc); + } + } + else { + my_log(LOG_NOTICE, "IPMonitorControl: unknown event type : %p", type); + } + if (retry_p != NULL) { + *retry_p = retry; + } + return (success); +} + + +STATIC void +IPMonitorControlSetInterfaceRank(IPMonitorControlRef control, + CFStringRef ifname_cf, + SCNetworkServicePrimaryRank rank) +{ + if (control->assertions == NULL) { + if (rank == kSCNetworkServicePrimaryRankDefault) { + /* no assertions, no need to store rank */ + return; + } + control->assertions + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + if (rank == kSCNetworkServicePrimaryRankDefault) { + CFDictionaryRemoveValue(control->assertions, ifname_cf); + if (CFDictionaryGetCount(control->assertions) == 0) { + CFRelease(control->assertions); + control->assertions = NULL; + } + } + else { + CFNumberRef rank_cf; + + rank_cf = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank); + CFDictionarySetValue(control->assertions, ifname_cf, rank_cf); + CFRelease(rank_cf); + } + return; +} + +STATIC void +ApplyInterfaceRank(const void * key, const void * value, void * context) +{ + xpc_connection_t connection = (xpc_connection_t)context; + char ifname[IF_NAMESIZE]; + SCNetworkServicePrimaryRank rank; + xpc_object_t request; + + if (CFStringGetCString(key, ifname, sizeof(ifname), + kCFStringEncodingUTF8) == FALSE) { + return; + } + if (CFNumberGetValue(value, kCFNumberSInt32Type, &rank) == FALSE) { + return; + } + request = xpc_dictionary_create(NULL, NULL, 0); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeSetInterfaceRank); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyPrimaryRank, + rank); + xpc_connection_send_message(connection, request); + xpc_release(request); + return; +} + + +/** + ** IPMonitorControl SPI + **/ +PRIVATE_EXTERN IPMonitorControlRef +IPMonitorControlCreate(void) +{ + xpc_connection_t connection; + IPMonitorControlRef control; + uint64_t flags = XPC_CONNECTION_MACH_SERVICE_PRIVILEGED; + xpc_handler_t handler; + dispatch_queue_t queue; + + control = __IPMonitorControlAllocate(NULL); + queue = dispatch_queue_create("IPMonitorControl", NULL); + connection + = xpc_connection_create_mach_service(kIPMonitorControlServerName, + queue, flags); + handler = ^(xpc_object_t event) { + Boolean retry; + + (void)IPMonitorControlHandleResponse(event, TRUE, &retry); + if (retry && control->assertions != NULL) { + CFDictionaryApplyFunction(control->assertions, + ApplyInterfaceRank, + control->connection); + } + }; + xpc_connection_set_event_handler(connection, handler); + control->connection = connection; + control->queue = queue; + xpc_connection_resume(connection); + return (control); +} + +PRIVATE_EXTERN Boolean +IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, + CFStringRef ifname_cf, + SCNetworkServicePrimaryRank rank) +{ + char ifname[IF_NAMESIZE]; + xpc_object_t request; + Boolean success = FALSE; + + if (CFStringGetCString(ifname_cf, ifname, sizeof(ifname), + kCFStringEncodingUTF8) == FALSE) { + return (FALSE); + } + request = xpc_dictionary_create(NULL, NULL, 0); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeSetInterfaceRank); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyPrimaryRank, + rank); + while (TRUE) { + xpc_object_t reply; + Boolean retry_on_error = FALSE; + + reply = xpc_connection_send_message_with_reply_sync(control->connection, + request); + if (reply == NULL) { + my_log(LOG_NOTICE, "IPMonitorControl: failed to send message"); + break; + } + success = IPMonitorControlHandleResponse(reply, FALSE, + &retry_on_error); + xpc_release(reply); + if (success) { + break; + } + if (retry_on_error) { + continue; + } + my_log(LOG_NOTICE, "IPMonitorControl: fatal error"); + break; + } + xpc_release(request); + if (success) { + /* sync our state */ + CFRetain(ifname_cf); + CFRetain(control); + dispatch_async(control->queue, + ^{ + IPMonitorControlSetInterfaceRank(control, + ifname_cf, + rank); + CFRelease(ifname_cf); + CFRelease(control); + }); + } + return (success); +} + +SCNetworkServicePrimaryRank +IPMonitorControlGetInterfacePrimaryRank(IPMonitorControlRef control, + CFStringRef ifname_cf) +{ + char ifname[IF_NAMESIZE]; + SCNetworkServicePrimaryRank rank; + xpc_object_t request; + + rank = kSCNetworkServicePrimaryRankDefault; + if (CFStringGetCString(ifname_cf, ifname, sizeof(ifname), + kCFStringEncodingUTF8) == FALSE) { + goto done; + } + request = xpc_dictionary_create(NULL, NULL, 0); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeGetInterfaceRank); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + while (TRUE) { + xpc_object_t reply; + Boolean retry_on_error = FALSE; + Boolean success; + + reply = xpc_connection_send_message_with_reply_sync(control->connection, + request); + if (reply == NULL) { + my_log(LOG_NOTICE, "IPMonitorControl: failed to send message"); + break; + } + success = IPMonitorControlHandleResponse(reply, FALSE, &retry_on_error); + if (success) { + rank = (SCNetworkServicePrimaryRank) + xpc_dictionary_get_uint64(reply, + kIPMonitorControlResponseKeyPrimaryRank); + } + xpc_release(reply); + if (success) { + break; + } + if (retry_on_error) { + continue; + } + break; + } + xpc_release(request); + + done: + return (rank); +} + diff --git a/IPMonitorControl/IPMonitorControl.h b/IPMonitorControl/IPMonitorControl.h new file mode 100644 index 0000000..2442a0e --- /dev/null +++ b/IPMonitorControl/IPMonitorControl.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2013 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +#ifndef _IPMONITOR_CONTROL_H +#define _IPMONITOR_CONTROL_H +/* + * IPMonitorControl.h + * - IPC channel to IPMonitor + * - used to create interface rank assertions + */ + +/* + * Modification History + * + * December 16, 2013 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +#include + +struct IPMonitorControl; +typedef struct IPMonitorControl * IPMonitorControlRef; + +IPMonitorControlRef +IPMonitorControlCreate(void); + +Boolean +IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, + CFStringRef ifname, + SCNetworkServicePrimaryRank rank); + +SCNetworkServicePrimaryRank +IPMonitorControlGetInterfacePrimaryRank(IPMonitorControlRef control, + CFStringRef ifname); + +#endif /* _IPMONITOR_CONTROL_H */ diff --git a/IPMonitorControl/IPMonitorControlPrivate.h b/IPMonitorControl/IPMonitorControlPrivate.h new file mode 100644 index 0000000..5e23a5e --- /dev/null +++ b/IPMonitorControl/IPMonitorControlPrivate.h @@ -0,0 +1,29 @@ + +#ifndef _IPMONITOR_CONTROL_PRIVATE_H +#define _IPMONITOR_CONTROL_PRIVATE_H + +#define kIPMonitorControlServerName \ + "com.apple.SystemConfiguration.IPMonitorControl" + +typedef CF_ENUM(uint32_t, IPMonitorControlRequestType) { + kIPMonitorControlRequestTypeNone = 0, + kIPMonitorControlRequestTypeSetInterfaceRank = 1, + kIPMonitorControlRequestTypeGetInterfaceRank = 2, +}; + +/* + * kIPMonitorControlRequestKey* + * - keys used to communicate a request to the server + */ +#define kIPMonitorControlRequestKeyType "Type" +#define kIPMonitorControlRequestKeyInterfaceName "InterfaceName" +#define kIPMonitorControlRequestKeyPrimaryRank "PrimaryRank" + +/* + * kIPMonitorControlResponseKey* + * - keys used to communicate the response from the server + */ +#define kIPMonitorControlResponseKeyError "Error" +#define kIPMonitorControlResponseKeyPrimaryRank "PrimaryRank" + +#endif /* _IPMONITOR_CONTROL_PRIVATE_H */ diff --git a/IPMonitorControl/IPMonitorControlServer.c b/IPMonitorControl/IPMonitorControlServer.c new file mode 100644 index 0000000..e19ccbb --- /dev/null +++ b/IPMonitorControl/IPMonitorControlServer.c @@ -0,0 +1,552 @@ +/* + * Copyright (c) 2013-2014 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * IPMonitorControlServer.c + * - IPC channel to IPMonitor + * - used to create interface rank assertions + */ + +/* + * Modification History + * + * December 16, 2013 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +#include +#include +#include +#include +#include +#include +#include "IPMonitorControlServer.h" +#include "symbol_scope.h" +#include "IPMonitorControlPrivate.h" +#include + +STATIC Boolean * S_verbose; + +#ifdef TEST_IPMONITOR_CONTROL +#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) + +#else /* TEST_IPMONITOR_CONTROL */ +#include "ip_plugin.h" +#endif /* TEST_IPMONITOR_CONTROL */ + +STATIC dispatch_queue_t S_IPMonitorControlServerQueue; + +typedef struct ControlSession ControlSession, * ControlSessionRef; + +#define LIST_HEAD_ControlSession LIST_HEAD(ControlSessionHead, ControlSession) +#define LIST_ENTRY_ControlSession LIST_ENTRY(ControlSession) +LIST_HEAD_ControlSession S_ControlSessions; + +struct ControlSession { + LIST_ENTRY_ControlSession link; + xpc_connection_t connection; + CFMutableDictionaryRef assertions; /* ifname = rank */ +}; + +/** + ** Support Functions + **/ +STATIC CFMutableArrayRef S_if_changes; +STATIC CFRange S_if_changes_range; + +STATIC void +InterfaceChangedListAddInterface(CFStringRef ifname) +{ + if (S_if_changes == NULL) { + S_if_changes = CFArrayCreateMutable(NULL, + 0, &kCFTypeArrayCallBacks); + CFArrayAppendValue(S_if_changes, ifname); + S_if_changes_range.length = 1; + } + else if (CFArrayContainsValue(S_if_changes, S_if_changes_range, + ifname) == FALSE) { + CFArrayAppendValue(S_if_changes, ifname); + S_if_changes_range.length++; + } +} + +STATIC CFArrayRef +InterfaceChangedListCopy(void) +{ + CFArrayRef current_list; + + current_list = S_if_changes; + S_if_changes = NULL; + return (current_list); +} + +STATIC void +InterfaceRankAssertionAdd(const void * key, const void * value, void * context) +{ + CFMutableDictionaryRef * assertions_p; + CFNumberRef existing_rank; + CFNumberRef rank = (CFNumberRef)value; + + assertions_p = (CFMutableDictionaryRef *)context; + if (*assertions_p == NULL) { + *assertions_p + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionarySetValue(*assertions_p, key, value); + return; + } + existing_rank = CFDictionaryGetValue(*assertions_p, key); + if (existing_rank == NULL + || (CFNumberCompare(rank, existing_rank, NULL) + == kCFCompareGreaterThan)) { + CFDictionarySetValue(*assertions_p, key, value); + } + return; +} + +STATIC CFDictionaryRef +InterfaceRankAssertionsCopy(void) +{ + CFMutableDictionaryRef assertions = NULL; + ControlSessionRef session; + + LIST_FOREACH(session, &S_ControlSessions, link) { + if (session->assertions == NULL) { + continue; + } + CFDictionaryApplyFunction(session->assertions, + InterfaceRankAssertionAdd, + &assertions); + } + return (assertions); +} + +STATIC CFRunLoopRef S_runloop; +STATIC CFRunLoopSourceRef S_signal_source; + +STATIC void +SetNotificationInfo(CFRunLoopRef runloop, CFRunLoopSourceRef rls) +{ + S_runloop = runloop; + S_signal_source = rls; + return; +} + +STATIC void +GenerateNotification(void) +{ + if (S_signal_source != NULL) { + CFRunLoopSourceSignal(S_signal_source); + if (S_runloop != NULL) { + CFRunLoopWakeUp(S_runloop); + } + } + return; +} + +/** + ** ControlSession + **/ +STATIC void +AddChangedInterface(const void * key, const void * value, void * context) +{ + InterfaceChangedListAddInterface((CFStringRef)key); + return; +} + +STATIC void +ControlSessionInvalidate(ControlSessionRef session) +{ + if (*S_verbose) { + my_log(LOG_NOTICE, "Invalidating %p", session); + } + LIST_REMOVE(session, link); + if (session->assertions != NULL) { + my_log(LOG_DEBUG, + "IPMonitorControlServer: %p pid %d removing assertions %@", + session->connection, + xpc_connection_get_pid(session->connection), + session->assertions); + CFDictionaryApplyFunction(session->assertions, AddChangedInterface, + NULL); + CFRelease(session->assertions); + session->assertions = NULL; + GenerateNotification(); + } + return; +} + +STATIC void +ControlSessionRelease(void * p) +{ + if (*S_verbose) { + my_log(LOG_NOTICE, "Releasing %p", p); + } + free(p); + return; +} + +STATIC ControlSessionRef +ControlSessionLookup(xpc_connection_t connection) +{ + return ((ControlSessionRef)xpc_connection_get_context(connection)); +} + +STATIC ControlSessionRef +ControlSessionCreate(xpc_connection_t connection) +{ + ControlSessionRef session; + + session = (ControlSessionRef)malloc(sizeof(*session)); + bzero(session, sizeof(*session)); + session->connection = connection; + xpc_connection_set_finalizer_f(connection, ControlSessionRelease); + xpc_connection_set_context(connection, session); + LIST_INSERT_HEAD(&S_ControlSessions, session, link); + if (*S_verbose) { + my_log(LOG_NOTICE, "Created %p (connection %p)", session, connection); + } + return (session); +} + +STATIC ControlSessionRef +ControlSessionGet(xpc_connection_t connection) +{ + ControlSessionRef session; + + session = ControlSessionLookup(connection); + if (session != NULL) { + return (session); + } + return (ControlSessionCreate(connection)); +} + +STATIC void +ControlSessionSetInterfaceRank(ControlSessionRef session, + const char * ifname, + SCNetworkServicePrimaryRank rank) +{ + CFStringRef ifname_cf; + + if (session->assertions == NULL) { + if (rank == kSCNetworkServicePrimaryRankDefault) { + /* no assertions, no need to store rank */ + return; + } + session->assertions + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + ifname_cf = CFStringCreateWithCString(NULL, ifname, + kCFStringEncodingUTF8); + + if (rank == kSCNetworkServicePrimaryRankDefault) { + CFDictionaryRemoveValue(session->assertions, ifname_cf); + if (CFDictionaryGetCount(session->assertions) == 0) { + CFRelease(session->assertions); + session->assertions = NULL; + } + } + else { + CFNumberRef rank_cf; + + rank_cf = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank); + CFDictionarySetValue(session->assertions, ifname_cf, rank_cf); + CFRelease(rank_cf); + } + InterfaceChangedListAddInterface(ifname_cf); + GenerateNotification(); + CFRelease(ifname_cf); + return; +} + +STATIC SCNetworkServicePrimaryRank +ControlSessionGetInterfaceRank(ControlSessionRef session, + const char * ifname) +{ + SCNetworkServicePrimaryRank rank = kSCNetworkServicePrimaryRankDefault; + + if (session->assertions != NULL) { + CFStringRef ifname_cf; + CFNumberRef rank_cf; + + ifname_cf = CFStringCreateWithCString(NULL, ifname, + kCFStringEncodingUTF8); + rank_cf = CFDictionaryGetValue(session->assertions, ifname_cf); + CFRelease(ifname_cf); + if (rank_cf != NULL) { + (void)CFNumberGetValue(rank_cf, kCFNumberSInt32Type, &rank); + } + } + return (rank); +} + +/** + ** IPMonitorControlServer + **/ +STATIC Boolean +IPMonitorControlServerValidateConnection(xpc_connection_t connection) +{ + uid_t uid; + + uid = xpc_connection_get_euid(connection); + return (uid == 0); +} + +STATIC int +IPMonitorControlServerHandleSetInterfaceRank(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) +{ + const char * ifname; + SCNetworkServicePrimaryRank rank; + ControlSessionRef session; + + if (IPMonitorControlServerValidateConnection(connection) == FALSE) { + my_log(LOG_DEBUG, + "IPMonitorControlServer: %p pid %d permission denied", + connection, xpc_connection_get_pid(connection)); + return (EPERM); + } + ifname + = xpc_dictionary_get_string(request, + kIPMonitorControlRequestKeyInterfaceName); + if (ifname == NULL) { + return (EINVAL); + } + rank = (SCNetworkServicePrimaryRank) + xpc_dictionary_get_uint64(request, + kIPMonitorControlRequestKeyPrimaryRank); + switch (rank) { + case kSCNetworkServicePrimaryRankDefault: + case kSCNetworkServicePrimaryRankFirst: + case kSCNetworkServicePrimaryRankLast: + case kSCNetworkServicePrimaryRankNever: + case kSCNetworkServicePrimaryRankScoped: + break; + default: + return (EINVAL); + } + session = ControlSessionGet(connection); + ControlSessionSetInterfaceRank(session, ifname, rank); + my_log(LOG_DEBUG, + "IPMonitorControlServer: %p pid %d set %s %u", + connection, xpc_connection_get_pid(connection), ifname, rank); + return (0); +} + +STATIC int +IPMonitorControlServerHandleGetInterfaceRank(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) +{ + const char * ifname; + SCNetworkServicePrimaryRank rank; + ControlSessionRef session; + + if (reply == NULL) { + /* no point in processing the request if we can't provide an answer */ + return (EINVAL); + } + session = ControlSessionLookup(connection); + if (session == NULL) { + /* no session, no rank assertion */ + return (ENOENT); + } + ifname + = xpc_dictionary_get_string(request, + kIPMonitorControlRequestKeyInterfaceName); + if (ifname == NULL) { + return (EINVAL); + } + rank = ControlSessionGetInterfaceRank(session, ifname); + xpc_dictionary_set_uint64(reply, kIPMonitorControlResponseKeyPrimaryRank, + rank); + return (0); +} + +STATIC void +IPMonitorControlServerHandleDisconnect(xpc_connection_t connection) +{ + ControlSessionRef session; + + if (*S_verbose) { + my_log(LOG_NOTICE, "IPMonitorControlServer: client %p went away", + connection); + } + session = ControlSessionLookup(connection); + if (session == NULL) { + /* never asserted anything */ + return; + } + ControlSessionInvalidate(session); + return; +} + +STATIC void +IPMonitorControlServerHandleRequest(xpc_connection_t connection, + xpc_object_t request) +{ + xpc_type_t type; + + type = xpc_get_type(request); + if (type == XPC_TYPE_DICTIONARY) { + int error = 0; + uint64_t request_type; + xpc_connection_t remote; + xpc_object_t reply; + + request_type + = xpc_dictionary_get_uint64(request, + kIPMonitorControlRequestKeyType); + reply = xpc_dictionary_create_reply(request); + switch (request_type) { + case kIPMonitorControlRequestTypeSetInterfaceRank: + error = IPMonitorControlServerHandleSetInterfaceRank(connection, + request, + reply); + break; + case kIPMonitorControlRequestTypeGetInterfaceRank: + error = IPMonitorControlServerHandleGetInterfaceRank(connection, + request, + reply); + break; + default: + error = EINVAL; + break; + } + if (reply == NULL) { + /* client didn't want a reply */ + return; + } + xpc_dictionary_set_int64(reply, kIPMonitorControlResponseKeyError, + error); + remote = xpc_dictionary_get_remote_connection(request); + xpc_connection_send_message(remote, reply); + xpc_release(reply); + } + else if (type == XPC_TYPE_ERROR) { + if (request == XPC_ERROR_CONNECTION_INVALID) { + IPMonitorControlServerHandleDisconnect(connection); + } + else if (request == XPC_ERROR_CONNECTION_INTERRUPTED) { + my_log(LOG_NOTICE, + "IPMonitorControlServer: connection interrupted"); + } + } + else { + my_log(LOG_NOTICE, "IPMonitorControlServer: unexpected event"); + } + return; +} + +STATIC void +IPMonitorControlServerHandleNewConnection(xpc_connection_t connection) +{ + xpc_handler_t handler; + + handler = ^(xpc_object_t event) { + IPMonitorControlServerHandleRequest(connection, event); + }; + xpc_connection_set_event_handler(connection, handler); + xpc_connection_resume(connection); + return; +} + +STATIC xpc_connection_t +IPMonitorControlServerCreate(dispatch_queue_t queue, const char * name) +{ + uint64_t flags = XPC_CONNECTION_MACH_SERVICE_LISTENER; + xpc_connection_t connection; + xpc_handler_t handler; + + connection = xpc_connection_create_mach_service(name, queue, flags); + if (connection == NULL) { + return (NULL); + } + handler = ^(xpc_object_t event) { + xpc_type_t type; + + type = xpc_get_type(event); + if (type == XPC_TYPE_CONNECTION) { + IPMonitorControlServerHandleNewConnection(event); + } + else if (type == XPC_TYPE_ERROR) { + const char * desc; + + desc = xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION); + if (event == XPC_ERROR_CONNECTION_INVALID) { + my_log(LOG_NOTICE, "IPMonitorControlServer: %s", desc); + xpc_release(connection); + } + else { + my_log(LOG_NOTICE, "IPMonitorControlServer: %s", desc); + } + } + else { + my_log(LOG_NOTICE, "IPMonitorControlServer: unknown event %p", + type); + } + }; + S_IPMonitorControlServerQueue = queue; + xpc_connection_set_event_handler(connection, handler); + xpc_connection_resume(connection); + return (connection); +} + +PRIVATE_EXTERN Boolean +IPMonitorControlServerStart(CFRunLoopRef runloop, CFRunLoopSourceRef rls, + Boolean * verbose) +{ + dispatch_queue_t q; + xpc_connection_t connection; + + S_verbose = verbose; + SetNotificationInfo(runloop, rls); + q = dispatch_queue_create("IPMonitorControlServer", NULL); + connection = IPMonitorControlServerCreate(q, kIPMonitorControlServerName); + if (connection == NULL) { + my_log(LOG_ERR, + "IPMonitorControlServer: failed to create server"); + dispatch_release(q); + return (FALSE); + } + return (TRUE); +} + +PRIVATE_EXTERN CFArrayRef +IPMonitorControlServerCopyInterfaceRankInformation(CFDictionaryRef * info) +{ + __block CFArrayRef changed; + __block CFDictionaryRef dict; + + dispatch_sync(S_IPMonitorControlServerQueue, + ^{ + dict = InterfaceRankAssertionsCopy(); + changed = InterfaceChangedListCopy(); + }); + *info = dict; + return (changed); +} diff --git a/IPMonitorControl/IPMonitorControlServer.h b/IPMonitorControl/IPMonitorControlServer.h new file mode 100644 index 0000000..bb6bcb2 --- /dev/null +++ b/IPMonitorControl/IPMonitorControlServer.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2013 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _IPMONITOR_CONTROL_SERVER_H +#define _IPMONITOR_CONTROL_SERVER_H + +/* + * IPMonitorControlServer.h + * - IPC channel to IPMonitor + * - used to create interface rank assertions + */ + +/* + * Modification History + * + * December 16, 2013 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +#include + +Boolean +IPMonitorControlServerStart(CFRunLoopRef runloop, CFRunLoopSourceRef rls, + Boolean * verbose); + +CFArrayRef +IPMonitorControlServerCopyInterfaceRankInformation(CFDictionaryRef * info); + +#endif /* _IPMONITOR_CONTROL_SERVER_H */ diff --git a/IPMonitorControl/Makefile b/IPMonitorControl/Makefile new file mode 100644 index 0000000..3830ae6 --- /dev/null +++ b/IPMonitorControl/Makefile @@ -0,0 +1,39 @@ +# Default platform uses the native SDK. +# To build for Mac OS X using internal SDK, use 'make PLATFORM=macosx ' +# To build for iOS, use 'make PLATFORM=iphoneos ' + +ifeq ($(PLATFORM),iphoneos) +# iOS internal SDK +CORETELEPHONY=-framework CoreTelephony +ARCHS=armv7 +endif + +ifeq ($(PLATFORM),macosx) +# Mac OS X internal SDK +ARCHS=i386 x86_64 +CORETELEPHONY= +endif + +ifeq ($(PLATFORM),) +# Mac OS X native SDK +ARCHS=x86_64 +CORETELEPHONY= +CC = cc +SYSROOT = / +PF_INC = -F/System/Library/PrivateFrameworks +else +# Mac OS X or iOS internal SDK +SDK=$(PLATFORM).internal +SYSROOT=$(shell xcodebuild -version -sdk $(SDK) Path) +CC = xcrun -sdk $(SDK) cc +PF_INC = -F$(SYSROOT)/System/Library/PrivateFrameworks +endif + +SC_PRIV=-DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS +ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a)) + +if_rank_assert: IPMonitorControlServer.c IPMonitorControl.c main.c + $(CC) $(SC_PRIV) -DTEST_IPMONITOR_CONTROL -I$(SYSROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(ARCH_FLAGS) -isysroot $(SYSROOT) $(PF_INC) -framework CoreFoundation -framework SystemConfiguration -Wall -g -o $@ $^ + +clean: + rm -rf *.dSYM *~ *.o if_rank_assert diff --git a/IPMonitorControl/main.c b/IPMonitorControl/main.c new file mode 100644 index 0000000..7d4080e --- /dev/null +++ b/IPMonitorControl/main.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2013 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * main.c + * - test harness to test IPMonitorControl client and server + */ + +/* + * Modification History + * + * December 16, 2013 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +#include +#include +#include + +#include "IPMonitorControl.h" +#include "IPMonitorControlServer.h" +#include "symbol_scope.h" + +STATIC void +AssertionsChanged(void * info) +{ + CFDictionaryRef assertions = NULL; + CFArrayRef changes; + + changes = IPMonitorControlServerCopyInterfaceRankInformation(&assertions); + SCPrint(TRUE, stdout, CFSTR("Changed interfaces %@\n"), changes); + if (assertions == NULL) { + SCPrint(TRUE, stdout, CFSTR("No assertions\n")); + } + else { + SCPrint(TRUE, stdout, CFSTR("Assertions = %@\n"), assertions); + CFRelease(assertions); + } + if (changes != NULL) { + CFRelease(changes); + } + return; +} + +int +main(int argc, char * argv[]) +{ + if (argc >= 2) { + int ch; + IPMonitorControlRef control; + SCNetworkServicePrimaryRank rank; + Boolean rank_set = FALSE; + + rank = kSCNetworkServicePrimaryRankDefault; + control = IPMonitorControlCreate(); + if (control == NULL) { + fprintf(stderr, "failed to allocate IPMonitorControl\n"); + exit(1); + } + + while ((ch = getopt(argc, argv, "i:r:")) != EOF) { + CFStringRef ifname; + SCNetworkServicePrimaryRank existing_rank; + + switch ((char)ch) { + case 'i': + ifname = CFStringCreateWithCString(NULL, optarg, + kCFStringEncodingUTF8); + existing_rank = IPMonitorControlGetInterfacePrimaryRank(control, + ifname); + printf("%s rank was %u\n", optarg, existing_rank); + if (IPMonitorControlSetInterfacePrimaryRank(control, + ifname, + rank)) { + printf("%s rank set to %u\n", optarg, rank); + rank_set = TRUE; + } + else { + fprintf(stderr, "failed to set rank\n"); + } + CFRelease(ifname); + break; + case 'r': + rank = strtoul(optarg, NULL, 0); + break; + default: + fprintf(stderr, "unexpected option '%c'\n", (char)ch); + exit(1); + break; + } + } + argc -= optind; + argv += optind; + if (argc > 0) { + fprintf(stderr, "ignoring additional parameters\n"); + } + if (rank_set == FALSE) { + exit(1); + } + } + else { + CFRunLoopSourceContext context; + CFRunLoopSourceRef rls; + STATIC Boolean verbose = TRUE; + + bzero(&context, sizeof(context)); + context.info = (void *)NULL; + context.perform = AssertionsChanged; + rls = CFRunLoopSourceCreate(NULL, 0, &context); + CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, + kCFRunLoopDefaultMode); + if (IPMonitorControlServerStart(CFRunLoopGetCurrent(), rls, + &verbose) == FALSE) { + fprintf(stderr, "failed to create connection\n"); + exit(1); + } + } + CFRunLoopRun(); + exit(0); + return (0); +} + diff --git a/IPMonitorControl/symbol_scope.h b/IPMonitorControl/symbol_scope.h new file mode 100644 index 0000000..61fcd4a --- /dev/null +++ b/IPMonitorControl/symbol_scope.h @@ -0,0 +1,16 @@ +#ifndef _S_SYMBOL_SCOPE_H +#define _S_SYMBOL_SCOPE_H + +#ifndef PRIVATE_EXTERN +#define PRIVATE_EXTERN __private_extern__ +#endif /* PRIVATE_EXTERN */ + +#ifndef STATIC +#define STATIC static +#endif /* STATIC */ + +#ifndef INLINE +#define INLINE static __inline__ +#endif /* INLINE */ + +#endif /* _S_SYMBOL_SCOPE_H */ diff --git a/Makefile b/Makefile index 79147d2..2434948 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ VERSION=$(shell basename `pwd -P` | sed -e 's/.*-\([0-9][0-9.]*$$\)/\1/') all : /usr/local/bin/buildit . \ - -noinstallsrc -noinstallhdrs -noverify -nosum \ - -arch i386 -arch x86_64 -arch ppc \ + -noinstallsrc -noinstallhdrs -noverify \ + -arch x86_64 \ -target All \ -project ${PROJECT}-${VERSION} \ -configuration Debug \ @@ -24,13 +24,14 @@ all : darwin : /usr/local/bin/buildit . \ - -noinstallsrc -noinstallhdrs -noverify -nosum \ - -arch i386 -arch x86_64 -arch ppc \ + -novalidateParameters \ + -noinstallsrc -noinstallhdrs -noverify \ + -arch x86_64 \ -target All \ -project ${PROJECT}_darwin-${VERSION} \ -configuration Debug \ -release $(shell cat /usr/share/buildit/.releaseName) \ - -othercflags "\"-D_OPEN_SOURCE_\"" \ + -othercflags "\"-D__OPEN_SOURCE__\"" \ #---------------------------------------------------------------------- # @@ -47,8 +48,8 @@ LION_SDKROOT=$(shell xcodebuild -version -sdk macosx10.7internal Path) lion : /usr/local/bin/buildit . \ - -noinstallsrc -noinstallhdrs -noverify -nosum \ - -arch i386 -arch x86_64 \ + -noinstallsrc -noinstallhdrs -noverify \ + -arch x86_64 \ -target All \ -project ${PROJECT}-${VERSION} \ -configuration Debug \ diff --git a/Plugins/IPMonitor/Info-EmbeddedSimulator.plist b/Plugins/IPMonitor/Info-EmbeddedSimulator.plist new file mode 100644 index 0000000..ca9a22b --- /dev/null +++ b/Plugins/IPMonitor/Info-EmbeddedSimulator.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + IPMonitor + CFBundleIdentifier + com.apple.SystemConfiguration.IPMonitor + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + com.apple.SystemConfiguration.IPMonitor + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.13 + CFBundleSignature + ???? + CFBundleVersion + 1.13 + Requires + + com.apple.SystemConfiguration.IPConfiguration + com.apple.SystemConfiguration.PreferencesMonitor + com.apple.SystemConfiguration.SCNetworkReachability + + Builtin + + mdns_timeout + 5 + pdns_timeout + 5 + AppendStateArrayToSetupArray + + SupplementalProxiesFollowSupplementalDNS + + MachServices + + com.apple.SystemConfiguration.DNSConfiguration_sim + + com.apple.SystemConfiguration.NetworkInformation_sim + + + + diff --git a/Plugins/IPMonitor/Info.plist b/Plugins/IPMonitor/Info.plist index 4da4b0c..adb5cbd 100644 --- a/Plugins/IPMonitor/Info.plist +++ b/Plugins/IPMonitor/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 Requires com.apple.SystemConfiguration.IPConfiguration @@ -34,5 +34,14 @@ 5 AppendStateArrayToSetupArray + MachServices + + com.apple.SystemConfiguration.DNSConfiguration + + com.apple.SystemConfiguration.NetworkInformation + + com.apple.SystemConfiguration.IPMonitorControl + + diff --git a/Plugins/IPMonitor/Makefile b/Plugins/IPMonitor/Makefile index 41bb910..044b35a 100644 --- a/Plugins/IPMonitor/Makefile +++ b/Plugins/IPMonitor/Makefile @@ -1,8 +1,8 @@ EXTRA_CFLAGS= -TEST_INCLUDE=-I. -I../common -I../../dnsinfo -I../../nwi -I../../libSystemConfiguration -I../../SystemConfiguration.fproj +TEST_INCLUDE=-I. -I../common -I../../dnsinfo -I../../nwi -I../../libSystemConfiguration -I../../SystemConfiguration.fproj -I../../IPMonitorControl -I/System/Library/Frameworks/System.framework/PrivateHeaders -all: test_ipv4_routelist +all: test_ipv4_routelist test_ipv6_routelist # ---------- @@ -28,10 +28,10 @@ proxy-configuration.o: proxy-configuration.h proxy-configuration.c cc ${TEST_INCLUDE} -Wall -O0 -g -c proxy-configuration.c set-hostname.o: set-hostname.c - cc ${TEST_INCLUDE} -Wall -O0 -g -c set-hostname.c + cc ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c set-hostname.c smb-configuration.o: smb-configuration.c - cc ${TEST_INCLUDE} -Wall -O0 -g -c smb-configuration.c + cc ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c smb-configuration.c libSystemConfiguration_client.o: ../../libSystemConfiguration/libSystemConfiguration_client.h ../../libSystemConfiguration/libSystemConfiguration_client.c cc ${TEST_INCLUDE} -Wall -O0 -g -c ../../libSystemConfiguration/libSystemConfiguration_client.c @@ -42,16 +42,19 @@ libSystemConfiguration_server.o: ../../libSystemConfiguration/libSystemConfigura IPMonitorControlPrefs.o: ../common/IPMonitorControlPrefs.h ../common/IPMonitorControlPrefs.c cc ${TEST_INCLUDE} -Wall -O0 -g -c ../common/IPMonitorControlPrefs.c +IPMonitorControlServer.o: ../../IPMonitorControl/IPMonitorControlServer.c + cc ${TEST_INCLUDE} -Wall -O0 -g -c $^ + # ---------- -dns-configurationX.o: dns-configuration.h dns-configuration.c dnsinfo_create.o +dns-configurationX.o: Makefile dns-configuration.h dns-configuration.c dnsinfo_create.o cc -DMAIN ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o dns-configurationX.o dns-configuration.c -ip_pluginX.o: ip_plugin.c - cc ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o ip_pluginX.o ip_plugin.c +ip_pluginX.o: Makefile ip_plugin.c + cc -DTEST_DNS ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o ip_pluginX.o ip_plugin.c -test_dns: Makefile dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o libSystemConfiguration_client.o libSystemConfiguration_server.o - cc -Wall -O0 -g -o test_dns dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation +test_dns: Makefile dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o libSystemConfiguration_client.o libSystemConfiguration_server.o IPMonitorControlServer.o + cc -Wall -O0 -g -o test_dns dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o libSystemConfiguration_client.o libSystemConfiguration_server.o IPMonitorControlServer.o -framework SystemConfiguration -framework CoreFoundation # ---------- @@ -60,25 +63,53 @@ test_proxy: Makefile proxy-configuration.h proxy-configuration.c # ---------- +set-hostnameX.o: Makefile set-hostname.h set-hostname.c + cc -DMAIN -DDEBUG ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o set-hostnameX.o set-hostname.c + +test_hostname: Makefile dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configuration.o smb-configuration.o proxy-configuration.o set-hostnameX.o libSystemConfiguration_client.o libSystemConfiguration_server.o IPMonitorControlServer.o + cc -Wall -O0 -g -o test_hostname dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configuration.o smb-configuration.o proxy-configuration.o set-hostnameX.o libSystemConfiguration_client.o libSystemConfiguration_server.o IPMonitorControlServer.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation + +# ---------- + smb-configurationX.o: smb-configuration.h smb-configuration.c - cc -DMAIN ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o smb-configurationX.o smb-configuration.c + cc -DMAIN -DDEBUG ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o smb-configurationX.o smb-configuration.c -test_smb: Makefile dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configuration.o smb-configurationX.o proxy-configuration.o set-hostname.o libSystemConfiguration_client.o libSystemConfiguration_server.o - cc -Wall -O0 -g -o test_smb dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configuration.o smb-configurationX.o proxy-configuration.o set-hostname.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation +test_smb: Makefile dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configuration.o smb-configurationX.o proxy-configuration.o set-hostname.o libSystemConfiguration_client.o libSystemConfiguration_server.o IPMonitorControlServer.o + cc -Wall -O0 -g -o test_smb dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o ip_pluginX.o IPMonitorControlPrefs.o network_information_priv.o network_information_server.o dns-configuration.o smb-configurationX.o proxy-configuration.o set-hostname.o libSystemConfiguration_client.o libSystemConfiguration_server.o IPMonitorControlServer.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation # ---------- test_ipv4_routelist.o: ip_plugin.c - cc -DTEST_IPV4_ROUTELIST ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o test_ipv4_routelist.o ip_plugin.c + cc -DTEST_IPV4_ROUTELIST ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o $@ $^ -test_ipv4_routelist: test_ipv4_routelist.o IPMonitorControlPrefs.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_information_priv.o network_information_server.o smb-configuration.o proxy-configuration.o libSystemConfiguration_server.o - cc -Wall -O0 -g -o test_ipv4_routelist test_ipv4_routelist.o IPMonitorControlPrefs.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_information_priv.o network_information_server.o smb-configuration.o proxy-configuration.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation +test_ipv4_routelist: test_ipv4_routelist.o IPMonitorControlPrefs.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_information_priv.o network_information_server.o smb-configuration.o proxy-configuration.o libSystemConfiguration_server.o IPMonitorControlServer.o + cc -Wformat -Wall -O0 -g -o $@ $^ ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation test_ipv4_routelist_reference.txt: test_ipv4_routelist - sh test_reference.sh create test_ipv4_routelist test_ipv4_routelist_reference.txt test_ipv4_routelist_filter.sh + sh test_reference.sh create test_ipv4_routelist test_ipv4_routelist_reference.txt routelist_output_filter.sh test_ipv4_routelist_test: test_ipv4_routelist - sh test_reference.sh test test_ipv4_routelist test_ipv4_routelist_reference.txt test_ipv4_routelist_filter.sh + sh test_reference.sh test test_ipv4_routelist test_ipv4_routelist_reference.txt routelist_output_filter.sh + +test_ipv4_routelist_coverage: test_ipv4_routelist + test_ipv4_routelist -1 | grep Hit | awk '{print $$2}' | sort | uniq + +# ---------- + +test_ipv6_routelist.o: ip_plugin.c + cc -DTEST_IPV6_ROUTELIST ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o $@ $^ + +test_ipv6_routelist: test_ipv6_routelist.o IPMonitorControlPrefs.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_information_priv.o network_information_server.o smb-configuration.o proxy-configuration.o libSystemConfiguration_server.o IPMonitorControlServer.o + cc -Wformat -Wall -O0 -g -o $@ $^ ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation + +test_ipv6_routelist_reference.txt: test_ipv6_routelist + sh test_reference.sh create test_ipv6_routelist test_ipv6_routelist_reference.txt routelist_output_filter.sh + +test_ipv6_routelist_test: test_ipv6_routelist + sh test_reference.sh test test_ipv6_routelist test_ipv6_routelist_reference.txt routelist_output_filter.sh + +test_ipv6_routelist_coverage: test_ipv6_routelist + test_ipv6_routelist -1 | grep Hit | awk '{print $$2}' | sort | uniq # ---------- @@ -91,9 +122,4 @@ IPMonitor: IPMonitor.o IPMonitorControlPrefs.o dnsinfo_create.o dnsinfo_flatfile # ---------- clean: - rm -rf *.o \ - test_dns test_dns.dSYM \ - test_proxy test_proxy.dSYM \ - test_smb test_smb.dSYM \ - test_ipv4_routelist test_ipv4_routelist.dSYM \ - IPMonitor IPMonitor.dSYM + rm -rf *.dSYM *.o test_dns test_hostname test_proxy test_smb test_ipv4_routelist test_ipv6_routelist IPMonitor diff --git a/Plugins/IPMonitor/dns-configuration.c b/Plugins/IPMonitor/dns-configuration.c index 5815609..e2c31e2 100644 --- a/Plugins/IPMonitor/dns-configuration.c +++ b/Plugins/IPMonitor/dns-configuration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -90,13 +90,6 @@ static CFNumberRef S_pdns_timeout = NULL; #pragma mark DNS resolver flags -static __inline__ boolean_t -dns_resolver_flags_all_queries(uint32_t query_flags) -{ - return ((query_flags & DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS) == DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS); -} - - static void @@ -108,89 +101,15 @@ add_dns_query_flags(const void *key, const void *value, void *context) // check if the service has v4 or v6 configured - if ((*query_flags & DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS) == 0) { - CFDictionaryRef v4_dict; - - v4_dict = CFDictionaryGetValue(service, kSCEntNetIPv4); - if (v4_dict != NULL) { - CFDictionaryRef v4_service; - - v4_service = CFDictionaryGetValue(v4_dict, kIPv4DictService); - if (isA_CFDictionary(v4_service)) { - CFArrayRef if_addrs; - CFBooleanRef is_null; - - is_null = CFDictionaryGetValue(v4_service, kIsNULL); - if_addrs = CFDictionaryGetValue(v4_service, kSCPropNetIPv4Addresses); - if (isA_CFBoolean(is_null) != NULL && CFBooleanGetValue(is_null)) { - // ignore this service - } - else if (isA_CFArray(if_addrs) != NULL) { - int i; - int count; - - count = CFArrayGetCount(if_addrs); - for (i = 0; i < count; i++) { - CFStringRef if_addr; - struct in_addr v4_addr; - - if_addr = CFArrayGetValueAtIndex(if_addrs, i); - if (isA_CFString(if_addr) == NULL) { - continue; - } - - cfstring_to_ip(if_addr, &v4_addr); - if (!IN_LINKLOCAL(ntohl(v4_addr.s_addr))) { - // set the request v4 dns record bit - *query_flags |= DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS; - break; - } - } - } - } - } + if ((*query_flags & DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS) == 0 + && service_contains_protocol(service, AF_INET)) { + *query_flags |= DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS; } - - if ((*query_flags & DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) == 0) { - CFDictionaryRef v6_dict; - - v6_dict = CFDictionaryGetValue(service, kSCEntNetIPv6); - if (isA_CFDictionary(v6_dict) != NULL) { - CFArrayRef if_addrs6; - CFBooleanRef is_null; - - is_null = CFDictionaryGetValue(v6_dict, kIsNULL); - if_addrs6 = CFDictionaryGetValue(v6_dict, kSCPropNetIPv6Addresses); - if (isA_CFBoolean(is_null) != NULL && CFBooleanGetValue(is_null)) { - // ignore this service - } - else if (isA_CFArray(if_addrs6) != NULL) { - int i; - int count; - - count = CFArrayGetCount(if_addrs6); - for (i = 0; i < count; i++) { - CFStringRef if_addr6; - struct in6_addr v6_addr; - - if_addr6 = CFArrayGetValueAtIndex(if_addrs6, i); - if (isA_CFString(if_addr6) == NULL) { - continue; - } - - cfstring_to_ip6(if_addr6, &v6_addr); - if (!IN6_IS_ADDR_LINKLOCAL(&v6_addr) - && !IN6_IS_ADDR_MC_LINKLOCAL(&v6_addr)) { - // set the request v6 dns record bit - *query_flags |= DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS; - break; - } - } - } - } + if ((*query_flags & DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS) == 0 + && service_contains_protocol(service, AF_INET6)) { + *query_flags |= DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS; } - return; } @@ -270,7 +189,7 @@ add_resolver(CFMutableArrayRef resolvers, CFMutableDictionaryRef resolver) if_name, sizeof(if_name), kCFStringEncodingASCII) != NULL) { - if_index = if_nametoindex(if_name); + if_index = my_if_nametoindex(if_name); } if ((if_index != 0) && @@ -458,7 +377,7 @@ add_supplemental_resolvers(CFMutableArrayRef resolvers, defaultOrder = DEFAULT_SEARCH_ORDER - (DEFAULT_SEARCH_ORDER / 2) - + ((DEFAULT_SEARCH_ORDER / 1000) * i); + + ((DEFAULT_SEARCH_ORDER / 1000) * (uint32_t)i); if ((n_order > 0) && !CFArrayContainsValue(service_order, CFRangeMake(0, n_order), keys[i])) { // push out services not specified in service order @@ -543,7 +462,7 @@ add_multicast_resolvers(CFMutableArrayRef resolvers, CFArrayRef multicastResolve defaultOrder = DEFAULT_SEARCH_ORDER + (DEFAULT_SEARCH_ORDER / 2) - + ((DEFAULT_SEARCH_ORDER / 1000) * i); + + ((DEFAULT_SEARCH_ORDER / 1000) * (uint32_t)i); resolver = CFDictionaryCreateMutable(NULL, 0, @@ -587,7 +506,7 @@ add_private_resolvers(CFMutableArrayRef resolvers, CFArrayRef privateResolvers) defaultOrder = DEFAULT_SEARCH_ORDER - (DEFAULT_SEARCH_ORDER / 4) - + ((DEFAULT_SEARCH_ORDER / 1000) * i); + + ((DEFAULT_SEARCH_ORDER / 1000) * (uint32_t)i); resolver = CFDictionaryCreateMutable(NULL, 0, @@ -699,41 +618,10 @@ extract_search_domains(CFMutableDictionaryRef defaultDomain, CFArrayRef suppleme } else { defaultDomainName = _SC_trimDomain(defaultDomainName); if (defaultDomainName != NULL) { - CFStringRef defaultOptions; char *domain; int domain_parts = 1; char *dp; - int ndots = 1; - -#define NDOTS_OPT "ndots=" -#define NDOTS_OPT_LEN (sizeof("ndots=") - 1) - - defaultOptions = CFDictionaryGetValue(defaultDomain, kSCPropNetDNSOptions); - if (defaultOptions != NULL) { - char *cp; - char *options; - - options = _SC_cfstring_to_cstring(defaultOptions, - NULL, - 0, - kCFStringEncodingUTF8); - cp = strstr(options, NDOTS_OPT); - if ((cp != NULL) && - ((cp == options) || isspace(cp[-1])) && - ((cp[NDOTS_OPT_LEN] != '\0') && isdigit(cp[NDOTS_OPT_LEN]))) { - char *end; - long val; - - cp += NDOTS_OPT_LEN; - errno = 0; - val = strtol(cp, &end, 10); - if ((*cp != '\0') && (cp != end) && (errno == 0) && - ((*end == '\0') || isspace(*end)) && (val > 0)) { - ndots = val; - } - } - CFAllocatorDeallocate(NULL, options); - } + const int ndots = 1; domain = _SC_cfstring_to_cstring(defaultDomainName, NULL, @@ -965,7 +853,7 @@ add_scoped_resolvers(CFMutableArrayRef scoped, CFDictionaryRef services, CFArray if_name, sizeof(if_name), kCFStringEncodingASCII) == NULL) || - (if_nametoindex(if_name) == 0)) { + (my_if_nametoindex(if_name) == 0)) { // if interface index not available continue; } @@ -1184,7 +1072,7 @@ create_resolver(CFDictionaryRef dns) _dns_resolver_set_if_index(&_resolver, if_index); if ((if_index != 0) && - (if_indextoname(if_index, if_name) != NULL)) { + (my_if_indextoname(if_index, if_name) != NULL)) { targetInterface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingASCII); @@ -1232,8 +1120,7 @@ create_resolver(CFDictionaryRef dns) } if ((addr.sa.sa_family == AF_INET6) && - (IN6_IS_ADDR_LINKLOCAL(&addr.sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&addr.sin6.sin6_addr)) && + IN6_IS_ADDR_LINKLOCAL(&addr.sin6.sin6_addr) && (addr.sin6.sin6_scope_id == 0) && (targetInterfaceIndex != 0)) { // for link local [IPv6] addresses, if the scope id is not @@ -1806,20 +1693,17 @@ split(const void * key, const void * value, void * context) if (CFEqual(entity_id, kSCEntNetIPv4) || CFEqual(entity_id, kSCEntNetIPv6)) { + CFDictionaryRef dict; CFStringRef interface; if (CFEqual(entity_id, kSCEntNetIPv4)) { - CFMutableDictionaryRef ipv4_dict; - - ipv4_dict = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - CFDictionarySetValue(ipv4_dict, kIPv4DictService, (CFDictionaryRef)value); - CFDictionarySetValue(state_dict, entity_id, ipv4_dict); - CFRelease(ipv4_dict); - } else { - CFDictionarySetValue(state_dict, entity_id, (CFDictionaryRef)value); + dict = ipv4_dict_create(value); + } + else { + dict = ipv6_dict_create(value); + } + if (dict != NULL) { + CFDictionarySetValue(state_dict, entity_id, dict); } interface = CFDictionaryGetValue((CFDictionaryRef)value, kSCPropInterfaceName); diff --git a/Plugins/IPMonitor/ip_plugin.c b/Plugins/IPMonitor/ip_plugin.c index 328ceb9..d111ad4 100644 --- a/Plugins/IPMonitor/ip_plugin.c +++ b/Plugins/IPMonitor/ip_plugin.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All Rights Reserved. + * Copyright (c) 2000-2014 Apple Inc. All Rights Reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -66,6 +66,9 @@ * * December 5, 2007 Dieter Siegmund (dieter@apple.com) * - added support for multiple scoped routes + * + * November 13, 2013 Dieter Siegmund (dieter@apple.com) + * - added generic IPv4 routing support */ #include @@ -101,9 +104,7 @@ #include #include "dnsinfo_server.h" -#if defined(HAVE_IPSEC_STATUS) || defined(HAVE_VPN_STATUS) #include -#endif // !defined(HAVE_IPSEC_STATUS) || defined(HAVE_VPN_STATUS) #include #ifndef kDNSServiceCompMulticastDNS @@ -116,13 +117,26 @@ #include "network_information_priv.h" #include "network_information_server.h" #include +#include "ip_plugin.h" +#if !TARGET_IPHONE_SIMULATOR +#include "set-hostname.h" +#endif /* !TARGET_IPHONE_SIMULATOR */ -enum { - kProtocolFlagsNone = 0x0, - kProtocolFlagsIPv4 = 0x1, - kProtocolFlagsIPv6 = 0x2 +#include "dns-configuration.h" +#include "proxy-configuration.h" + +#if !TARGET_OS_IPHONE +#include "smb-configuration.h" +#endif /* !TARGET_OS_IPHONE */ + +#define kLoopbackInterface "lo0" +#define EROUTENOTAPPLIED 1001 + +typedef CF_ENUM(uint8_t, ProtocolFlags) { + kProtocolFlagsNone = 0x0, + kProtocolFlagsIPv4 = 0x1, + kProtocolFlagsIPv6 = 0x2 }; -typedef uint8_t ProtocolFlags; enum { kDebugFlag1 = 0x00000001, @@ -133,22 +147,172 @@ enum { kDebugFlagAll = 0xffffffff }; -#ifdef TEST_IPV4_ROUTELIST -#define ROUTELIST_DEBUG(a, f) { if ((S_IPMonitor_debug & (f)) != 0) printf a ;} -#else -#define ROUTELIST_DEBUG(a, f) -#endif +typedef unsigned int IFIndex; -#if !TARGET_IPHONE_SIMULATOR -#include "set-hostname.h" -#endif /* !TARGET_IPHONE_SIMULATOR */ +#ifndef TEST_ROUTELIST -#include "dns-configuration.h" -#include "proxy-configuration.h" +#define ROUTELIST_DEBUG(flag, fmt, ...) -#if !TARGET_OS_IPHONE -#include "smb-configuration.h" -#endif /* !TARGET_OS_IPHONE */ +static struct if_nameindex * S_if_nameindex_cache; + +__private_extern__ IFIndex +my_if_nametoindex(const char * ifname) +{ + IFIndex idx = 0; + struct if_nameindex * scan; + + if (S_if_nameindex_cache == NULL) { + return (if_nametoindex(ifname)); + } + for (scan = S_if_nameindex_cache; + scan->if_index != 0 && scan->if_name != NULL; + scan++) { + if (strcmp(scan->if_name, ifname) == 0) { + idx = scan->if_index; + break; + } + } + return (idx); +} + +__private_extern__ const char * +my_if_indextoname(IFIndex idx, char if_name[IFNAMSIZ]) +{ + const char * name = NULL; + struct if_nameindex * scan; + + if (S_if_nameindex_cache == NULL) { + return (if_indextoname(idx, if_name)); + } + for (scan = S_if_nameindex_cache; + scan->if_index != 0 && scan->if_name != NULL; + scan++) { + if (scan->if_index == idx) { + name = if_name; + strlcpy(if_name, scan->if_name, IFNAMSIZ); + break; + } + } + return (name); +} + +static void +my_if_freenameindex(void) +{ + if (S_if_nameindex_cache != NULL) { + if_freenameindex(S_if_nameindex_cache); + S_if_nameindex_cache = NULL; + } + return; +} + +static void +my_if_nameindex(void) +{ + my_if_freenameindex(); + S_if_nameindex_cache = if_nameindex(); + return; +} + + +#else /* TEST_ROUTELIST */ + +#define ROUTELIST_DEBUG(flags, format, ...) { if (((S_IPMonitor_debug & (flags)) != 0)) printf((format), ## __VA_ARGS__ ); } + + +static const char * * list; +static int list_count; +static int list_size; + +__private_extern__ IFIndex +my_if_nametoindex(const char * ifname) +{ + IFIndex ret; + + if (list == NULL) { + list_size = 4; + list_count = 2; + list = (const char * *)malloc(sizeof(*list) * list_size); + list[0] = strdup(""); + list[1] = strdup(kLoopbackInterface); + } + else { + int i; + + for (i = 1; i < list_count; i++) { + if (strcmp(list[i], ifname) == 0) { + ret = i; + goto done; + } + } + } + if (list_count == list_size) { + list_size += 2; + list = (const char * *)realloc(list, sizeof(*list) * list_size); + } + list[list_count] = strdup(ifname); + ret = list_count; + list_count++; + done: + return (ret); +} + +__private_extern__ const char * +my_if_indextoname(IFIndex idx, char if_name[IFNAMSIZ]) +{ + const char * name = NULL; + + if (idx < list_count) { + name = if_name; + strlcpy(if_name, list[idx], IFNAMSIZ); + } + return (name); +} + +static void +my_if_nameindex(void) +{ +} + +static void +my_if_freenameindex(void) +{ +} + +#endif /* TEST_ROUTELIST */ + +static const char * +my_if_indextoname2(IFIndex ifindex, char ifname[IFNAMSIZ]) +{ + if (ifindex == 0) { + return (NULL); + } + if (my_if_indextoname(ifindex, ifname) == NULL) { + snprintf(ifname, IFNAMSIZ, "[%d]", ifindex); + } + return (ifname); +} + + +static IFIndex +lo0_ifindex(void) +{ + static IFIndex idx; + + if (idx == 0) { + idx = my_if_nametoindex(kLoopbackInterface); + } + return (idx); +} + + +/* + * Property: kServiceOptionRankAssertion + * Purpose: + * Key used in the service options dictionary to hold the RankAssertion + * derived from the kSCPropNetServicePrimaryRank string. + */ +#define kServiceOptionRankAssertion CFSTR("RankAssertion") /* number */ /* * Property: kIPIsCoupled @@ -169,77 +333,123 @@ enum { #define IP_CH(ip) ((u_char *)(ip)) #define IP_LIST(ip) IP_CH(ip)[0],IP_CH(ip)[1],IP_CH(ip)[2],IP_CH(ip)[3] -#include "ip_plugin.h" -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) static SCLoggerRef S_IPMonitor_logger; -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) -static boolean_t S_bundle_logging_verbose; +static Boolean S_bundle_logging_verbose; /* * IPv4 Route management */ -typedef uint32_t RouteFlags; +typedef CF_ENUM(uint16_t, RouteFlags) { + kRouteFlagsIsScoped = 0x0001, + kRouteFlagsHasGateway = 0x0002, + kRouteFlagsIsHost = 0x0004, + kRouteFlagsIsNULL = 0x0008, + kRouteFlagsKernelManaged = 0x0010 +}; -enum { - kRouteIsDirectToInterfaceFlag = 0x00000001, - kRouteIsNotSubnetLocalFlag = 0x00000002, - kRouteIsScopedFlag = 0x00000004, - kRouteIsNULLFlag = 0x00000008 +typedef CF_ENUM(uint16_t, ControlFlags) { + kControlFlagsProcessed = 0x0001, + kControlFlagsAdded = 0x0002, }; +#define ROUTE_COMMON \ + int prefix_length; \ + IFIndex ifindex; \ + IFIndex exclude_ifindex; \ + Rank rank; \ + RouteFlags flags; \ + ControlFlags control_flags; + +typedef struct { + ROUTE_COMMON +} Route, * RouteRef; + typedef struct { + ROUTE_COMMON struct in_addr dest; struct in_addr mask; struct in_addr gateway; - char ifname[IFNAMSIZ]; - unsigned int ifindex; struct in_addr ifa; - Rank rank; - RouteFlags flags; -} IPv4Route, *IPv4RouteRef; +} IPv4Route, * IPv4RouteRef; typedef struct { - int count; - int size; - boolean_t exclude_from_nwi; + ROUTE_COMMON + struct in6_addr dest; + struct in6_addr gateway; + struct in6_addr ifa; +} IPv6Route, * IPv6RouteRef; + +typedef CF_ENUM(uint16_t, RouteListFlags) { + kRouteListFlagsExcludeNWI = 0x0001, + kRouteListFlagsHasDefault = 0x0002 +}; + +#define ROUTELIST_COMMON \ + int count; \ + int size; \ + RouteListFlags flags; + +typedef struct { + ROUTELIST_COMMON +} RouteListCommon, * RouteListRef; + +typedef struct { + ROUTELIST_COMMON IPv4Route list[1]; /* variable length */ -} IPv4RouteList, *IPv4RouteListRef; +} IPv4RouteList, * IPv4RouteListRef; -enum { - kIPv4RouteListAddRouteCommand, - kIPv4RouteListRemoveRouteCommand -}; +typedef struct { + ROUTELIST_COMMON + IPv6Route list[1]; /* variable length */ +} IPv6RouteList, * IPv6RouteListRef; + +typedef union { + void * ptr; + RouteListRef common; + IPv4RouteListRef v4; + IPv6RouteListRef v6; +} RouteListUnion; + +typedef enum { + kRouteCommandAdd, + kRouteCommandRemove +} RouteCommand; /* * Election Information * - information about the current best services */ +typedef union { + struct in_addr v4; + struct in6_addr v6; +} in_addr; + +typedef union { + struct sockaddr_in v4; + struct sockaddr_in6 v6; +} in_sockaddr; + typedef struct Candidate { - CFStringRef serviceID; - CFStringRef if_name; - union { - struct in_addr v4; - struct in6_addr v6; - } addr; - Rank rank; - boolean_t ip_is_coupled; - SCNetworkReachabilityFlags reachability_flags; - union { - struct sockaddr_in vpn_server_addr4; - struct sockaddr_in6 vpn_server_addr6; - } vpn_server_addr; - CFStringRef signature; + CFStringRef serviceID; + CFStringRef if_name; + Rank rank; + boolean_t ip_is_coupled; + SCNetworkReachabilityFlags reachability_flags; + in_addr addr; + in_sockaddr vpn_server_addr; + CFStringRef signature; } Candidate, * CandidateRef; typedef struct ElectionResults { - int count; - int size; - Candidate candidates[1]; + int af; + int count; + int size; + Candidate candidates[1]; } ElectionResults, * ElectionResultsRef; -static __inline__ unsigned int +static __inline__ size_t ElectionResultsComputeSize(unsigned int n) { return (offsetof(ElectionResults, candidates[n])); @@ -250,8 +460,8 @@ ElectionResultsComputeSize(unsigned int n) * Purpose: * A 32-bit value to encode the relative rank of a service. * - * The top 8 bits are used to hold the rank assertion (first, last - * never, default). + * The top 8 bits are used to hold the rank assertion (first, default, last, + * never, scoped); * * The bottom 24 bits are used to store the service index (i.e. the * position within the service order array). @@ -261,9 +471,10 @@ ElectionResultsComputeSize(unsigned int n) #define kRankAssertionDefault RANK_ASSERTION_MAKE(1) #define kRankAssertionLast RANK_ASSERTION_MAKE(2) #define kRankAssertionNever RANK_ASSERTION_MAKE(3) +#define kRankAssertionScoped RANK_ASSERTION_MAKE(4) #define kRankAssertionMask RANK_ASSERTION_MAKE(0xff) #define RANK_ASSERTION_MASK(r) ((Rank)(r) & kRankAssertionMask) - +#define RANK_ASSERTION_GET(r) ((Rank)(r) >> 24) #define RANK_INDEX_MAKE(r) ((Rank)(r)) #define kRankIndexMask RANK_INDEX_MAKE(0xffffff) #define RANK_INDEX_MASK(r) ((Rank)(r) & kRankIndexMask) @@ -274,24 +485,59 @@ RankMake(uint32_t service_index, Rank primary_rank) return (RANK_INDEX_MASK(service_index) | RANK_ASSERTION_MASK(primary_rank)); } -static __inline__ Rank -PrimaryRankGetRankAssertion(CFStringRef primaryRank) +static Rank +InterfaceRankGetRankAssertion(CFNumberRef rank_cf, Boolean * ret_is_set) { - if (CFEqual(primaryRank, kSCValNetServicePrimaryRankNever)) { - return kRankAssertionNever; - } else if (CFEqual(primaryRank, kSCValNetServicePrimaryRankFirst)) { - return kRankAssertionFirst; - } else if (CFEqual(primaryRank, kSCValNetServicePrimaryRankLast)) { - return kRankAssertionLast; + SCNetworkServicePrimaryRank if_rank; + Boolean is_set = FALSE; + Rank rank = kRankAssertionDefault; + + if (rank_cf != NULL + && CFNumberGetValue(rank_cf, kCFNumberSInt32Type, &if_rank) + && if_rank != kSCNetworkServicePrimaryRankDefault) { + if (if_rank == kSCNetworkServicePrimaryRankFirst) { + rank = kRankAssertionFirst; + } + else { + rank = RANK_ASSERTION_MAKE(if_rank); + } + is_set = TRUE; } - return kRankAssertionDefault; + if (ret_is_set != NULL) { + *ret_is_set = is_set; + } + return (rank); } -typedef uint32_t IPv4RouteListApplyCommand; +static Rank +PrimaryRankGetRankAssertion(CFStringRef rank_str, Boolean * is_set) +{ + int i; + struct { + const CFStringRef * name; + Rank rank_assertion; + } values[] = { + { &kSCValNetServicePrimaryRankFirst, kRankAssertionFirst }, + { &kSCValNetServicePrimaryRankLast, kRankAssertionLast }, + { &kSCValNetServicePrimaryRankNever, kRankAssertionNever }, + { &kSCValNetServicePrimaryRankScoped, kRankAssertionScoped } + }; -typedef void IPv4RouteListApplyCallBackFunc(IPv4RouteListApplyCommand cmd, - IPv4RouteRef route, void * arg); -typedef IPv4RouteListApplyCallBackFunc * IPv4RouteListApplyCallBackFuncPtr; + if (rank_str != NULL) { + for (i = 0; i < countof(values); i++) { + if (CFEqual(rank_str, *(values[i].name))) { + if (is_set != NULL) { + *is_set = TRUE; + } + return (values[i].rank_assertion); + } + } + } + if (is_set != NULL) { + *is_set = FALSE; + } + return (kRankAssertionDefault); +} /* SCDynamicStore session */ static SCDynamicStoreRef S_session = NULL; @@ -304,10 +550,8 @@ static Boolean S_IPMonitor_verbose = FALSE; static boolean_t S_netboot = FALSE; /* is scoped routing enabled? */ -#ifdef RTF_IFSCOPE static boolean_t S_scopedroute = FALSE; static boolean_t S_scopedroute_v6 = FALSE; -#endif /* RTF_IFSCOPE */ /* dictionary to hold per-service state: key is the serviceID */ static CFMutableDictionaryRef S_service_state_dict = NULL; @@ -315,7 +559,7 @@ static CFMutableDictionaryRef S_ipv4_service_rank_dict = NULL; static CFMutableDictionaryRef S_ipv6_service_rank_dict = NULL; /* dictionary to hold per-interface rank information */ -static CFMutableDictionaryRef S_if_rank_dict = NULL; +static CFDictionaryRef S_if_rank_dict; /* if set, a PPP interface overrides the primary */ static boolean_t S_ppp_override_primary = FALSE; @@ -343,10 +587,9 @@ static CFStringRef S_private_resolvers = NULL; #if !TARGET_IPHONE_SIMULATOR static IPv4RouteListRef S_ipv4_routelist = NULL; -#endif /* !TARGET_IPHONE_SIMULATOR */ +static IPv6RouteListRef S_ipv6_routelist = NULL; -static const struct in_addr S_ip_zeros = { 0 }; -static const struct in6_addr S_ip6_zeros = IN6ADDR_ANY_INIT; +#endif /* !TARGET_IPHONE_SIMULATOR */ static boolean_t S_append_state = FALSE; @@ -383,13 +626,13 @@ static CFDictionaryRef S_smb_dict = NULL; #ifndef KERN_NETBOOT #define KERN_NETBOOT 40 /* int: are we netbooted? 1=yes,0=no */ -#endif //KERN_NETBOOT +#endif /* KERN_NETBOOT */ /** ** entityType*, GetEntityChanges* ** - definitions for the entity types we handle **/ -enum { +typedef enum { kEntityTypeIPv4 = 0, kEntityTypeIPv6, kEntityTypeDNS, @@ -398,10 +641,9 @@ enum { kEntityTypeSMB, #endif /* !TARGET_OS_IPHONE */ ENTITY_TYPES_COUNT, - kEntityTypeVPNStatus, + kEntityTypeTransientStatus, kEntityTypeServiceOptions = 31 -}; -typedef uint32_t EntityType; +} EntityType; static const CFStringRef *entityTypeNames[ENTITY_TYPES_COUNT] = { &kSCEntNetIPv4, /* 0 */ @@ -428,41 +670,72 @@ ipvx_other_char(int af) return ((af == AF_INET) ? '6' : '4'); } -static IPv4RouteListRef -ipv4_dict_get_routelist(CFDictionaryRef ipv4_dict) +/* + * IPv4/IPv6 Service Dict keys: kIPDictRoutes, IPDictService + * + * The IPv4/IPv6 service dictionary contains two sub-dictionaries: + * Routes CFData containing IPv4RouteList/IPv6RouteList + * Service dictionary containing kSCEntNetIPv[46] service entity + */ +#define kIPDictRoutes CFSTR("Routes") /* data */ +#define kIPDictService CFSTR("Service") /* dict */ + +static CFDictionaryRef +ipdict_create(CFDictionaryRef dict, CFDataRef routes_data) { - CFDataRef routes; - IPv4RouteListRef routes_list = NULL; + CFStringRef keys[2]; + CFTypeRef values[2]; - if (isA_CFDictionary(ipv4_dict) == NULL) { - return (NULL); - } + keys[0] = kIPDictService; + values[0] = dict; + keys[1] = kIPDictRoutes; + values[1] = routes_data; + return (CFDictionaryCreate(NULL, + (const void * *)keys, + values, + countof(keys), + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks)); +} + +static void * +ipdict_get_routelist(CFDictionaryRef dict) +{ + void * routes_list = NULL; - routes = CFDictionaryGetValue(ipv4_dict, kIPv4DictRoutes); + if (dict != NULL) { + CFDataRef routes; - if (routes != NULL) { - routes_list = (IPv4RouteListRef)(void*)CFDataGetBytePtr(routes); + routes = CFDictionaryGetValue(dict, kIPDictRoutes); + if (routes != NULL) { + routes_list = (void *)CFDataGetBytePtr(routes); + } } return (routes_list); } -static CFStringRef -ipv4_dict_get_ifname(CFDictionaryRef ipv4_dict) +static CFDictionaryRef +ipdict_get_service(CFDictionaryRef dict) { - CFDictionaryRef ipv4_service_dict = NULL; + CFDictionaryRef ip_dict = NULL; - if (isA_CFDictionary(ipv4_dict) == NULL) { - return (NULL); + if (dict != NULL) { + ip_dict = CFDictionaryGetValue(dict, kIPDictService); } + return (ip_dict); +} - ipv4_service_dict = CFDictionaryGetValue(ipv4_dict, - kIPv4DictService); +static CFStringRef +ipdict_get_ifname(CFDictionaryRef dict) +{ + CFStringRef ifname = NULL; + CFDictionaryRef ip_dict; - if (isA_CFDictionary(ipv4_service_dict) == NULL) { - return NULL; + ip_dict = ipdict_get_service(dict); + if (ip_dict != NULL) { + ifname = CFDictionaryGetValue(ip_dict, kSCPropInterfaceName); } - - return CFDictionaryGetValue(ipv4_service_dict, kSCPropInterfaceName); + return (ifname); } typedef boolean_t GetEntityChangesFunc(CFStringRef serviceID, @@ -509,27 +782,6 @@ typedef struct { CFMutableDictionaryRef set; } keyChangeList, * keyChangeListRef; -static CFStringRef -my_CFStringCopyComponent(CFStringRef path, CFStringRef separator, - CFIndex component_index) -{ - CFArrayRef arr; - CFStringRef component = NULL; - - arr = CFStringCreateArrayBySeparatingStrings(NULL, path, separator); - if (arr == NULL) { - goto done; - } - if (CFArrayGetCount(arr) <= component_index) { - goto done; - } - component = CFRetain(CFArrayGetValueAtIndex(arr, component_index)); - - done: - my_CFRelease(&arr); - return (component); -} - static void keyChangeListInit(keyChangeListRef keys) { @@ -634,7 +886,7 @@ S_nwi_ifstate_dump(nwi_ifstate_t ifstate, int i) sizeof(vpn_ntopbuf)); } my_log(LOG_DEBUG, - " [%d]: %s%s%s%s rank 0x%x iaddr: %s%s%s reachability_flags %u", + " [%d]: %s%s%s%s rank 0x%x iaddr %s%s%s reach_flags 0x%x", i, ifstate->ifname, ifstate->diff_str != NULL ? ifstate->diff_str : "", (ifstate->flags & NWI_IFSTATE_FLAGS_HAS_DNS) != 0 @@ -661,8 +913,8 @@ S_nwi_state_dump(nwi_state_t state) } my_log(LOG_DEBUG, "nwi_state = { " - "gen = %llu size = %u #ipv4 = %u #ipv6 = %u " - "reach_flags_v4 = %u reach_flags_v6 %u }", + "gen=%llu size=%u #v4=%u #v6=%u " + "reach_flags=(v4=0x%x, v6=0x%x) }", state->generation_count, state->size, state->ipv4_count, @@ -700,14 +952,28 @@ S_is_network_boot() return (netboot); } +static int rtm_seq = 0; + #if !TARGET_IPHONE_SIMULATOR +static int +open_routing_socket(void) +{ + int sockfd; + + if ((sockfd = socket(PF_ROUTE, SOCK_RAW, PF_ROUTE)) == -1) { + my_log(LOG_NOTICE, + "IPMonitor: open_routing_socket: socket failed, %s", + strerror(errno)); + } + return (sockfd); +} + static __inline__ int inet6_dgram_socket() { return (socket(AF_INET6, SOCK_DGRAM, 0)); } -#ifdef SIOCDRADD_IN6 static int siocdradd_in6(int s, int if_index, const struct in6_addr * addr, u_char flags) { @@ -738,10 +1004,9 @@ siocdrdel_in6(int s, int if_index, const struct in6_addr * addr) dr.if_index = if_index; return (ioctl(s, SIOCDRDEL_IN6, &dr)); } -#endif /* SIOCDRADD_IN6 */ + #endif /* !TARGET_IPHONE_SIMULATOR */ -#ifdef RTF_IFSCOPE static boolean_t S_is_scoped_routing_enabled() { @@ -771,7 +1036,6 @@ S_is_scoped_v6_routing_enabled() } return (scopedroute_v6); } -#endif /* RTF_IFSCOPE */ static void my_CFArrayAppendUniqueValue(CFMutableArrayRef arr, CFTypeRef new) @@ -799,6 +1063,18 @@ my_CFArrayRemoveValue(CFMutableArrayRef arr, CFStringRef key) return; } +static CFArrayRef +my_CFArrayCreateCombinedArray(CFArrayRef array1, CFArrayRef array2) +{ + CFMutableArrayRef combined; + + combined = CFArrayCreateMutableCopy(NULL, 0, array1); + CFArrayAppendArray(combined, + array2, + CFRangeMake(0, CFArrayGetCount(array2))); + return (combined); +} + static void my_CFRelease(void * t) { @@ -875,6 +1151,15 @@ cfstring_to_ip6(CFStringRef str, struct in6_addr * ip6_p) return (cfstring_to_ipvx(AF_INET6, str, ip6_p, sizeof(*ip6_p))); } +static boolean_t +cfnumber_to_int(CFNumberRef num, int * int_val) +{ + if (isA_CFNumber(num) == NULL) { + return (FALSE); + } + return (CFNumberGetValue(num, kCFNumberIntType, int_val)); +} + static CF_RETURNS_RETAINED CFStringRef setup_service_key(CFStringRef serviceID, CFStringRef entity) { @@ -893,6 +1178,15 @@ state_service_key(CFStringRef serviceID, CFStringRef entity) entity)); } +static CFStringRef +interface_entity_key_copy(CFStringRef ifname, CFStringRef entity) +{ + return (SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + ifname, + entity)); +} + static CFDictionaryRef get_service_setup_entity(CFDictionaryRef services_info, CFStringRef serviceID, CFStringRef entity) @@ -933,6 +1227,63 @@ dict_get_first_ip(CFDictionaryRef dict, CFStringRef prop, struct in_addr * ip_p) return (FALSE); } +static boolean_t +dict_get_first_ipv6(CFDictionaryRef dict, CFStringRef prop, + struct in6_addr * ip_p) +{ + CFArrayRef ip_list; + + ip_list = CFDictionaryGetValue(dict, prop); + if (isA_CFArray(ip_list) != NULL + && CFArrayGetCount(ip_list) > 0 + && cfstring_to_ip6(CFArrayGetValueAtIndex(ip_list, 0), ip_p)) { + return (TRUE); + } + return (FALSE); +} + +static boolean_t +dict_get_first_int(CFDictionaryRef dict, CFStringRef prop, + int * val) +{ + CFArrayRef list; + + list = CFDictionaryGetValue(dict, prop); + if (isA_CFArray(list) != NULL + && CFArrayGetCount(list) > 0 + && cfnumber_to_int(CFArrayGetValueAtIndex(list, 0), val)) { + return (TRUE); + } + return (FALSE); +} + +static boolean_t +dict_get_ip(CFDictionaryRef dict, CFStringRef prop, struct in_addr * ip_p) +{ + CFStringRef val; + + val = CFDictionaryGetValue(dict, prop); + return (cfstring_to_ip(val, ip_p)); +} + +static boolean_t +dict_get_ipv6(CFDictionaryRef dict, CFStringRef prop, struct in6_addr * ip_p) +{ + CFStringRef val; + + val = CFDictionaryGetValue(dict, prop); + return (cfstring_to_ip6(val, ip_p)); +} + +static boolean_t +dict_get_int(CFDictionaryRef dict, CFStringRef prop, int * intval) +{ + CFNumberRef val; + + val = CFDictionaryGetValue(dict, prop); + return (cfnumber_to_int(val, intval)); +} + static boolean_t get_override_primary(CFDictionaryRef dict) { @@ -956,126 +1307,110 @@ get_override_primary(CFDictionaryRef dict) } /** - ** IPv4Route* + ** Route* **/ -static __inline__ struct in_addr -subnet_addr(struct in_addr addr, struct in_addr mask) -{ - struct in_addr net; +typedef size_t +(*RouteListComputeSize)(CFIndex n); - net.s_addr = addr.s_addr & mask.s_addr; - return (net); -} +typedef boolean_t +(*RouteIsEqual)(RouteRef a, RouteRef b); -static __inline__ int -in_addr_cmp(struct in_addr a, struct in_addr b) -{ - return (uint32_cmp(ntohl(a.s_addr), ntohl(b.s_addr))); -} +typedef int +(*RouteApply)(RouteRef route, int cmd, int sockfd); -static __inline__ int -RouteFlagsCompare(RouteFlags a, RouteFlags b) -{ - return (uint32_cmp(a, b)); -} +typedef const void * +(*RouteGateway)(RouteRef route); -static void -IPv4RouteCopyDescriptionWithString(IPv4RouteRef r, CFMutableStringRef str) -{ - Rank rank_assertion = RANK_ASSERTION_MASK(r->rank); - - CFStringAppendFormat(str, NULL, - CFSTR("Dest " IP_FORMAT - " Mask " IP_FORMAT - " Gate " IP_FORMAT - " Ifp %s Ifa " IP_FORMAT), - IP_LIST(&r->dest), - IP_LIST(&r->mask), - IP_LIST(&r->gateway), - (r->ifname[0] != '\0') ? r->ifname : "", - IP_LIST(&r->ifa)); - if ((r->flags & kRouteIsNULLFlag) != 0) { - CFStringAppend(str, CFSTR(" [null]")); - } - else { - if ((r->flags & kRouteIsNotSubnetLocalFlag) != 0) { - CFStringAppend(str, CFSTR(" [non-local]")); - } - else if ((r->flags & kRouteIsDirectToInterfaceFlag) != 0) { - CFStringAppend(str, CFSTR(" [direct]")); - } - switch (rank_assertion) { - case kRankAssertionFirst: - CFStringAppend(str, CFSTR(" [first]")); - break; - case kRankAssertionLast: - CFStringAppend(str, CFSTR(" [last]")); - break; - case kRankAssertionNever: - CFStringAppend(str, CFSTR(" [never]")); - break; - default: - break; - } - if ((r->flags & kRouteIsScopedFlag) != 0) { - CFStringAppend(str, CFSTR(" [SCOPED]")); - } - } - return; -} +typedef void +(*RouteSetGateway)(RouteRef route, const void * address); -static CFStringRef -IPv4RouteCopyDescription(IPv4RouteRef r) -{ - CFMutableStringRef str; +typedef const void * +(*RouteDestination)(RouteRef route); - str = CFStringCreateMutable(NULL, 0); - IPv4RouteCopyDescriptionWithString(r, str); - return (str); -} +typedef boolean_t +(*RouteSameSubnet)(RouteRef route, const void * address); -static __inline__ void -IPv4RoutePrint(IPv4RouteRef route) -{ - CFStringRef str = IPv4RouteCopyDescription(route); +typedef CFStringRef +(*RouteCopyDescription)(RouteRef route); - SCPrint(TRUE, stdout, CFSTR("%@\n"), str); - CFRelease(str); - return; -} +typedef void +(*RouteLog)(int priority, RouteRef route, const char * msg); -static __inline__ void -IPv4RouteLog(int level, IPv4RouteRef route) -{ - CFStringRef str = IPv4RouteCopyDescription(route); +typedef struct { + RouteListComputeSize list_compute_size; - my_log(level, "%@", str); - CFRelease(str); - return; + RouteIsEqual route_equal; + RouteApply route_apply; + RouteGateway route_gateway; + RouteSetGateway route_set_gateway; + RouteDestination route_destination; + RouteSameSubnet route_same_subnet; + RouteLog route_log; + RouteCopyDescription route_copy_description; + + int element_size; + int address_size; + int all_bits_set; +} RouteListInfo; + +typedef const RouteListInfo * RouteListInfoRef; + +typedef struct { + RouteListInfoRef info; + RouteListRef old_routes; + RouteListRef new_routes; + int sockfd; + int depth; +} RouteListApplyContext, * RouteListApplyContextRef; + + +static int +RouteAddressCompare(RouteListInfoRef info, + const void * addr1, + const void * addr2) +{ + return (memcmp(addr1, addr2, info->address_size)); } static int -IPv4RouteCompare(IPv4RouteRef a, Rank a_rank, - IPv4RouteRef b, Rank b_rank, boolean_t * same_dest) +RouteCompare(RouteListInfoRef info, + RouteRef a, Rank a_rank, + RouteRef b, Rank b_rank, boolean_t * same_dest) { - int cmp; + int cmp; + RouteDestination route_destination; + RouteCopyDescription route_copy_description; *same_dest = FALSE; - cmp = in_addr_cmp(a->dest, b->dest); + route_destination = info->route_destination; + route_copy_description = info->route_copy_description; + cmp = RouteAddressCompare(info, + (*route_destination)(a), + (*route_destination)(b)); if (cmp == 0) { - cmp = in_addr_cmp(a->mask, b->mask); + cmp = a->prefix_length - b->prefix_length; if (cmp == 0) { - int name_cmp = strcmp(a->ifname, b->ifname); + int index_cmp = a->ifindex - b->ifindex; - if (name_cmp == 0) { + if (index_cmp == 0) { + cmp = 0; + } + else if ((a->ifindex == 0 || b->ifindex == 0) + && (a->flags & kRouteFlagsIsScoped) == 0 + && (b->flags & kRouteFlagsIsScoped) == 0) { + /* + * Either of the routes specifies no interface and neither + * route is scoped. Claim they are equal to eliminate the + * duplicate route. + */ cmp = 0; } else { *same_dest = TRUE; cmp = RankCompare(a_rank, b_rank); if (cmp == 0) { - cmp = name_cmp; + cmp = index_cmp; } } } @@ -1094,8 +1429,8 @@ IPv4RouteCompare(IPv4RouteRef a, Rank a_rank, else { ch = '>'; } - a_str = IPv4RouteCopyDescription(a); - b_str = IPv4RouteCopyDescription(b); + a_str = (*route_copy_description)(a); + b_str = (*route_copy_description)(b); my_log(LOG_DEBUG, "%@ rank 0x%x %c %@ rank 0x%x", a_str, a_rank, ch, b_str, b_rank); CFRelease(a_str); @@ -1104,126 +1439,101 @@ IPv4RouteCompare(IPv4RouteRef a, Rank a_rank, return (cmp); } -static CFMutableStringRef -IPv4RouteListCopyDescription(IPv4RouteListRef routes) +static RouteRef +RouteListGetRouteAtIndexSimple(RouteListInfoRef info, RouteListRef routes, + CFIndex where) { - int i; - IPv4RouteRef r; - CFMutableStringRef str; + return ((void *)routes + (*info->list_compute_size)(where)); +} - str = CFStringCreateMutable(NULL, 0); - CFStringAppendFormat(str, NULL, CFSTR(" = {"), - routes->count); - for (i = 0, r = routes->list; i < routes->count; i++, r++) { - CFStringAppendFormat(str, NULL, CFSTR("\n%2d. "), i); - IPv4RouteCopyDescriptionWithString(r, str); +static RouteRef +RouteListGetRouteAtIndex(RouteListInfoRef info, RouteListRef routes, + CFIndex where) +{ + if (routes->count == 0 + || where >= routes->count) { + return (NULL); } - CFStringAppend(str, CFSTR("\n}")); - return (str); + return (RouteListGetRouteAtIndexSimple(info, routes, where)); } -static __inline__ void -IPv4RouteListPrint(IPv4RouteListRef routes) +static RouteRef +RouteListGetFirstRoute(RouteListInfoRef info, RouteListRef routes) { - CFStringRef str = IPv4RouteListCopyDescription(routes); - - SCPrint(TRUE, stdout, CFSTR("%@\n"), str); - CFRelease(str); - return; + return (RouteListGetRouteAtIndexSimple(info, routes, 0)); } -static __inline__ void -IPv4RouteListLog(int level, IPv4RouteListRef routes) +#if !TARGET_IPHONE_SIMULATOR +static CFIndex +RouteListRouteIndex(RouteListInfoRef info, RouteListRef routes, + RouteRef route) { - CFStringRef str = IPv4RouteListCopyDescription(routes); - - my_log(level, "%@", str); - CFRelease(str); - return; + return (((void *)route + - (void *)RouteListGetFirstRoute(info, routes)) + / info->element_size); } +#endif /* !TARGET_IPHONE_SIMULATOR */ -static __inline__ unsigned int -IPv4RouteListComputeSize(unsigned int n) +static RouteRef +RouteGetNextRoute(RouteListInfoRef info, RouteRef route) { - return (offsetof(IPv4RouteList, list[n])); + return ((RouteRef)(((void *)route) + info->element_size)); } -#if !TARGET_IPHONE_SIMULATOR -static IPv4RouteRef -IPv4RouteListFindRoute(IPv4RouteListRef routes, IPv4RouteRef route) +static RouteRef +RouteListAddRouteAtIndex(RouteListInfoRef info, RouteListRef routes, + RouteRef this_route, CFIndex where) { - int i; - IPv4RouteRef scan_result = NULL; - IPv4RouteRef scan; + RouteRef insert_route; - for (i = 0, scan = routes->list; i < routes->count; i++, scan++) { - if ((scan->dest.s_addr == route->dest.s_addr) - && (scan->mask.s_addr == route->mask.s_addr) - && (strcmp(scan->ifname, route->ifname) == 0) - && (scan->ifa.s_addr == route->ifa.s_addr) - && (scan->gateway.s_addr == route->gateway.s_addr) - && (scan->flags == route->flags)) { - scan_result = scan; - break; - } + if (where == kCFNotFound) { + /* add it to the end */ + insert_route + = RouteListGetRouteAtIndexSimple(info, routes, routes->count); + } + else { + /* make space at [where] */ + insert_route = RouteListGetRouteAtIndexSimple(info, routes, where); + bcopy(insert_route, + (void *)insert_route + info->element_size, + info->element_size * (routes->count - where)); } - return (scan_result); + /* copy the route */ + bcopy(this_route, insert_route, info->element_size); + routes->count++; + return (insert_route); } static void -IPv4RouteListApply(IPv4RouteListRef old_routes, IPv4RouteListRef new_routes, - IPv4RouteListApplyCallBackFuncPtr func, void * arg) +RouteListRemoveRouteAtIndex(RouteListInfoRef info, RouteListRef routes, + CFIndex where) { - int i; - IPv4RouteRef scan; - - if (old_routes == new_routes && old_routes == NULL) { - /* both old and new are NULL, so there's nothing to do */ + if (routes->count == 0 + || where >= routes->count) { return; } - if (old_routes != NULL) { - for (i = 0, scan = old_routes->list; - i < old_routes->count; - i++, scan++) { - IPv4RouteRef new_route = NULL; - - if (new_routes != NULL) { - new_route = IPv4RouteListFindRoute(new_routes, scan); - } - if (new_route == NULL) { - if (func != NULL) { - (*func)(kIPv4RouteListRemoveRouteCommand, scan, arg); - } - } - } + routes->count--; + if (where == routes->count) { + /* last slot, decrementing gets rid of it */ } - if (new_routes != NULL) { - for (i = 0, scan = new_routes->list; - i < new_routes->count; - i++, scan++) { - IPv4RouteRef old_route = NULL; + else { + RouteRef remove_route; - if (old_routes != NULL) { - old_route = IPv4RouteListFindRoute(old_routes, scan); - } - if (old_route == NULL) { - if (func != NULL) { - (*func)(kIPv4RouteListAddRouteCommand, scan, arg); - } - } - } + remove_route = RouteListGetRouteAtIndexSimple(info, routes, where); + bcopy((void *)remove_route + info->element_size, + remove_route, + info->element_size * (routes->count - where)); } return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ /* - * Function: IPv4RouteListAddRoute + * Function: RouteListAddRoute * * Purpose: - * Add the given IPv4Route to the list of routes, eliminating lower-ranked + * Add the given route to the list of routes, eliminating lower-ranked * duplicates on the same interface, and marking any lower ranked duplicates - * on other interfaces with kRouteIsScopedFlag. + * on other interfaces with kRouteFlagsIsScoped. * * This routine assumes that if routes is not NULL, it is malloc'd memory. * @@ -1232,51 +1542,54 @@ IPv4RouteListApply(IPv4RouteListRef old_routes, IPv4RouteListRef new_routes, * due to using realloc'd memory. */ -enum { +typedef enum { kScopeNone = 0, kScopeThis = 1, kScopeNext = 2 -}; +} Scope; -static IPv4RouteListRef -IPv4RouteListAddRoute(IPv4RouteListRef routes, int init_size, - IPv4RouteRef this_route, Rank this_rank) +static RouteListRef +RouteListAddRoute(RouteListInfoRef info, + RouteListRef routes, int init_size, + RouteRef this_route, Rank this_rank) { - int i; - IPv4RouteRef first_scan = NULL; - int scope_which = kScopeNone; - IPv4RouteRef scan; - int where = -1; + CFIndex i; + RouteRef first_scan = NULL; + RouteFlags flags; + RouteRef scan; + Scope scope_which = kScopeNone; + CFIndex where = kCFNotFound; if (routes == NULL) { - routes = (IPv4RouteListRef)malloc(IPv4RouteListComputeSize(init_size)); + size_t alloc_size = (*info->list_compute_size)(init_size); + + routes = (RouteListRef)malloc(alloc_size); bzero(routes, sizeof(*routes)); routes->size = init_size; - routes->count = 0; } - for (i = 0, scan = routes->list; i < routes->count; - i++, scan++) { + for (i = 0, scan = RouteListGetFirstRoute(info, routes); + i < routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { int cmp; boolean_t same_dest; - cmp = IPv4RouteCompare(this_route, this_rank, scan, scan->rank, &same_dest); - + cmp = RouteCompare(info, this_route, this_rank, scan, scan->rank, + &same_dest); if (same_dest == TRUE && first_scan == NULL) { first_scan = scan; } - if (cmp < 0) { - if (where == -1) { + if (where == kCFNotFound) { if (same_dest == TRUE - && (first_scan->flags & kRouteIsScopedFlag) == 0) { - if ((scan->flags & kRouteIsScopedFlag) != 0) { - ROUTELIST_DEBUG(("Hit 1: set scope on self\n"), - kDebugFlag8); + && (first_scan->flags & kRouteFlagsIsScoped) == 0) { + if ((scan->flags & kRouteFlagsIsScoped) != 0) { + ROUTELIST_DEBUG(kDebugFlag8, + "Hit 1: set scope on self\n"); scope_which = kScopeThis; } else { - ROUTELIST_DEBUG(("Hit 2: set scope on next\n"), - kDebugFlag8); + ROUTELIST_DEBUG(kDebugFlag8, + "Hit 2: set scope on next\n"); scope_which = kScopeNext; } } @@ -1286,37 +1599,53 @@ IPv4RouteListAddRoute(IPv4RouteListRef routes, int init_size, } else if (cmp == 0) { /* exact match */ - if (where != -1) { + /* exact match */ + if (where != kCFNotFound + && scan->ifindex == this_route->ifindex + && scan->exclude_ifindex == 0 + && this_route->exclude_ifindex == 0) { /* this route is a duplicate */ - ROUTELIST_DEBUG(("Hit 3: removing [%d]\n", i), kDebugFlag8); - routes->count--; - if (i == routes->count) { - /* last slot, decrementing gets rid of it */ - } - else { - bcopy(routes->list + i + 1, - routes->list + i, - sizeof(routes->list[0]) * (routes->count - i)); - } + ROUTELIST_DEBUG(kDebugFlag8, "Hit 3: removing [%ld]\n", i); + RouteListRemoveRouteAtIndex(info, routes, i); break; } - /* resolve conflict using rank */ - if (this_rank < scan->rank) { + /* + * this_route is "better" than scan if this_route is not excluded + * and scan is excluded or this_route sorts ahead of scan + */ + if (this_route->exclude_ifindex == 0 + && (scan->exclude_ifindex != 0 || this_rank < scan->rank)) { + IFIndex ifindex = 0; boolean_t is_scoped = FALSE; - if (scan->flags & kRouteIsScopedFlag) { + if (scan->flags & kRouteFlagsIsScoped) { is_scoped = TRUE; } - ROUTELIST_DEBUG(("Hit 4:replacing [%d] rank 0x%x < 0x%x\n", - i, - this_rank, - scan->rank), kDebugFlag8); - *scan = *this_route; + if (this_rank < scan->rank) { + ROUTELIST_DEBUG(kDebugFlag8, + "Hit 4a: replacing [%ld]" + " rank 0x%x < 0x%x\n", + i, this_rank, scan->rank); + } + else { + ROUTELIST_DEBUG(kDebugFlag8, + "Hit 4b: replacing [%ld] excluded route\n", + i); + } + if (scan->ifindex != 0) { + ifindex = scan->ifindex; + } + else if (this_route->ifindex != 0) { + ifindex = this_route->ifindex; + } + bcopy(this_route, scan, info->element_size); scan->rank = this_rank; + scan->ifindex = ifindex; + scan->exclude_ifindex = 0; if (is_scoped) { /* preserve whether route was scoped */ - ROUTELIST_DEBUG(("Hit 5: preserved scope\n"), kDebugFlag8); - scan->flags |= kRouteIsScopedFlag; + ROUTELIST_DEBUG(kDebugFlag8, "Hit 5: preserved scope\n"); + scan->flags |= kRouteFlagsIsScoped; } } /* we're done */ @@ -1325,5447 +1654,7746 @@ IPv4RouteListAddRoute(IPv4RouteListRef routes, int init_size, else { if (same_dest == TRUE) { if (scope_which == kScopeNone) { - ROUTELIST_DEBUG(("Hit 10: set scope on self\n"), - kDebugFlag8); + ROUTELIST_DEBUG(kDebugFlag8, "Hit 6: set scope on self\n"); scope_which = kScopeThis; } } -#ifdef TEST_IPV4_ROUTELIST - else if (where != -1) { +#ifdef TEST_ROUTELIST + else if (where != kCFNotFound) { /* not possible because we maintain a sorted list */ - ROUTELIST_DEBUG(("Hit 11: moved past routes - can't happen\n"), - kDebugFlag8); + fprintf(stderr, + "Hit 7: moved past routes - can't happen\n"); + exit(2); break; } -#endif /* TEST_IPV4_ROUTELIST */ +#endif /* TEST_ROUTELIST */ } } + if (routes->size == routes->count) { - int how_many; - IPv4RouteListRef new_routes; - int old_size; + int how_many; + RouteListRef new_routes; + int old_size; /* double the size */ old_size = routes->size; how_many = old_size * 2; - new_routes = (IPv4RouteListRef) - realloc(routes, IPv4RouteListComputeSize(how_many)); + new_routes = (RouteListRef) + reallocf(routes, (*info->list_compute_size)(how_many)); if (new_routes == NULL) { /* no memory */ + routes = NULL; goto done; } - ROUTELIST_DEBUG(("increasing size from %d to %d\n", old_size, - how_many), kDebugFlag8); + ROUTELIST_DEBUG(kDebugFlag8, "increasing size from %d to %d\n", + old_size, how_many); new_routes->size = how_many; routes = new_routes; } - if (where == -1) { - /* add it to the end */ - where = routes->count; - } - else { - /* insert it at [where] */ - bcopy(routes->list + where, - routes->list + where + 1, - sizeof(routes->list[0]) * (routes->count - where)); - } - /* copy the route */ - routes->list[where] = *this_route; - routes->list[where].rank = this_rank; + + /* add/insert the new route */ + this_route = RouteListAddRouteAtIndex(info, routes, this_route, where); + this_route->rank = this_rank; + flags = 0; if (RANK_ASSERTION_MASK(this_rank) == kRankAssertionNever) { - routes->list[where].flags |= kRouteIsScopedFlag; + flags |= kRouteFlagsIsScoped; } - - /* set the scope */ switch (scope_which) { case kScopeThis: - routes->list[where].flags |= kRouteIsScopedFlag; + flags |= kRouteFlagsIsScoped; break; case kScopeNext: - routes->list[where + 1].flags |= kRouteIsScopedFlag; + this_route = RouteListGetRouteAtIndex(info, routes, where + 1); + flags |= kRouteFlagsIsScoped; break; default: case kScopeNone: break; } - routes->count++; + if (this_route != NULL && flags != 0) { + this_route->flags |= flags; + } + done: return (routes); } /* - * Function: IPv4RouteListAddRouteList - * + * Function: RouteListAddRouteList * Purpose: - * Invoke IPv4RouteListAddRoute for each route in the given list. + * Invoke RouteListAddRoute for each route in the given list + * 'service_routes' combining them into a combined list 'routes'. * * Returns: - * See IPv4RouteListAddRoute for more information. + * See RouteListAddRoute for more information. */ -static IPv4RouteListRef -IPv4RouteListAddRouteList(IPv4RouteListRef routes, int init_size, - IPv4RouteListRef service_routes, Rank rank) +static RouteListRef +RouteListAddRouteList(RouteListInfoRef info, + RouteListRef routes, int init_size, + RouteListRef service_routes, Rank rank) { - int i; - IPv4RouteRef scan; + int i; + RouteRef scan; + + for (i = 0, scan = RouteListGetFirstRoute(info, service_routes); + i < service_routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { + Rank this_rank; - for (i = 0, scan = service_routes->list; - i < service_routes->count; i++, scan++) { - routes = IPv4RouteListAddRoute(routes, init_size, scan, rank); + if (i == 0 + && (service_routes->flags & kRouteListFlagsHasDefault) != 0) { + /* only apply rank to first element of the list (default route) */ + this_rank = rank; + } + else { + this_rank = RANK_INDEX_MASK(rank) | RANK_ASSERTION_MASK(scan->rank); + } + routes = RouteListAddRoute(info, routes, init_size, scan, this_rank); } return (routes); } -static boolean_t -plist_get_cstring(CFDictionaryRef dict, CFStringRef prop_name, - char * buf, int buf_size) +static void +RouteAddInterfaceToDescription(RouteRef r, CFMutableStringRef str) { - CFStringRef val; + char if_name[IFNAMSIZ]; - val = CFDictionaryGetValue(dict, prop_name); - if (isA_CFString(val) == NULL) { - return (FALSE); + if (my_if_indextoname2(r->ifindex, if_name) != NULL) { + CFStringAppendFormat(str, NULL, + CFSTR(" Ifp %s"), + if_name); } - if (CFStringGetCString(val, buf, buf_size, kCFStringEncodingASCII) - == FALSE) { - return (FALSE); + if (my_if_indextoname2(r->exclude_ifindex, if_name) != NULL) { + CFStringAppendFormat(str, NULL, + CFSTR(" !Ifp %s"), + if_name); } - return (TRUE); + return; } -/* - * Function: IPv4RouteListCreateWithDictionary - * - * Purpose: - * Given the service ipv4 entity dictionary, generate the list of routes. - * Currently, this includes just the default route and subnet route, - * if the service has a subnet mask. - * - * Returns: - * If the passed in route_list is NULL or too small, this routine - * allocates malloc'd memory to hold the routes. - */ -static IPv4RouteListRef -IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, - CFDictionaryRef dict, - CFStringRef primaryRank) +static void +RouteAddFlagsToDescription(RouteRef r, CFMutableStringRef str) { - struct in_addr addr = { 0 }; - boolean_t exclude_from_nwi = FALSE; - RouteFlags flags = 0; - unsigned int ifindex; - char ifn[IFNAMSIZ]; - struct in_addr mask = { 0 }; - int n = 0; - boolean_t add_default = FALSE; - boolean_t add_subnet = FALSE; - IPv4RouteRef r; - struct in_addr subnet = { 0 }; - struct in_addr router = { 0 }; - Rank rank = kRankAssertionDefault; - - if (dict == NULL) { - return (NULL); + if ((r->flags & kRouteFlagsIsNULL) != 0) { + CFStringAppend(str, CFSTR(" [null]")); } - if (plist_get_cstring(dict, kSCPropInterfaceName, ifn, sizeof(ifn)) - == FALSE) { - return (NULL); + else { + Rank rank_assertion = RANK_ASSERTION_MASK(r->rank); + + switch (rank_assertion) { + case kRankAssertionFirst: + CFStringAppend(str, CFSTR(" [first]")); + break; + case kRankAssertionLast: + CFStringAppend(str, CFSTR(" [last]")); + break; + case kRankAssertionNever: + CFStringAppend(str, CFSTR(" [never]")); + break; + default: + break; + } + if ((r->flags & kRouteFlagsKernelManaged) != 0) { + CFStringAppend(str, CFSTR(" [kern]")); + } + if ((r->flags & kRouteFlagsIsScoped) != 0) { + CFStringAppend(str, CFSTR(" [SCOPED]")); + } } -#ifdef TEST_IPV4_ROUTELIST - ifindex = 0; -#else /* TEST_IPV4_ROUTELIST */ - ifindex = if_nametoindex(ifn); - if (ifindex == 0) { - /* interface doesn't exist */ - return (NULL); + return; +} + +#if !TARGET_IPHONE_SIMULATOR +static RouteRef +RouteListFindRoute(RouteListInfoRef info, RouteListRef routes, RouteRef route) +{ + int i; + RouteRef match = NULL; + RouteRef scan; + + for (i = 0, scan = RouteListGetFirstRoute(info, routes); + i < routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { + if ((*info->route_equal)(scan, route)) { + match = scan; + break; + } + } -#endif /* TEST_IPV4_ROUTELIST */ - if (cfstring_to_ip(CFDictionaryGetValue(dict, kSCPropNetIPv4Router), - &router) == 0) { - (void)dict_get_first_ip(dict, kSCPropNetIPv4DestAddresses, &router); - } - if (dict_get_first_ip(dict, kSCPropNetIPv4Addresses, &addr) - && dict_get_first_ip(dict, kSCPropNetIPv4SubnetMasks, &mask)) { - /* subnet route */ - subnet = subnet_addr(addr, mask); - /* ignore link-local subnets, let IPConfiguration handle them for now */ - if (ntohl(subnet.s_addr) != IN_LINKLOCALNETNUM) { - add_subnet = TRUE; - n++; - } else if (router.s_addr == 0) { - exclude_from_nwi = TRUE; + return (match); +} + +typedef enum { + kRouteLookupFlagsNone = 0x0, + kRouteLookupFlagsExcludeInterface = 0x1 +} RouteLookupFlags; + +static RouteRef +RouteListLookup(RouteListInfoRef info, + RouteListRef routes, + const void * address, + int n_bits, + IFIndex ifindex, + RouteLookupFlags lookup_flags) +{ + RouteRef best_match = NULL; + RouteRef candidate; + int i; + + for (i = 0, candidate = RouteListGetFirstRoute(info, routes); + i < routes->count; + i++, candidate = RouteGetNextRoute(info, candidate)) { + if (candidate->ifindex == 0 || candidate->exclude_ifindex != 0) { + /* ignore exclude routes */ + continue; } - } - if (addr.s_addr == 0) { - /* thanks for playing */ - return (NULL); - } - if (router.s_addr == 0) { - /* - * If no router is configured, demote the rank. If there's already - * a rank assertion that indicates RankNever, use that, otherwise - * use RankLast. - */ - flags |= kRouteIsDirectToInterfaceFlag; - if (primaryRank != NULL - && PrimaryRankGetRankAssertion(primaryRank) == kRankAssertionNever) { - rank = kRankAssertionNever; + if ((lookup_flags & kRouteLookupFlagsExcludeInterface) != 0) { + /* exclude interfaces with the same interface index */ + if (ifindex == candidate->ifindex) { + continue; + } } - else { - rank = kRankAssertionLast; + else if (ifindex != candidate->ifindex) { + continue; } - } - else { - /* - * If the router address is our address and the subnet mask is - * not 255.255.255.255, assume all routes are local to the interface. - */ - if (addr.s_addr == router.s_addr - && mask.s_addr != INADDR_BROADCAST) { - flags |= kRouteIsDirectToInterfaceFlag; + if ((candidate->flags & kRouteFlagsHasGateway) != 0 + && RouteAddressCompare(info, + (*info->route_gateway)(candidate), + address) == 0) { + /* skip route whose gateway is the address we're looking for */ + continue; } - if (primaryRank != NULL) { - rank = PrimaryRankGetRankAssertion(primaryRank); - } else if (get_override_primary(dict)) { - rank = kRankAssertionFirst; + if ((candidate->flags & kRouteFlagsIsHost) != 0) { + /* if host route and we're looking for an exact match */ + if (n_bits == info->all_bits_set + && RouteAddressCompare(info, + (*info->route_destination)(candidate), + address) == 0) { + /* found exact match */ + best_match = candidate; + break; + } + /* skip it */ + continue; + } + /* verify that address is on the same subnet */ + if ((*info->route_same_subnet)(candidate, address) == FALSE) { + /* different subnet */ + continue; } - } - if (S_dict_get_boolean(dict, kIsNULL, FALSE)) { - exclude_from_nwi = TRUE; - flags |= kRouteIsNULLFlag; + if (candidate->prefix_length == n_bits) { + /* exact match */ + best_match = candidate; + break; + } + if (candidate->prefix_length > n_bits) { + /* matched too many bits */ + continue; + } + if (best_match == NULL + || candidate->prefix_length > best_match->prefix_length) { + best_match = candidate; + } } + return (best_match); +} - if (rank == kRankAssertionNever) { - flags |= kRouteIsScopedFlag; - } - if (add_subnet && (flags & kRouteIsDirectToInterfaceFlag) == 0 - && subnet.s_addr != subnet_addr(router, mask).s_addr) { - flags |= kRouteIsNotSubnetLocalFlag; - } +/* + * Function: RouteProcess + * Purpose: + * Function to process adding or removing the specified route. + * In the case of adding, that may involve first processing the gateway + * route (recursively). + */ +static boolean_t +RouteProcess(RouteRef route, + RouteCommand cmd, + RouteListApplyContextRef context) +{ + RouteLog route_log = context->info->route_log; + RouteApply route_apply = context->info->route_apply; + RouteGateway route_gateway = context->info->route_gateway; + int retval; - if (strncmp(ifn, "lo0", sizeof(ifn)) != 0) { - add_default = TRUE; - n++; + switch (cmd) { + case kRouteCommandAdd: + if ((route->control_flags & kControlFlagsProcessed) != 0) { + return ((route->control_flags & kControlFlagsAdded) != 0); + } + route->control_flags |= kControlFlagsProcessed; + if ((route->flags & kRouteFlagsHasGateway) != 0) { + boolean_t added; + RouteRef gateway_route; + + gateway_route + = RouteListLookup(context->info, + context->new_routes, + (*route_gateway)(route), + context->info->all_bits_set, + route->ifindex, + kRouteLookupFlagsNone); + if (gateway_route == NULL) { + (*route_log)(LOG_NOTICE, route, + "IPMonitor RouteProcess: no gateway route"); + } + else { +#define MAX_RECURSE_DEPTH 10 + /* avoid infinite recursion */ + if (context->depth == MAX_RECURSE_DEPTH) { + (*route_log)(LOG_NOTICE, route, + "IPMonitor RouteProcess: " + "routing loop detected, not adding"); + return (FALSE); + } + /* recurse to add gateway route */ + context->depth++; + added = RouteProcess(gateway_route, + kRouteCommandAdd, + context); + context->depth--; + if (added == FALSE) { + (*route_log)(LOG_NOTICE, route, + "IPMonitor RouteProcess: failed to add"); + return (FALSE); + } + } + } + retval = (*route_apply)(route, RTM_ADD, context->sockfd); + if (retval == EEXIST) { + /* delete and add again */ + (void)(*route_apply)(route, RTM_DELETE, context->sockfd); + retval = (*route_apply)(route, RTM_ADD, context->sockfd); + } + switch (retval) { + default: + my_log(LOG_NOTICE, + "IPMonitor RouteProcess failed to add route, %s:", + strerror(retval)); + (*route_log)(LOG_NOTICE, route, NULL); + break; + case 0: + case EROUTENOTAPPLIED: + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + char buf[64]; + const char * str; + + str = (retval == EROUTENOTAPPLIED) ? "!" : ""; + snprintf(buf, sizeof(buf), "%sAdd new[%ld]", + str, + RouteListRouteIndex(context->info, + context->new_routes, + route)); + (*route_log)(LOG_DEBUG, route, buf); + } + route->control_flags |= kControlFlagsAdded; + break; + } + break; + case kRouteCommandRemove: + retval = (*route_apply)(route, RTM_DELETE, context->sockfd); + switch (retval) { + case 0: + case ESRCH: + case EROUTENOTAPPLIED: + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + char buf[64]; + const char * str; + + str = (retval == EROUTENOTAPPLIED) ? "!" : ""; + snprintf(buf, sizeof(buf), "%sRemove old[%ld]%s", + str, + RouteListRouteIndex(context->info, + context->old_routes, + route), + (retval == ESRCH) ? "(ESRCH)" : ""); + (*route_log)(LOG_DEBUG, route, buf); + } + break; + default: + my_log(LOG_NOTICE, + "IPMonitor RouteProcess failed to remove" + " route, %s", strerror(retval)); + (*route_log)(LOG_NOTICE, route, NULL); + break; + } + break; + default: + break; } + return (TRUE); +} - if (routes == NULL || routes->size < n) { - routes = (IPv4RouteListRef)malloc(IPv4RouteListComputeSize(n)); - routes->size = n; - } - bzero(routes, IPv4RouteListComputeSize(n)); - routes->count = n; - routes->exclude_from_nwi = exclude_from_nwi; +static void +RouteListApply(RouteListInfoRef info, + RouteListRef old_routes, RouteListRef new_routes, + int sockfd) +{ + RouteListApplyContext context; + int i; + RouteRef scan; - /* start at the beginning */ - r = routes->list; + if (old_routes == new_routes && old_routes == NULL) { + /* both old and new are NULL, so there's nothing to do */ + return; + } + bzero(&context, sizeof(context)); + context.old_routes = old_routes; + context.new_routes = new_routes; + context.sockfd = sockfd; + context.info = info; + if (old_routes != NULL) { + for (i = 0, scan = RouteListGetFirstRoute(info, old_routes); + i < old_routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { + RouteRef new_route = NULL; - if (add_default) { - /* add the default route */ - r->ifindex = ifindex; - strlcpy(r->ifname, ifn, sizeof(r->ifname)); - r->ifa = addr; - r->flags = flags; - if ((flags & kRouteIsDirectToInterfaceFlag) == 0) { - r->gateway = router; - } - else { - r->gateway = addr; + if (new_routes != NULL) { + new_route = RouteListFindRoute(info, new_routes, scan); + } + if (new_route == NULL) { + if ((scan->control_flags & kControlFlagsAdded) != 0) { + RouteProcess(scan, kRouteCommandRemove, &context); + } + } } - r->rank = rank; - r++; } - - /* add the subnet route */ - if (add_subnet) { - if ((flags & kRouteIsNULLFlag) != 0) { - r->flags |= kRouteIsNULLFlag; + if (new_routes != NULL) { + if (old_routes != NULL) { + /* preserve the control flags from any old routes */ + for (i = 0, scan = RouteListGetFirstRoute(info, new_routes); + i < new_routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { + RouteRef old_route = NULL; + + old_route = RouteListFindRoute(info, old_routes, scan); + if (old_route != NULL) { + /* preserve the control state in the new route */ + scan->control_flags = old_route->control_flags; + } + } + } + /* add any routes that need to be added */ + for (i = 0, scan = RouteListGetFirstRoute(info, new_routes); + i < new_routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { + if ((scan->control_flags & kControlFlagsProcessed) != 0) { + continue; + } + RouteProcess(scan, kRouteCommandAdd, &context); } - r->ifindex = ifindex; - r->gateway = addr; - r->dest = subnet; - r->mask = mask; - strlcpy(r->ifname, ifn, sizeof(r->ifname)); - r->ifa = addr; - r->rank = rank; } - return (routes); + return; } - /* - * Function: parse_component + * Function: RouteListFinalize * Purpose: - * Given a string 'key' and a string prefix 'prefix', - * return the next component in the slash '/' separated - * key. + * Look for excluded routes. If the excluded route does not have an assigned + * interface, search for a route that *does not* go over the excluded + * interface. * - * Examples: - * 1. key = "a/b/c" prefix = "a/" - * returns "b" - * 2. key = "a/b/c" prefix = "a/b/" - * returns "c" + * If the excluded route does have an assigned interface, search for a route + * that *does* go over the assigned interface. + * + * Set the gateway on the excluded route to match the gateway of the found + * route. */ -static CF_RETURNS_RETAINED CFStringRef -parse_component(CFStringRef key, CFStringRef prefix) +static void +RouteListFinalize(RouteListInfoRef info, RouteListRef routes) { - CFMutableStringRef comp; - CFRange range; + int i; + RouteRef scan; - if (CFStringHasPrefix(key, prefix) == FALSE) { - return (NULL); - } - comp = CFStringCreateMutableCopy(NULL, 0, key); - if (comp == NULL) { - return (NULL); + if (routes == NULL) { + return; } - CFStringDelete(comp, CFRangeMake(0, CFStringGetLength(prefix))); - range = CFStringFind(comp, CFSTR("/"), 0); - if (range.location == kCFNotFound) { - return (comp); + for (i = 0, scan = RouteListGetFirstRoute(info, routes); + i < routes->count; + i++, scan = RouteGetNextRoute(info, scan)) { + RouteRef route; + IFIndex ifindex; + RouteLookupFlags flags; + + if (scan->exclude_ifindex == 0) { + continue; + } + if (scan->ifindex == 0) { + ifindex = scan->exclude_ifindex; + flags = kRouteLookupFlagsExcludeInterface; + } + else { + ifindex = scan->ifindex; + flags = kRouteLookupFlagsNone; + } + route = RouteListLookup(info, routes, + (*info->route_destination)(scan), + scan->prefix_length, ifindex, flags); + if (route == NULL) { + (*info->route_log)(LOG_NOTICE, (RouteRef)scan, + "IPMonitor: can't resolve excluded route"); + } + else { + if ((S_IPMonitor_debug & kDebugFlag8) != 0) { + (*info->route_log)(LOG_DEBUG, (RouteRef)scan, "Excluded route"); + (*info->route_log)(LOG_DEBUG, (RouteRef)route, "Resolved to"); + } + scan->ifindex = route->ifindex; + if ((route->flags & kRouteFlagsHasGateway) != 0) { + (*info->route_set_gateway)(scan, (*info->route_gateway)(route)); + scan->flags |= kRouteFlagsHasGateway; + if (scan->prefix_length == info->all_bits_set) { + scan->flags |= kRouteFlagsIsHost; + } + } + else { + /* routes directly to interface */ + scan->flags &= ~(kRouteFlagsHasGateway | kRouteFlagsIsHost); + } + } } - range.length = CFStringGetLength(comp) - range.location; - CFStringDelete(comp, range); - return (comp); + return; } +#endif /* !TARGET_IPHONE_SIMULATOR */ -static CFMutableDictionaryRef -service_dict_copy(CFStringRef serviceID) +/** + ** IPv4Route* + **/ + +#define IPV4_ROUTE_ALL_BITS_SET 32 + +static __inline__ struct in_addr +subnet_addr(struct in_addr addr, struct in_addr mask) { - CFDictionaryRef d = NULL; - CFMutableDictionaryRef service_dict; + struct in_addr net; - /* create a modifyable dictionary, a copy or a new one */ - d = CFDictionaryGetValue(S_service_state_dict, serviceID); - if (d == NULL) { - service_dict - = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - } - else { - service_dict = CFDictionaryCreateMutableCopy(NULL, 0, d); - } - return (service_dict); + net.s_addr = addr.s_addr & mask.s_addr; + return (net); } static void -log_service_entity(int level, CFStringRef serviceID, CFStringRef entity, - CFStringRef operation, CFTypeRef val) +IPv4RouteCopyDescriptionWithString(IPv4RouteRef r, CFMutableStringRef str) { + if ((r->flags & kRouteFlagsIsHost) != 0) { + CFStringAppendFormat(str, NULL, + CFSTR("Host " IP_FORMAT), + IP_LIST(&r->dest)); + } + else { + CFStringAppendFormat(str, NULL, + CFSTR("Net " IP_FORMAT), + IP_LIST(&r->dest)); + CFStringAppendFormat(str, NULL, CFSTR("/%d"), + r->prefix_length); + } + if ((r->flags & kRouteFlagsHasGateway) != 0) { + CFStringAppendFormat(str, NULL, + CFSTR(" Gate " IP_FORMAT), + IP_LIST(&r->gateway)); + } + RouteAddInterfaceToDescription((RouteRef)r, str); + if (r->ifa.s_addr != 0) { + CFStringAppendFormat(str, NULL, + CFSTR(" Ifa " IP_FORMAT), + IP_LIST(&r->ifa)); + } + RouteAddFlagsToDescription((RouteRef)r, str); + return; +} - CFDataRef route_list; - CFMutableStringRef this_val = NULL; +static CFStringRef +IPv4RouteCopyDescription(RouteRef r) +{ + CFMutableStringRef str; - if (CFEqual(entity, kSCEntNetIPv4) && isA_CFDictionary(val) != NULL) { - CFDictionaryRef service_dict = NULL; + str = CFStringCreateMutable(NULL, 0); + IPv4RouteCopyDescriptionWithString((IPv4RouteRef)r, str); + return (str); +} - route_list = CFDictionaryGetValue(val, kIPv4DictRoutes); - if (route_list != NULL) { - /* ALIGN: CF should align to at least 8-byte boundaries */ - this_val = IPv4RouteListCopyDescription((IPv4RouteListRef) - (void *)CFDataGetBytePtr(route_list)); - } +#ifdef TEST_IPV4_ROUTELIST +static CFMutableStringRef +IPv4RouteListCopyDescription(IPv4RouteListRef routes); - service_dict = CFDictionaryGetValue(val, kIPv4DictService); +static void +IPv4RouteLog(int level, RouteRef route, const char * msg) +{ + CFStringRef str = IPv4RouteCopyDescription(route); - if (service_dict != NULL && isA_CFDictionary(service_dict) != NULL) { - if (this_val == NULL) { - this_val = CFStringCreateMutable(NULL, 0); - } - CFStringAppendFormat(this_val, NULL, CFSTR("\n : %@"), service_dict); - } - val = this_val; + if (msg == NULL) { + SCPrint(TRUE, stdout, CFSTR("%@\n"), str); } - if (val == NULL) { - val = CFSTR(""); + else { + SCPrint(TRUE, stdout, CFSTR("%s: %@\n"), msg, str); } - my_log(level, "IPMonitor: serviceID %@ %@ %@ value = %@", - serviceID, operation, entity, val); - my_CFRelease(&this_val); + CFRelease(str); return; } -static boolean_t -service_dict_set(CFStringRef serviceID, CFStringRef entity, - CFTypeRef new_val) +static __inline__ void +IPv4RouteListPrint(IPv4RouteListRef routes) { - boolean_t changed = FALSE; - CFTypeRef old_val; - CFMutableDictionaryRef service_dict; + CFStringRef str = IPv4RouteListCopyDescription(routes); - service_dict = service_dict_copy(serviceID); - old_val = CFDictionaryGetValue(service_dict, entity); - if (new_val == NULL) { - if (old_val != NULL) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - log_service_entity(LOG_DEBUG, serviceID, entity, - CFSTR("Removed:"), old_val); - } - CFDictionaryRemoveValue(service_dict, entity); - changed = TRUE; - } - } - else { - if (old_val == NULL || CFEqual(new_val, old_val) == FALSE) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - log_service_entity(LOG_DEBUG, serviceID, entity, - CFSTR("Changed: old"), old_val); - log_service_entity(LOG_DEBUG, serviceID, entity, - CFSTR("Changed: new"), new_val); - } - CFDictionarySetValue(service_dict, entity, new_val); - changed = TRUE; - } - } - if (CFDictionaryGetCount(service_dict) == 0) { - CFDictionaryRemoveValue(S_service_state_dict, serviceID); - } - else { - CFDictionarySetValue(S_service_state_dict, serviceID, service_dict); - } - my_CFRelease(&service_dict); - return (changed); -} - -static CFDictionaryRef -service_dict_get(CFStringRef serviceID, CFStringRef entity) -{ - CFDictionaryRef service_dict; - - service_dict = CFDictionaryGetValue(S_service_state_dict, serviceID); - if (service_dict == NULL) { - return (NULL); - } - return (CFDictionaryGetValue(service_dict, entity)); + SCPrint(TRUE, stdout, CFSTR("%@\n"), str); + CFRelease(str); + return; } -#ifndef kSCPropNetHostname -#define kSCPropNetHostname CFSTR("Hostname") -#endif +#else /* TEST_IPV4_ROUTELIST */ -__private_extern__ -CFStringRef -copy_dhcp_hostname(CFStringRef serviceID) +static __inline__ void +IPv4RouteLog(int level, RouteRef route, const char * msg) { - CFDictionaryRef dict = NULL; - CFStringRef hostname = NULL; - CFDictionaryRef service_dict = NULL; - - dict = service_dict_get(serviceID, kSCEntNetIPv4); + CFStringRef str = IPv4RouteCopyDescription(route); - if (dict == NULL || isA_CFDictionary(dict) == NULL) { - return (NULL); + if (msg == NULL) { + my_log(level, "%@", str); } - - service_dict = - CFDictionaryGetValue(dict, kIPv4DictService); - - if (service_dict == NULL - || isA_CFDictionary(service_dict) == NULL) { - return (NULL); + else { + my_log(level, "%s: %@", msg, str); } + CFRelease(str); + return; +} - hostname = - CFDictionaryGetValue(service_dict, kSCPropNetHostname); +#endif /* TEST_IPV4_ROUTELIST */ - if (hostname != NULL) { - CFRetain(hostname); - } +static boolean_t +IPv4RouteIsEqual(RouteRef r_scan, RouteRef r_route) +{ + IPv4RouteRef route = (IPv4RouteRef)r_route; + IPv4RouteRef scan = (IPv4RouteRef)r_scan; - return (hostname); + return ((scan->dest.s_addr == route->dest.s_addr) + && (scan->mask.s_addr == route->mask.s_addr) + && (scan->ifindex == route->ifindex) + && (scan->ifa.s_addr == route->ifa.s_addr) + && (scan->gateway.s_addr == route->gateway.s_addr) + && (scan->flags == route->flags)); } -#if !TARGET_IPHONE_SIMULATOR -static void -ipv6_service_update_router(CFStringRef serviceID, CFDictionaryRef new_val) +static CFMutableStringRef +IPv4RouteListCopyDescription(IPv4RouteListRef routes) { -#ifdef SIOCDRADD_IN6 - int if_index; - char ifn[IFNAMSIZ]; - CFStringRef new_router = NULL; - char ntopbuf[INET6_ADDRSTRLEN]; - CFDictionaryRef old_val = NULL; - CFStringRef old_router = NULL; - struct in6_addr router_ip; - int s = -1; + int i; + IPv4RouteRef r; + CFMutableStringRef str; - ifn[0] = '\0'; - old_val = service_dict_get(serviceID, kSCEntNetIPv6); - if (old_val != NULL) { - plist_get_cstring(old_val, kSCPropInterfaceName, ifn, sizeof(ifn)); - old_router = CFDictionaryGetValue(old_val, kSCPropNetIPv6Router); - } - if (ifn[0] == '\0') { - if (new_val == NULL - || plist_get_cstring(new_val, kSCPropInterfaceName, - ifn, sizeof(ifn)) == FALSE) { - /* no InterfaceName property, ignore it */ - goto done; - } - } - if_index = if_nametoindex(ifn); - if (if_index == 0) { - goto done; - } - s = inet6_dgram_socket(); - if (s < 0) { - my_log(LOG_ERR, - "IPMonitor: ipv6_service_update_router: socket failed, %s", - strerror(errno)); - goto done; - } - if (new_val != NULL) { - new_router = CFDictionaryGetValue(new_val, kSCPropNetIPv6Router); - } - if (S_dict_get_boolean(old_val, kIsNULL, FALSE) == FALSE - && old_router != NULL - && (new_router == NULL || CFEqual(old_router, new_router) == FALSE)) { - /* remove the old Router */ - if (cfstring_to_ip6(old_router, &router_ip)) { - if (IN6_IS_ADDR_LINKLOCAL(&router_ip) || - IN6_IS_ADDR_MC_LINKLOCAL(&router_ip)) { - /* scope it */ - router_ip.__u6_addr.__u6_addr16[1] = htons(if_index); - } - if (siocdrdel_in6(s, if_index, &router_ip) < 0) { - if (errno != EINVAL) { - my_log(LOG_ERR, - "IPMonitor: siocdrdel_in6(%s, %s) failed, %s", - ifn, - inet_ntop(AF_INET6, &router_ip, - ntopbuf, sizeof(ntopbuf)), - strerror(errno)); - } - } - else if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "IPMonitor: %s removed default route %s", - ifn, - inet_ntop(AF_INET6, &router_ip, - ntopbuf, sizeof(ntopbuf))); - } - } - } - /* add the new Router */ - if (S_dict_get_boolean(new_val, kIsNULL, FALSE) == FALSE - && cfstring_to_ip6(new_router, &router_ip)) { - if (IN6_IS_ADDR_LINKLOCAL(&router_ip) || - IN6_IS_ADDR_MC_LINKLOCAL(&router_ip)) { - /* scope it */ - router_ip.__u6_addr.__u6_addr16[1] = htons(if_index); - } - if (siocdradd_in6(s, if_index, &router_ip, 0) < 0) { - if (errno != EINVAL) { - my_log(LOG_ERR, - "IPMonitor: siocdradd_in6(%s, %s) failed, %s", - ifn, - inet_ntop(AF_INET6, &router_ip, - ntopbuf, sizeof(ntopbuf)), - strerror(errno)); - } - } - else if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "IPMonitor: %s added default route %s", - ifn, - inet_ntop(AF_INET6, &router_ip, - ntopbuf, sizeof(ntopbuf))); - } + str = CFStringCreateMutable(NULL, 0); + CFStringAppendFormat(str, NULL, CFSTR(" = {"), + routes->count); + for (i = 0, r = routes->list; i < routes->count; i++, r++) { + CFStringAppendFormat(str, NULL, CFSTR("\n%2d. "), i); + IPv4RouteCopyDescriptionWithString(r, str); } - close(s); + CFStringAppend(str, CFSTR("\n}")); + return (str); +} - done: -#endif /* SIOCDRADD_IN6 */ - return; +static size_t +IPv4RouteListComputeSize(CFIndex n) +{ + return (offsetof(IPv4RouteList, list[n])); } -#endif /* !TARGET_IPHONE_SIMULATOR */ -#define ALLOW_EMPTY_STRING 0x1 +static int +count_prefix_bits_set(uint32_t n) +{ + int count; + const static int8_t bits[16] = { + 0, /* 0000 */ + -1, /* 0001 */ + -1, /* 0010 */ + -1, /* 0011 */ + -1, /* 0100 */ + -1, /* 0101 */ + -1, /* 0110 */ + -1, /* 0111 */ + 1, /* 1000 */ + -1, /* 1001 */ + -1, /* 1010 */ + -1, /* 1011 */ + 2, /* 1100 */ + -1, /* 1101 */ + 3, /* 1110 */ + 4, /* 1111 */ + }; -static CF_RETURNS_RETAINED CFTypeRef -sanitize_prop(CFTypeRef val, uint32_t flags) -{ - if (val != NULL) { - if (isA_CFString(val)) { - CFMutableStringRef str; + for (count = 0; n != 0; n >>= 4) { + int nbits = bits[n & 0x0f]; - str = CFStringCreateMutableCopy(NULL, 0, (CFStringRef)val); - CFStringTrimWhitespace(str); - if (!(flags & ALLOW_EMPTY_STRING) && (CFStringGetLength(str) == 0)) { - CFRelease(str); - str = NULL; - } - val = str; - } else { - CFRetain(val); + if (nbits < 0) { + return (-1); } + count += nbits; } - - return val; + return (count); } -static void -merge_array_prop(CFMutableDictionaryRef dict, - CFStringRef key, - CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, - uint32_t flags, - Boolean append) +static uint32_t +prefix_to_mask32(unsigned int prefix_length) { - CFMutableArrayRef merge_prop; - CFArrayRef setup_prop = NULL; - CFArrayRef state_prop = NULL; - - if (setup_dict != NULL) { - setup_prop = isA_CFArray(CFDictionaryGetValue(setup_dict, key)); - } - if (state_dict != NULL) { - state_prop = isA_CFArray(CFDictionaryGetValue(state_dict, key)); - } - - if ((setup_prop == NULL) && (state_prop == NULL)) { - return; + if (prefix_length > 32 || prefix_length == 0) { + return (0); } + return (0xffffffff << (32 - prefix_length)); +} - merge_prop = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - if (setup_prop != NULL) { - CFIndex i; - CFIndex n; +static int +mask_get_prefix_length(struct in_addr mask) +{ + int count; - n = CFArrayGetCount(setup_prop); - for (i = 0; i < n; i++) { - CFTypeRef val; + count = count_prefix_bits_set(mask.s_addr); + if (count >= 0) { + uint32_t val; - val = CFArrayGetValueAtIndex(setup_prop, i); - val = sanitize_prop(val, flags); - if (val != NULL) { - CFArrayAppendValue(merge_prop, val); - CFRelease(val); - } + val = prefix_to_mask32(count); + if (ntohl(mask.s_addr) != val) { + /* expected mask based on prefix length doesn't match */ + return (-1); } } - if (state_prop != NULL - && (setup_prop == NULL || S_append_state)) { - CFIndex i; - CFIndex n; - CFRange setup_range = CFRangeMake(0, CFArrayGetCount(merge_prop)); + return (count); +} - n = CFArrayGetCount(state_prop); - for (i = 0; i < n; i++) { - CFTypeRef val; +static boolean_t +IPv4RouteSetPrefixLength(IPv4RouteRef route) +{ + int length; - val = CFArrayGetValueAtIndex(state_prop, i); - val = sanitize_prop(val, flags); - if (val != NULL) { - if (append || !CFArrayContainsValue(merge_prop, setup_range, val)) { - CFArrayAppendValue(merge_prop, val); - } - CFRelease(val); - } - } - } - if (CFArrayGetCount(merge_prop) > 0) { - CFDictionarySetValue(dict, key, merge_prop); + length = mask_get_prefix_length(route->mask); + if (length < 0) { + return (FALSE); } - CFRelease(merge_prop); - return; + route->prefix_length = length; + return (TRUE); +} + +static const void * +IPv4RouteGateway(RouteRef r_route) +{ + IPv4RouteRef route = (IPv4RouteRef)r_route; + return (&route->gateway); } static void -pick_prop(CFMutableDictionaryRef dict, - CFStringRef key, - CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, - uint32_t flags) +IPv4RouteSetGateway(RouteRef r_route, const void * address) { - CFTypeRef val = NULL; + IPv4RouteRef route = (IPv4RouteRef)r_route; - if (setup_dict != NULL) { - val = CFDictionaryGetValue(setup_dict, key); - val = sanitize_prop(val, flags); - } - if (val == NULL && state_dict != NULL) { - val = CFDictionaryGetValue(state_dict, key); - val = sanitize_prop(val, flags); - } - if (val != NULL) { - CFDictionarySetValue(dict, key, val); - CFRelease(val); - } + route->gateway = *((struct in_addr *)address); + return; +} - return; +static const void * +IPv4RouteDestination(RouteRef r_route) +{ + IPv4RouteRef route = (IPv4RouteRef)r_route; + return (&route->dest); } -/** - ** GetEntityChangesFunc functions - **/ static boolean_t -get_ipv4_changes(CFStringRef serviceID, CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, CFDictionaryRef info) +IPv4RouteSameSubnet(RouteRef r_route, const void * addr) { - CFDictionaryRef aggregated_dict = NULL; - boolean_t changed = FALSE; - CFMutableDictionaryRef dict = NULL; - CFStringRef primaryRank = NULL; - IPv4RouteListRef r; -#define R_STATIC 3 - IPv4RouteListRef routes; - /* ALIGN: force align */ - uint32_t routes_buf[roundup(IPv4RouteListComputeSize(R_STATIC), sizeof(uint32_t))]; - CFDataRef routes_data = NULL; - CFDictionaryRef service_options; + const struct in_addr * address; + IPv4RouteRef route = (IPv4RouteRef)r_route; - if (state_dict == NULL) { - goto done; - } - service_options = service_dict_get(serviceID, kSCEntNetService); - if (service_options != NULL) { - primaryRank = CFDictionaryGetValue(service_options, kSCPropNetServicePrimaryRank); - } - dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); - if (setup_dict != NULL) { - CFStringRef router; - struct in_addr router_ip; + address = (const struct in_addr *)addr; + return ((address->s_addr & route->mask.s_addr) == route->dest.s_addr); +} - router = CFDictionaryGetValue(setup_dict, - kSCPropNetIPv4Router); - if (router != NULL - && cfstring_to_ip(router, &router_ip)) { - CFDictionarySetValue(dict, - kSCPropNetIPv4Router, - router); - } +/* + * Define: ROUTE_MSG_ADDRS_SPACE + * Purpose: + * Since sizeof(sockaddr_dl) > sizeof(sockaddr_in), we need space for + * 3 sockaddr_in's and 2 sockaddr_dl's, but pad it just in case + * someone changes the code and doesn't think to modify this. + */ +#define ROUTE_MSG_ADDRS_SPACE (3 * sizeof(struct sockaddr_in) \ + + 2 * sizeof(struct sockaddr_dl) \ + + 128) +typedef struct { + struct rt_msghdr hdr; + char addrs[ROUTE_MSG_ADDRS_SPACE]; +} route_msg; + +/* + * Function: IPv4RouteApply + * Purpose: + * Add or remove the specified route to/from the kernel routing table. + */ +static int +IPv4RouteApply(RouteRef r_route, int cmd, int sockfd) +{ + int len; + int ret = 0; + IPv4RouteRef route = (IPv4RouteRef)r_route; + route_msg rtmsg; + union { + struct sockaddr_in * in_p; + struct sockaddr_dl * dl_p; + void * ptr; + } rtaddr; + + if (S_netboot && route->dest.s_addr == 0) { + /* don't touch the default route */ + return (EROUTENOTAPPLIED); } - routes = (IPv4RouteListRef)(void *)routes_buf; - routes->size = R_STATIC; - routes->count = 0; - r = IPv4RouteListCreateWithDictionary(routes, dict, primaryRank); - if (r != NULL) { - routes_data = CFDataCreate(NULL, - (const void *)r, - IPv4RouteListComputeSize(r->count)); - if (r != routes) { - free(r); - } + if ((route->flags & kRouteFlagsIsScoped) != 0 + && !S_scopedroute) { + return (EROUTENOTAPPLIED); } - else { + if ((route->flags & kRouteFlagsIsNULL) != 0) { + return (EROUTENOTAPPLIED); + } + if (route->ifindex == 0) { my_log(LOG_NOTICE, - "IPMonitor: %@ invalid IPv4 dictionary = %@", - serviceID, - dict); + "IPMonitor IPv4RouteApply: " IP_FORMAT + " no interface specified, ignoring", + IP_LIST(&route->dest)); + return (ENXIO); } - done: - if (routes_data != NULL) { - CFStringRef keys[2]; - CFTypeRef values[2]; - - keys[0] = kIPv4DictService; - values[0] = dict; - keys[1] = kIPv4DictRoutes; - values[1] = routes_data; - - aggregated_dict = CFDictionaryCreate(NULL, - (const void**)keys, - values, - sizeof(keys)/sizeof(keys[0]), - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - + if (sockfd == -1) { +#ifdef TEST_IPV4_ROUTELIST + return (0); +#else /* TEST_IPV4_ROUTELIST */ + return (EBADF); +#endif /* TEST_IPV4_ROUTELIST */ } - changed = service_dict_set(serviceID, kSCEntNetIPv4, aggregated_dict); - if (routes_data == NULL) { - /* clean up the rank too */ - CFDictionaryRemoveValue(S_ipv4_service_rank_dict, serviceID); + memset(&rtmsg, 0, sizeof(rtmsg)); + rtmsg.hdr.rtm_type = cmd; + rtmsg.hdr.rtm_version = RTM_VERSION; + rtmsg.hdr.rtm_seq = ++rtm_seq; + rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_IFP; + if (route->ifa.s_addr != 0) { + rtmsg.hdr.rtm_addrs |= RTA_IFA; + } + rtmsg.hdr.rtm_flags = RTF_UP | RTF_STATIC; + if ((route->flags & kRouteFlagsIsHost) != 0) { + rtmsg.hdr.rtm_flags |= RTF_HOST; + } + else { + rtmsg.hdr.rtm_addrs |= RTA_NETMASK; + if ((route->flags & kRouteFlagsHasGateway) == 0) { + rtmsg.hdr.rtm_flags |= RTF_CLONING; + } + } + if ((route->flags & kRouteFlagsHasGateway) != 0) { + rtmsg.hdr.rtm_flags |= RTF_GATEWAY; + } + if ((route->flags & kRouteFlagsIsScoped) != 0) { + rtmsg.hdr.rtm_index = route->ifindex; + rtmsg.hdr.rtm_flags |= RTF_IFSCOPE; } - my_CFRelease(&dict); - my_CFRelease(&aggregated_dict); - my_CFRelease(&routes_data); - return (changed); -} -static boolean_t -get_ipv6_changes(CFStringRef serviceID, CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, CFDictionaryRef info) -{ - struct in6_addr addr; - CFArrayRef addrs; - boolean_t changed = FALSE; - CFMutableDictionaryRef dict = NULL; - CFDictionaryRef new_dict = NULL; - CFStringRef router = NULL; - struct in6_addr router_ip; - boolean_t valid_ip = FALSE; + rtaddr.ptr = rtmsg.addrs; - if (state_dict == NULL) { - goto done; + /* dest */ + rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin_family = AF_INET; + rtaddr.in_p->sin_addr = route->dest; + rtaddr.ptr += sizeof(*rtaddr.in_p); + + /* gateway */ + if ((rtmsg.hdr.rtm_flags & RTF_GATEWAY) != 0) { + /* gateway is an IP address */ + rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin_family = AF_INET; + rtaddr.in_p->sin_addr = route->gateway; + rtaddr.ptr += sizeof(*rtaddr.in_p); } - addrs = isA_CFArray(CFDictionaryGetValue(state_dict, - kSCPropNetIPv6Addresses)); - if (addrs != NULL && CFArrayGetCount(addrs) > 0) { - valid_ip = cfstring_to_ip6(CFArrayGetValueAtIndex(addrs, 0), &addr); + else { + /* gateway is the interface itself */ + rtaddr.dl_p->sdl_len = sizeof(*rtaddr.dl_p); + rtaddr.dl_p->sdl_family = AF_LINK; + rtaddr.dl_p->sdl_index = route->ifindex; + rtaddr.ptr += sizeof(*rtaddr.dl_p); } - if (valid_ip == FALSE) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ has no valid IPv6 address, ignoring", - serviceID); - } - goto done; + + /* mask */ + if ((rtmsg.hdr.rtm_addrs & RTA_NETMASK) != 0) { + rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin_family = AF_INET; + rtaddr.in_p->sin_addr = route->mask; + rtaddr.ptr += sizeof(*rtaddr.in_p); } - dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); - if (setup_dict != NULL) { - router = CFDictionaryGetValue(setup_dict, - kSCPropNetIPv6Router); - if (router != NULL && cfstring_to_ip6(router, &router_ip)) { - CFDictionarySetValue(dict, - kSCPropNetIPv6Router, - router); - } + + /* interface */ + if ((rtmsg.hdr.rtm_addrs & RTA_IFP) != 0) { + rtaddr.dl_p->sdl_len = sizeof(*rtaddr.dl_p); + rtaddr.dl_p->sdl_family = AF_LINK; + rtaddr.dl_p->sdl_index = route->ifindex; + rtaddr.ptr += sizeof(*rtaddr.dl_p); } - else { - router = CFDictionaryGetValue(dict, - kSCPropNetIPv6Router); - if (router != NULL - && cfstring_to_ip6(router, &router_ip) == FALSE) { - CFDictionaryRemoveValue(dict, kSCPropNetIPv6Router); - } + /* interface address */ + if ((rtmsg.hdr.rtm_addrs & RTA_IFA) != 0) { + rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin_family = AF_INET; + rtaddr.in_p->sin_addr = route->ifa; + rtaddr.ptr += sizeof(*rtaddr.in_p); } - new_dict = dict; - done: + /* apply the route */ + len = (int)(sizeof(rtmsg.hdr) + (rtaddr.ptr - (void *)rtmsg.addrs)); + rtmsg.hdr.rtm_msglen = len; + if (write(sockfd, &rtmsg, len) == -1) { + ret = errno; + } + return (ret); +} + +static const RouteListInfo IPv4RouteListInfo = { + IPv4RouteListComputeSize, + + IPv4RouteIsEqual, + IPv4RouteApply, + IPv4RouteGateway, + IPv4RouteSetGateway, + IPv4RouteDestination, + IPv4RouteSameSubnet, + IPv4RouteLog, + IPv4RouteCopyDescription, + + sizeof(IPv4Route), + sizeof(struct in_addr), + IPV4_ROUTE_ALL_BITS_SET +}; #if !TARGET_IPHONE_SIMULATOR - ipv6_service_update_router(serviceID, new_dict); -#endif /* !TARGET_IPHONE_SIMULATOR */ +static __inline__ void +IPv4RouteListLog(int level, IPv4RouteListRef routes) +{ + CFStringRef str = IPv4RouteListCopyDescription(routes); - changed = service_dict_set(serviceID, kSCEntNetIPv6, new_dict); - if (new_dict == NULL) { - /* clean up the rank too */ - CFDictionaryRemoveValue(S_ipv6_service_rank_dict, serviceID); - } - my_CFRelease(&new_dict); - return (changed); + my_log(level, "%@", str); + CFRelease(str); + return; } static void -accumulate_dns_servers(CFArrayRef in_servers, ProtocolFlags active_protos, - CFMutableArrayRef out_servers, CFStringRef interface) +IPv4RouteListApply(IPv4RouteListRef old_routes, IPv4RouteListRef new_routes, + int sockfd) { - int count; - int i; + RouteListApply(&IPv4RouteListInfo, + (RouteListRef)old_routes, (RouteListRef)new_routes, + sockfd); + return; +} - count = CFArrayGetCount(in_servers); - for (i = 0; i < count; i++) { - CFStringRef addr; - struct in6_addr ipv6_addr; - struct in_addr ip_addr; +static void +IPv4RouteListFinalize(IPv4RouteListRef routes) +{ + RouteListFinalize(&IPv4RouteListInfo, (RouteListRef)routes); + return; +} +#endif /* !TARGET_IPHONE_SIMULATOR */ - addr = CFArrayGetValueAtIndex(in_servers, i); - assert(addr != NULL); +#ifdef TEST_IPV4_ROUTELIST +static IPv4RouteListRef +IPv4RouteListAddRouteList(IPv4RouteListRef routes, int init_size, + IPv4RouteListRef service_routes, Rank rank) +{ + return ((IPv4RouteListRef) + RouteListAddRouteList(&IPv4RouteListInfo, + (RouteListRef)routes, init_size, + (RouteListRef)service_routes, rank)); +} +#endif /* TEST_IPV4_ROUTELIST */ - if (cfstring_to_ip(addr, &ip_addr)) { - /* IPv4 address */ - if ((active_protos & kProtocolFlagsIPv4) == 0 - && ntohl(ip_addr.s_addr) != INADDR_LOOPBACK) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: no IPv4 connectivity, " - "ignoring DNS server address ", IP_FORMAT, - IP_LIST(&ip_addr)); - } - continue; - } +static CFStringRef +plist_get_string(CFDictionaryRef dict, CFStringRef prop_name, + char * buf, int buf_size) +{ + CFStringRef val; - CFRetain(addr); - } - else if (cfstring_to_ip6(addr, &ipv6_addr)) { - /* IPv6 address */ - if ((active_protos & kProtocolFlagsIPv6) == 0 - && !IN6_IS_ADDR_LOOPBACK(&ipv6_addr)) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - char ntopbuf[INET6_ADDRSTRLEN]; + val = CFDictionaryGetValue(dict, prop_name); + if (isA_CFString(val) == NULL) { + return (NULL); + } + if (CFStringGetCString(val, buf, buf_size, kCFStringEncodingUTF8) + == FALSE) { + return (NULL); + } + return (val); +} - my_log(LOG_DEBUG, - "IPMonitor: no IPv6 connectivity, " - "ignoring DNS server address %s", - inet_ntop(AF_INET6, &ipv6_addr, - ntopbuf, sizeof(ntopbuf))); - } - continue; - } +typedef struct { + struct in_addr addr; + int * count_p; + IFIndex ifindex; + IFIndex exclude_ifindex; + IPv4RouteRef * route_p; + Rank rank; + const char * descr; +} AddIPv4RouteContext, * AddIPv4RouteContextRef; - if ((IN6_IS_ADDR_LINKLOCAL(&ipv6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&ipv6_addr)) - && (interface != NULL) - && (CFStringFind(addr, CFSTR("%"), 0).location == kCFNotFound)) { - // append interface name to IPv6 link local address - addr = CFStringCreateWithFormat(NULL, NULL, - CFSTR("%@%%%@"), - addr, - interface); - } else { - CFRetain(addr); - } +static void +AddIPv4Route(const void * value, void * context) +{ + AddIPv4RouteContextRef ctx = (AddIPv4RouteContextRef)context; + CFDictionaryRef dict = (CFDictionaryRef)value; + IPv4RouteRef r = *ctx->route_p; + + dict = isA_CFDictionary(dict); + if (dict == NULL + || !dict_get_ip(dict, kSCPropNetIPv4RouteDestinationAddress, &r->dest) + || !dict_get_ip(dict, kSCPropNetIPv4RouteSubnetMask, &r->mask)) { + /* one less route than we expected */ + if (dict == NULL) { + my_log(LOG_NOTICE, "IPMonitor: %s route is not a dictionary", + ctx->descr); } else { - /* bad IP address */ - my_log(LOG_NOTICE, - "IPMonitor: ignoring bad DNS server address '%@'", - addr); - continue; + my_log(LOG_NOTICE, "IPMonitor: %s route is invalid, %@", + ctx->descr, dict); + } + goto skip; + } + if (IPv4RouteSetPrefixLength(r) == FALSE) { + my_log(LOG_NOTICE, "IPMonitor: %s route has invalid subnet mask, %@", + ctx->descr, dict); + goto skip; + } + r->rank = ctx->rank; + r->exclude_ifindex = ctx->exclude_ifindex; + if (ctx->ifindex != 0) { + r->ifindex = ctx->ifindex; + r->ifa = ctx->addr; + if (ctx->exclude_ifindex == 0 + && dict_get_ip(dict, + kSCPropNetIPv4RouteGatewayAddress, + &r->gateway)) { + r->flags |= kRouteFlagsHasGateway; + if (r->prefix_length == IPV4_ROUTE_ALL_BITS_SET) { + r->flags |= kRouteFlagsIsHost; + } } + } + else { + char ifname[IFNAMSIZ]; - /* DNS server is valid and one we want */ - CFArrayAppendValue(out_servers, addr); - CFRelease(addr); + if (plist_get_string(dict, kSCPropNetIPv4RouteInterfaceName, + ifname, sizeof(ifname)) != NULL) { + IFIndex ifindex; + + ifindex = my_if_nametoindex(ifname); + if (ifindex == 0) { + my_log(LOG_NOTICE, + "IPMonitor %s: interface %s does not exist, %@", + ctx->descr, ifname, dict); + goto skip; + } + else if (ifindex == ctx->ifindex) { + my_log(LOG_NOTICE, + "IPMonitor %s: interface %s unexpected, %@", + ctx->descr, ifname, dict); + goto skip; + } + r->ifindex = ifindex; + } } + (*ctx->route_p)++; + return; + + skip: + (*ctx->count_p)--; return; + } -static void -merge_dns_servers(CFMutableDictionaryRef new_dict, - CFArrayRef state_servers, - CFArrayRef setup_servers, - Boolean have_setup, - ProtocolFlags active_protos, - CFStringRef interface) +static boolean_t +confirm_interface_name(CFDictionaryRef dict, CFStringRef ifname) { - CFMutableArrayRef dns_servers; - Boolean have_dns_setup = FALSE; + CFStringRef confirmed_ifname; + boolean_t confirmed; - if (state_servers == NULL && setup_servers == NULL) { - /* no DNS servers */ - return; + confirmed_ifname + = CFDictionaryGetValue(dict, kSCPropConfirmedInterfaceName); + if (isA_CFString(confirmed_ifname) != NULL) { + confirmed = CFEqual(confirmed_ifname, ifname); } - dns_servers = CFArrayCreateMutable(NULL, 0, - &kCFTypeArrayCallBacks); - if (setup_servers != NULL) { - accumulate_dns_servers(setup_servers, active_protos, - dns_servers, interface); - if (CFArrayGetCount(dns_servers) > 0) { - have_dns_setup = TRUE; + else { + confirmed = TRUE; + } + return (confirmed); +} + +/* + * Function: IPv4RouteListCreateWithDictionary + * + * Purpose: + * Given the service ipv4 entity dictionary, generate the list of routes. + * Currently, this includes just the default route and subnet route, + * if the service has a subnet mask. + * + * Returns: + * If the passed in route_list is NULL or too small, this routine + * allocates malloc'd memory to hold the routes. + */ +static IPv4RouteListRef +IPv4RouteListCreateWithDictionary(IPv4RouteListRef routes, + CFDictionaryRef dict, + CFNumberRef rank_assertion) +{ + boolean_t add_default = FALSE; + boolean_t add_router_subnet = FALSE; + boolean_t add_subnet = FALSE; + struct in_addr addr = { 0 }; + CFArrayRef additional_routes = NULL; + CFIndex additional_routes_count; + boolean_t allow_additional_routes = FALSE; + boolean_t exclude_from_nwi = FALSE; + CFArrayRef excluded_routes = NULL; + CFIndex excluded_routes_count; + RouteFlags flags = 0; + IFIndex ifindex; + char ifname[IFNAMSIZ]; + CFStringRef ifname_cf; + struct in_addr mask = { 0 }; + int n = 0; + int prefix_length = 0; + Rank primary_rank = kRankAssertionDefault; + IPv4RouteRef r; + Rank rank = kRankAssertionDefault; + struct in_addr router = { 0 }; + struct in_addr subnet = { 0 }; + + if (dict == NULL) { + return (NULL); + } + ifname_cf = plist_get_string(dict, kSCPropInterfaceName, + ifname, sizeof(ifname)); + if (ifname_cf == NULL) { + return (NULL); + } + ifindex = my_if_nametoindex(ifname); + if (ifindex == 0) { + /* interface doesn't exist */ + return (NULL); + } + allow_additional_routes = confirm_interface_name(dict, ifname_cf); + if (dict_get_ip(dict, kSCPropNetIPv4Router, &router) == FALSE) { + (void)dict_get_first_ip(dict, kSCPropNetIPv4DestAddresses, &router); + } + if (dict_get_first_ip(dict, kSCPropNetIPv4Addresses, &addr) + && dict_get_first_ip(dict, kSCPropNetIPv4SubnetMasks, &mask)) { + /* subnet route */ + subnet = subnet_addr(addr, mask); + /* ignore link-local subnets, let IPConfiguration handle them for now */ + if (ntohl(subnet.s_addr) != IN_LINKLOCALNETNUM) { + prefix_length = mask_get_prefix_length(mask); + if (prefix_length < 0) { + my_log(LOG_NOTICE, + "IPMonitor: ignoring bad subnet mask " + IP_FORMAT " on %s", + IP_LIST(&mask), ifname); + } + else { + add_subnet = TRUE; + n++; + } + } + else if (router.s_addr == 0) { + exclude_from_nwi = TRUE; } } - if ((CFArrayGetCount(dns_servers) == 0 || S_append_state) - && state_servers != NULL) { - accumulate_dns_servers(state_servers, active_protos, - dns_servers, NULL); + if (addr.s_addr == 0) { + /* invalid/non-existent address */ + return (NULL); } - - /* - * Here, we determine whether or not we want all queries for this DNS - * configuration to be bound to the associated network interface. - * - * For dynamically derived network configurations (i.e. from State:) - * this would be the preferred option using the argument "Hey, the - * server told us to use these servers on this network so let's not - * argue". - * - * But, when a DNS configuration has been provided by the user/admin - * via the Network pref pane (i.e. from Setup:) we opt to not force - * binding of the outbound queries. The simplest example why we take - * this stance is with a multi-homing configuration. Consider a system - * with one network service associated with "en0" and a second service - * associated with "en1". The "en0" service has been set higher in - * the network service order so it would be primary but the user/admin - * wants the DNS queries to go to a server only accessible via "en1". - * Without this exception we would take the DNS server addresses from - * the Network pref pane (for "en0") and have the queries bound to - * "en0" where they'd never reach their intended destination (via - * "en1"). So, our exception to the rule is that we will not bind - * user/admin configurations to any specific network interface. - * - * We also add an exception to the "follow the dynamically derived - * network configuration" path for on-the-fly (no Setup: content) - * network services. - */ - if (CFArrayGetCount(dns_servers) != 0) { - CFDictionarySetValue(new_dict, - kSCPropNetDNSServerAddresses, dns_servers); - if (have_setup && !have_dns_setup) { - CFDictionarySetValue(new_dict, DNS_CONFIGURATION_SCOPED_QUERY_KEY, kCFBooleanTrue); + if (rank_assertion != NULL) { + (void)CFNumberGetValue(rank_assertion, kCFNumberSInt32Type, + &primary_rank); + } + if (router.s_addr == 0) { + /* if no router is configured, demote the rank if necessary */ + switch (primary_rank) { + case kRankAssertionLast: + case kRankAssertionNever: + case kRankAssertionScoped: + /* rank is already demoted */ + break; + default: + /* demote to RankLast */ + primary_rank = kRankAssertionLast; + break; + } + } + else { + /* + * If the router address is our address and the subnet mask is + * not 255.255.255.255, assume all routes are local to the interface. + */ + if (addr.s_addr == router.s_addr + && mask.s_addr != INADDR_BROADCAST) { + ; /* all routes local */ + } + else { + flags |= kRouteFlagsHasGateway; + } + if (rank_assertion == NULL && get_override_primary(dict)) { + primary_rank = kRankAssertionFirst; } } - my_CFRelease(&dns_servers); - return; -} - - -static boolean_t -get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, CFDictionaryRef info) -{ - ProtocolFlags active_protos = kProtocolFlagsNone; - boolean_t changed = FALSE; - CFStringRef domain; - Boolean have_setup = FALSE; - CFStringRef interface = NULL; - CFDictionaryRef ipv4; - CFDictionaryRef ipv6; - int i; - const struct { - CFStringRef key; - uint32_t flags; - Boolean append; - } merge_list[] = { - { kSCPropNetDNSSearchDomains, 0, FALSE }, - { kSCPropNetDNSSortList, 0, FALSE }, - { kSCPropNetDNSSupplementalMatchDomains, ALLOW_EMPTY_STRING, TRUE }, - { kSCPropNetDNSSupplementalMatchOrders, 0, TRUE }, - }; - CFMutableDictionaryRef new_dict = NULL; - const CFStringRef pick_list[] = { - kSCPropNetDNSDomainName, - kSCPropNetDNSOptions, - kSCPropNetDNSSearchOrder, - kSCPropNetDNSServerPort, - kSCPropNetDNSServerTimeout, - kSCPropNetDNSServiceIdentifier, - kSCPropNetDNSSupplementalMatchDomainsNoSearch, - }; - IPv4RouteListRef routes = NULL; + if (S_dict_get_boolean(dict, kIsNULL, FALSE)) { + exclude_from_nwi = TRUE; + flags |= kRouteFlagsIsNULL; + } - if ((state_dict == NULL) && (setup_dict == NULL)) { - /* there is no DNS content */ - goto done; + switch (primary_rank) { + case kRankAssertionScoped: + /* Scoped means all routes for the service get scoped */ + primary_rank = rank = kRankAssertionNever; + flags |= kRouteFlagsIsScoped; + break; + case kRankAssertionNever: + /* Never means just the default route gets scoped */ + rank = kRankAssertionLast; + flags |= kRouteFlagsIsScoped; + break; + default: + rank = primary_rank; + break; } - ipv4 = service_dict_get(serviceID, kSCEntNetIPv4); - routes = ipv4_dict_get_routelist(ipv4); + if ((flags & kRouteFlagsHasGateway) != 0) { + add_router_subnet = TRUE; + n++; + } - if (routes != NULL) { - if (get_service_setup_entity(info, serviceID, kSCEntNetIPv4) != NULL) { - have_setup = TRUE; + if (ifindex != lo0_ifindex()) { + add_default = TRUE; + n++; + } + if (allow_additional_routes) { + additional_routes + = CFDictionaryGetValue(dict, kSCPropNetIPv4AdditionalRoutes); + additional_routes = isA_CFArray(additional_routes); + if (additional_routes != NULL) { + additional_routes_count = CFArrayGetCount(additional_routes); + n += additional_routes_count; + } + excluded_routes + = CFDictionaryGetValue(dict, kSCPropNetIPv4ExcludedRoutes); + excluded_routes = isA_CFArray(excluded_routes); + if (excluded_routes != NULL) { + excluded_routes_count = CFArrayGetCount(excluded_routes); + n += excluded_routes_count; } + } + if (routes == NULL || routes->size < n) { + routes = (IPv4RouteListRef)malloc(IPv4RouteListComputeSize(n)); + routes->size = n; + } + bzero(routes, IPv4RouteListComputeSize(n)); + routes->count = n; + if (exclude_from_nwi) { + routes->flags |= kRouteListFlagsExcludeNWI; + } - active_protos |= kProtocolFlagsIPv4; + /* start at the beginning */ + r = routes->list; - interface = ipv4_dict_get_ifname(ipv4); + if (add_default) { + /* add the default route */ + routes->flags |= kRouteListFlagsHasDefault; + r->ifindex = ifindex; + r->ifa = addr; + r->flags = flags; + if ((flags & kRouteFlagsHasGateway) != 0) { + r->gateway = router; + } + else { + r->gateway = addr; + } + r->rank = primary_rank; + r++; } - ipv6 = service_dict_get(serviceID, kSCEntNetIPv6); - if (ipv6 != NULL) { - if (!have_setup && - get_service_setup_entity(info, serviceID, kSCEntNetIPv6) != NULL) { - have_setup = TRUE; + /* add the subnet route */ + if (add_subnet) { + if ((flags & kRouteFlagsIsNULL) != 0) { + r->flags |= kRouteFlagsIsNULL; } + r->ifindex = ifindex; + r->gateway = addr; + r->dest = subnet; + r->mask = mask; + r->prefix_length = prefix_length; + r->ifa = addr; + r->rank = rank; + r++; + } - active_protos |= kProtocolFlagsIPv6; - - if (interface == NULL) { - interface = CFDictionaryGetValue(ipv6, - kSCPropInterfaceName); + /* add the router subnet route */ + if (add_router_subnet) { + if ((flags & kRouteFlagsIsNULL) != 0) { + r->flags |= kRouteFlagsIsNULL; } + r->ifindex = ifindex; + r->gateway = addr; + r->dest = router; + r->mask.s_addr = INADDR_BROADCAST; + r->prefix_length = IPV4_ROUTE_ALL_BITS_SET; + r->ifa = addr; + r->rank = rank; + r++; } + if (additional_routes != NULL || excluded_routes != NULL) { + AddIPv4RouteContext context; - if (active_protos == kProtocolFlagsNone) { - /* there is no IPv4 nor IPv6 */ - if (state_dict == NULL) { - /* ... and no DNS content that we care about */ - goto done; + bzero(&context, sizeof(context)); + context.count_p = &routes->count; + context.route_p = &r; + context.rank = rank; + + /* additional routes */ + if (additional_routes != NULL) { + context.ifindex = ifindex; + context.addr = addr; + context.descr = "AdditionalRoutes"; + CFArrayApplyFunction(additional_routes, + CFRangeMake(0, additional_routes_count), + AddIPv4Route, &context); + } + /* excluded routes */ + if (excluded_routes != NULL) { + context.descr = "ExcludedRoutes"; + /* exclude this interface */ + context.ifindex = 0; + context.exclude_ifindex = ifindex; + CFArrayApplyFunction(excluded_routes, + CFRangeMake(0, excluded_routes_count), + AddIPv4Route, &context); } - setup_dict = NULL; } + return (routes); +} - /* merge DNS configuration */ - new_dict = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); +/** + ** IPv6Route* + **/ +#define IPV6_ROUTE_ALL_BITS_SET 128 - if (active_protos == kProtocolFlagsNone) { - merge_dns_servers(new_dict, - my_CFDictionaryGetArray(state_dict, - kSCPropNetDNSServerAddresses), - NULL, - FALSE, - kProtocolFlagsIPv4 | kProtocolFlagsIPv6, - NULL); - } - else { - merge_dns_servers(new_dict, - my_CFDictionaryGetArray(state_dict, - kSCPropNetDNSServerAddresses), - my_CFDictionaryGetArray(setup_dict, - kSCPropNetDNSServerAddresses), - have_setup, - active_protos, - interface); +static boolean_t +ipv6_prefix_length_is_valid(int prefix_length) +{ + if (prefix_length < 0 || prefix_length > IPV6_ROUTE_ALL_BITS_SET) { + return (FALSE); } + return (TRUE); +} - for (i = 0; i < sizeof(merge_list)/sizeof(merge_list[0]); i++) { - merge_array_prop(new_dict, - merge_list[i].key, - state_dict, - setup_dict, - merge_list[i].flags, - merge_list[i].append); - } - - for (i = 0; i < sizeof(pick_list)/sizeof(pick_list[0]); i++) { - pick_prop(new_dict, - pick_list[i], - state_dict, - setup_dict, - 0); - } - - if (active_protos == kProtocolFlagsNone) { - /* there is no IPv4 nor IPv6, only supplemental or service-specific DNS */ - if (CFDictionaryContainsKey(new_dict, - kSCPropNetDNSSupplementalMatchDomains)) { - /* only keep State: supplemental */ - CFDictionaryRemoveValue(new_dict, kSCPropNetDNSDomainName); - CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSearchDomains); - CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSearchOrder); - CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSortList); +/* + * from netinet6/in6.c + */ +static void +in6_len2mask(struct in6_addr * mask, int len) +{ + int i; - if ((interface == NULL) && (setup_dict == NULL) && (state_dict != NULL)) { - /* - * for supplemental-only configurations, add any scoped (or - * wild-card "*") interface - */ - interface = CFDictionaryGetValue(state_dict, kSCPropInterfaceName); - } - } else if (CFDictionaryContainsKey(new_dict, kSCPropNetDNSServiceIdentifier) && - (interface == NULL) && - (state_dict != NULL)) { - interface = CFDictionaryGetValue(state_dict, kSCPropInterfaceName); - } else { - goto done; - } - } + bzero(mask, sizeof(*mask)); + for (i = 0; i < len / 8; i++) + mask->s6_addr[i] = 0xff; + if (len % 8) + mask->s6_addr[i] = (0xff00 >> (len % 8)) & 0xff; +} - if (CFDictionaryGetCount(new_dict) == 0) { - my_CFRelease(&new_dict); - goto done; - } +static void +in6_maskaddr(struct in6_addr * addr, const struct in6_addr * mask) +{ + int i; - if (interface != NULL) { - CFDictionarySetValue(new_dict, kSCPropInterfaceName, interface); + for (i = 0; i < sizeof(addr->s6_addr); i++) { + addr->s6_addr[i] &= mask->s6_addr[i]; } + return; +} - if (S_append_state) { - /* - * ensure any specified domain name (e.g. the domain returned by - * a DHCP server) is in the search list. - */ - domain = CFDictionaryGetValue(new_dict, kSCPropNetDNSDomainName); - if (isA_CFString(domain)) { - CFArrayRef search; +static void +in6_netaddr(struct in6_addr * addr, int len) +{ + struct in6_addr mask; - search = CFDictionaryGetValue(new_dict, kSCPropNetDNSSearchDomains); - if (isA_CFArray(search) && - !CFArrayContainsValue(search, CFRangeMake(0, CFArrayGetCount(search)), domain)) { - CFMutableArrayRef new_search; + in6_len2mask(&mask, len); + in6_maskaddr(addr, &mask); + return; +} - new_search = CFArrayCreateMutableCopy(NULL, 0, search); - CFArrayAppendValue(new_search, domain); - CFDictionarySetValue(new_dict, kSCPropNetDNSSearchDomains, new_search); - my_CFRelease(&new_search); - } - } +static void +in6_addr_scope_linklocal(struct in6_addr * addr, IFIndex ifindex) +{ + if (IN6_IS_ADDR_LINKLOCAL(addr)) { + addr->__u6_addr.__u6_addr16[1] = htons(ifindex); } - - done: - changed = service_dict_set(serviceID, kSCEntNetDNS, new_dict); - my_CFRelease(&new_dict); - return (changed); + return; } static void -merge_dict(const void *key, const void *value, void *context) +string_append_in6_addr(CFMutableStringRef str, const struct in6_addr * addr) { - CFMutableDictionaryRef dict = (CFMutableDictionaryRef)context; + char ntopbuf[INET6_ADDRSTRLEN]; - CFDictionarySetValue(dict, key, value); - return; + CFStringAppendCString(str, + inet_ntop(AF_INET6, addr, ntopbuf, sizeof(ntopbuf)), + kCFStringEncodingASCII); + return; } -#define PROXY_AUTO_DISCOVERY_URL 252 - -static CF_RETURNS_RETAINED CFStringRef -wpadURL_dhcp(CFDictionaryRef dhcp_options) +static void +IPv6RouteCopyDescriptionWithString(IPv6RouteRef r, CFMutableStringRef str) { - CFStringRef urlString = NULL; - - if (isA_CFDictionary(dhcp_options)) { - CFDataRef data; + if ((r->flags & kRouteFlagsIsHost) != 0) { + CFStringAppend(str, CFSTR("Host ")); + string_append_in6_addr(str, &r->dest); + } + else { + CFStringAppend(str, CFSTR("Net ")); + string_append_in6_addr(str, &r->dest); + CFStringAppendFormat(str, NULL, CFSTR("/%d"), + r->prefix_length); + } + if ((r->flags & kRouteFlagsHasGateway) != 0) { + CFStringAppend(str, CFSTR(" Gate ")); + string_append_in6_addr(str, &r->gateway); + } + RouteAddInterfaceToDescription((RouteRef)r, str); + if (!IN6_ARE_ADDR_EQUAL(&r->ifa, &in6addr_any)) { + CFStringAppend(str, CFSTR(" Ifa ")); + string_append_in6_addr(str, &r->ifa); + } + RouteAddFlagsToDescription((RouteRef)r, str); + return; +} - data = DHCPInfoGetOptionData(dhcp_options, PROXY_AUTO_DISCOVERY_URL); - if (data != NULL) { - CFURLRef url; - const UInt8 *urlBytes; - CFIndex urlLen; +static CFStringRef +IPv6RouteCopyDescription(RouteRef r) +{ + CFMutableStringRef str; - urlBytes = CFDataGetBytePtr(data); - urlLen = CFDataGetLength(data); - while ((urlLen > 0) && (urlBytes[urlLen - 1] == 0)) { - // remove trailing NUL - urlLen--; - } + str = CFStringCreateMutable(NULL, 0); + IPv6RouteCopyDescriptionWithString((IPv6RouteRef)r, str); + return (str); +} - if (urlLen <= 0) { - return NULL; - } +static CFMutableStringRef +IPv6RouteListCopyDescription(IPv6RouteListRef routes) +{ + int i; + IPv6RouteRef r; + CFMutableStringRef str; - url = CFURLCreateWithBytes(NULL, urlBytes, urlLen, kCFStringEncodingUTF8, NULL); - if (url != NULL) { - urlString = CFURLGetString(url); - if (urlString != NULL) { - CFRetain(urlString); - } - CFRelease(url); - } - } + str = CFStringCreateMutable(NULL, 0); + CFStringAppendFormat(str, NULL, CFSTR(" = {"), + routes->count); + for (i = 0, r = routes->list; i < routes->count; i++, r++) { + CFStringAppendFormat(str, NULL, CFSTR("\n%2d. "), i); + IPv6RouteCopyDescriptionWithString(r, str); } - - return urlString; + CFStringAppend(str, CFSTR("\n}")); + return (str); } -static CF_RETURNS_RETAINED CFStringRef -wpadURL_dns(void) +#ifdef TEST_IPV6_ROUTELIST + +static void +IPv6RouteLog(int level, RouteRef route, const char * msg) { - CFURLRef url; - CFStringRef urlString = NULL; + CFStringRef str = IPv6RouteCopyDescription(route); - url = CFURLCreateWithString(NULL, CFSTR("http://wpad/wpad.dat"), NULL); - if (url != NULL) { - urlString = CFURLGetString(url); - if (urlString != NULL) { - CFRetain(urlString); - } - CFRelease(url); + if (msg == NULL) { + SCPrint(TRUE, stdout, CFSTR("%@\n"), str); + } + else { + SCPrint(TRUE, stdout, CFSTR("%s: %@\n"), msg, str); } + CFRelease(str); + return; +} - return urlString; +static __inline__ void +IPv6RouteListPrint(IPv6RouteListRef routes) +{ + CFStringRef str = IPv6RouteListCopyDescription(routes); + + SCPrint(TRUE, stdout, CFSTR("%@\n"), str); + CFRelease(str); + return; } -static boolean_t -get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, CFDictionaryRef info) +#else /* TEST_IPV6_ROUTELIST */ + +static __inline__ void +IPv6RouteLog(int level, RouteRef route, const char * msg) { - ProtocolFlags active_protos = kProtocolFlagsNone; - boolean_t changed = FALSE; - CFStringRef interface = NULL; - CFDictionaryRef ipv4; - CFDictionaryRef ipv6; - CFMutableDictionaryRef new_dict = NULL; - const struct { - CFStringRef key; - uint32_t flags; - Boolean append; - } merge_list[] = { - { kSCPropNetProxiesSupplementalMatchDomains, ALLOW_EMPTY_STRING, TRUE }, - { kSCPropNetProxiesSupplementalMatchOrders, 0, TRUE }, - }; - const struct { - CFStringRef key1; /* an "enable" key */ - CFStringRef key2; - CFStringRef key3; - } pick_list[] = { - { kSCPropNetProxiesFTPEnable, kSCPropNetProxiesFTPProxy, kSCPropNetProxiesFTPPort }, - { kSCPropNetProxiesGopherEnable, kSCPropNetProxiesGopherProxy, kSCPropNetProxiesGopherPort }, - { kSCPropNetProxiesHTTPEnable, kSCPropNetProxiesHTTPProxy, kSCPropNetProxiesHTTPPort }, - { kSCPropNetProxiesHTTPSEnable, kSCPropNetProxiesHTTPSProxy, kSCPropNetProxiesHTTPSPort }, - { kSCPropNetProxiesRTSPEnable, kSCPropNetProxiesRTSPProxy, kSCPropNetProxiesRTSPPort }, - { kSCPropNetProxiesSOCKSEnable, kSCPropNetProxiesSOCKSProxy, kSCPropNetProxiesSOCKSPort }, - { kSCPropNetProxiesProxyAutoConfigEnable, - kSCPropNetProxiesProxyAutoConfigURLString, - kSCPropNetProxiesProxyAutoConfigJavaScript, }, - { kSCPropNetProxiesProxyAutoDiscoveryEnable, - NULL, - NULL, } - }; - IPv4RouteListRef routes = NULL; + CFStringRef str = IPv6RouteCopyDescription(route); - if ((state_dict == NULL) && (setup_dict == NULL)) { - /* there is no proxy content */ - goto done; + if (msg == NULL) { + my_log(level, "%@", str); + } + else { + my_log(level, "%s: %@", msg, str); } + CFRelease(str); + return; +} - ipv4 = service_dict_get(serviceID, kSCEntNetIPv4); - routes = ipv4_dict_get_routelist(ipv4); +#endif /* TEST_IPV6_ROUTELIST */ - if (routes != NULL) { - active_protos |= kProtocolFlagsIPv4; +static size_t +IPv6RouteListComputeSize(CFIndex n) +{ + return (offsetof(IPv6RouteList, list[n])); +} - interface = ipv4_dict_get_ifname(ipv4); - } - ipv6 = service_dict_get(serviceID, kSCEntNetIPv6); - if (ipv6 != NULL) { - active_protos |= kProtocolFlagsIPv6; +typedef struct { + struct in6_addr * addr; + int * count_p; + IFIndex ifindex; + IFIndex exclude_ifindex; + IPv6RouteRef * route_p; + Rank rank; + const char * descr; +} AddIPv6RouteContext, * AddIPv6RouteContextRef; - if (interface == NULL) { - interface = CFDictionaryGetValue(ipv6, - kSCPropInterfaceName); +static void +AddIPv6Route(const void * value, void * context) +{ + AddIPv6RouteContextRef ctx = (AddIPv6RouteContextRef)context; + CFDictionaryRef dict = (CFDictionaryRef)value; + IPv6RouteRef r = *ctx->route_p; + + dict = isA_CFDictionary(dict); + if (dict == NULL + || !dict_get_ipv6(dict, kSCPropNetIPv6RouteDestinationAddress, &r->dest) + || !dict_get_int(dict, kSCPropNetIPv6RoutePrefixLength, + &r->prefix_length) + || !ipv6_prefix_length_is_valid(r->prefix_length)) { + /* one less route than we expected */ + if (dict == NULL) { + my_log(LOG_NOTICE, "IPMonitor: %s route is not a dictionary", + ctx->descr); + } + else { + my_log(LOG_NOTICE, "IPMonitor: %s route is invalid, %@", + ctx->descr, dict); + } + goto skip; + } + r->rank = ctx->rank; + r->exclude_ifindex = ctx->exclude_ifindex; + if (ctx->ifindex != 0) { + r->ifindex = ctx->ifindex; + r->ifa = *ctx->addr; + if (ctx->exclude_ifindex == 0 + && dict_get_ipv6(dict, + kSCPropNetIPv6RouteGatewayAddress, + &r->gateway)) { + r->flags |= kRouteFlagsHasGateway; + if (r->prefix_length == IPV6_ROUTE_ALL_BITS_SET) { + r->flags |= kRouteFlagsIsHost; + } } } + else { + char ifname[IFNAMSIZ]; - if (active_protos == kProtocolFlagsNone) { - /* there is no IPv4 nor IPv6 */ - if (state_dict == NULL) { - /* ... and no proxy content that we care about */ - goto done; + if (plist_get_string(dict, kSCPropNetIPv6RouteInterfaceName, + ifname, sizeof(ifname)) != NULL) { + IFIndex ifindex; + + ifindex = my_if_nametoindex(ifname); + if (ifindex == 0) { + my_log(LOG_NOTICE, + "IPMonitor %s: interface %s does not exist, %@", + ctx->descr, ifname, dict); + goto skip; + } + else if (ifindex == ctx->ifindex) { + my_log(LOG_NOTICE, + "IPMonitor %s: interface %s unexpected, %@", + ctx->descr, ifname, dict); + goto skip; + } + r->ifindex = ifindex; } - setup_dict = NULL; } + (*ctx->route_p)++; + return; - if ((setup_dict != NULL) && (state_dict != NULL)) { - CFIndex i; - CFMutableDictionaryRef setup_copy; + skip: + (*ctx->count_p)--; + return; - /* - * Merge the per-service "Setup:" and "State:" proxy information with - * the "Setup:" information always taking precedence. Additionally, - * ensure that if any group of "Setup:" values (e.g. Enabled, Proxy, - * Port) is defined than all of the values for that group will be - * used. That is, we don't allow mixing some of the values from - * the "Setup:" keys and others from the "State:" keys. - */ - new_dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); +} - for (i = 0; i < sizeof(merge_list)/sizeof(merge_list[0]); i++) { - merge_array_prop(new_dict, - merge_list[i].key, - state_dict, - setup_dict, - merge_list[i].flags, - merge_list[i].append); - } +/* + * Function: IPv6RouteListCreateWithDictionary + * + * Purpose: + * Given the service IPv6 entity dictionary, generate the list of routes. + * + * Returns: + * If the passed in route_list is NULL or too small, this routine + * allocates malloc'd memory to hold the routes. + */ +static IPv6RouteListRef +IPv6RouteListCreateWithDictionary(IPv6RouteListRef routes, + CFDictionaryRef dict, + CFNumberRef rank_assertion) +{ + boolean_t add_default = FALSE; + boolean_t add_prefix = FALSE; + struct in6_addr addr; + CFArrayRef additional_routes = NULL; + CFIndex additional_routes_count; + boolean_t allow_additional_routes = FALSE; + boolean_t exclude_from_nwi = FALSE; + CFArrayRef excluded_routes = NULL; + CFIndex excluded_routes_count; + RouteFlags flags = 0; + IFIndex ifindex; + char ifname[IFNAMSIZ]; + CFStringRef ifname_cf; + int n = 0; + int prefix_length = 0; + Rank primary_rank = kRankAssertionDefault; + IPv6RouteRef r; + Rank rank = kRankAssertionDefault; + struct in6_addr router = in6addr_any; - setup_copy = CFDictionaryCreateMutableCopy(NULL, 0, setup_dict); - for (i = 0; i < sizeof(pick_list)/sizeof(pick_list[0]); i++) { - if (CFDictionaryContainsKey(setup_copy, pick_list[i].key1)) { - /* - * if a "Setup:" enabled key has been provided than we want to - * ignore all of the "State:" keys - */ - CFDictionaryRemoveValue(new_dict, pick_list[i].key1); - if (pick_list[i].key2 != NULL) { - CFDictionaryRemoveValue(new_dict, pick_list[i].key2); - } - if (pick_list[i].key3 != NULL) { - CFDictionaryRemoveValue(new_dict, pick_list[i].key3); - } - } else if (CFDictionaryContainsKey(state_dict, pick_list[i].key1) || - ((pick_list[i].key2 != NULL) && CFDictionaryContainsKey(state_dict, pick_list[i].key2)) || - ((pick_list[i].key3 != NULL) && CFDictionaryContainsKey(state_dict, pick_list[i].key3))) { - /* - * if a "Setup:" enabled key has not been provided and we have - * some" "State:" keys than we remove all of of "Setup:" keys - */ - CFDictionaryRemoveValue(setup_copy, pick_list[i].key1); - if (pick_list[i].key2 != NULL) { - CFDictionaryRemoveValue(setup_copy, pick_list[i].key2); - } - if (pick_list[i].key3 != NULL) { - CFDictionaryRemoveValue(setup_copy, pick_list[i].key3); - } - } + if (dict == NULL) { + return (NULL); + } + ifname_cf = plist_get_string(dict, kSCPropInterfaceName, + ifname, sizeof(ifname)); + if (ifname_cf == NULL) { + return (NULL); + } + ifindex = my_if_nametoindex(ifname); + if (ifindex == 0) { + /* interface doesn't exist */ + return (NULL); + } + allow_additional_routes = confirm_interface_name(dict, ifname_cf); + if (dict_get_ipv6(dict, kSCPropNetIPv6Router, &router) == FALSE) { + (void)dict_get_first_ipv6(dict, kSCPropNetIPv6DestAddresses, &router); + } + if (dict_get_first_ipv6(dict, kSCPropNetIPv6Addresses, &addr)) { + if (IN6_IS_ADDR_UNSPECIFIED(&addr)) { + return (NULL); + } + if (dict_get_first_int(dict, kSCPropNetIPv6PrefixLength, + &prefix_length) + && !IN6_IS_ADDR_LINKLOCAL(&addr) + && ipv6_prefix_length_is_valid(prefix_length)) { + add_prefix = TRUE; + n++; + } + else { + prefix_length = 0; } - - /* merge the "Setup:" keys */ - CFDictionaryApplyFunction(setup_copy, merge_dict, new_dict); - CFRelease(setup_copy); } - else if (setup_dict != NULL) { - new_dict = CFDictionaryCreateMutableCopy(NULL, 0, setup_dict); + else { + /* no addresses */ + return (NULL); } - else if (state_dict != NULL) { - new_dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); + if (rank_assertion != NULL) { + (void)CFNumberGetValue(rank_assertion, kCFNumberSInt32Type, + &primary_rank); + } + if (!IN6_IS_ADDR_UNSPECIFIED(&router)) { + if (ifindex != lo0_ifindex()) { + add_default = TRUE; + n++; + } + /* + * If the router address is our address and the prefix length is + * not 128, assume all routes are local to the interface. + */ + if (IN6_ARE_ADDR_EQUAL(&router, &addr) + && prefix_length != IPV6_ROUTE_ALL_BITS_SET) { + ; /* all routes local */ + } + else { + flags |= kRouteFlagsHasGateway; + } + if (rank_assertion == NULL && get_override_primary(dict)) { + primary_rank = kRankAssertionFirst; + } + } + if (S_dict_get_boolean(dict, kIsNULL, FALSE)) { + exclude_from_nwi = TRUE; + flags |= kRouteFlagsIsNULL; } - if ((new_dict != NULL) && (CFDictionaryGetCount(new_dict) == 0)) { - CFRelease(new_dict); - new_dict = NULL; + switch (primary_rank) { + case kRankAssertionScoped: + /* Scoped means all routes for the service get scoped */ + primary_rank = rank = kRankAssertionNever; + flags |= kRouteFlagsIsScoped; + break; + case kRankAssertionNever: + /* Never means just the default route gets scoped */ + rank = kRankAssertionLast; + flags |= kRouteFlagsIsScoped; + break; + default: + rank = primary_rank; + break; } - if ((new_dict != NULL) && (interface != NULL)) { - CFDictionarySetValue(new_dict, kSCPropInterfaceName, interface); + if (allow_additional_routes) { + additional_routes + = CFDictionaryGetValue(dict, kSCPropNetIPv6AdditionalRoutes); + additional_routes = isA_CFArray(additional_routes); + if (additional_routes != NULL) { + additional_routes_count = CFArrayGetCount(additional_routes); + n += additional_routes_count; + } + excluded_routes = CFDictionaryGetValue(dict, + kSCPropNetIPv6ExcludedRoutes); + excluded_routes = isA_CFArray(excluded_routes); + if (excluded_routes != NULL) { + excluded_routes_count = CFArrayGetCount(excluded_routes); + n += excluded_routes_count; + } + } + if (n == 0) { + return (NULL); } - /* process WPAD */ - if (new_dict != NULL) { - CFDictionaryRef dhcp_options; - CFNumberRef num; - CFNumberRef wpad = NULL; - int wpadEnabled = 0; - CFStringRef wpadURL = NULL; + /* need IPv6LL subnet route */ + n++; - if (CFDictionaryGetValueIfPresent(new_dict, - kSCPropNetProxiesProxyAutoDiscoveryEnable, - (const void **)&num) && - isA_CFNumber(num)) { - /* if we have a WPAD key */ - wpad = num; - if (!CFNumberGetValue(num, kCFNumberIntType, &wpadEnabled)) { - /* if we don't like the enabled key/value */ - wpadEnabled = 0; - } - } + if (routes == NULL || routes->size < n) { + routes = (IPv6RouteListRef)malloc(IPv6RouteListComputeSize(n)); + routes->size = n; + } + bzero(routes, IPv6RouteListComputeSize(n)); + routes->count = n; + if (exclude_from_nwi) { + routes->flags |= kRouteListFlagsExcludeNWI; + } - if (wpadEnabled) { - int pacEnabled = 0; + /* start at the beginning */ + r = routes->list; + if (add_default) { + /* add the default route */ + routes->flags |= kRouteListFlagsHasDefault; + r->ifindex = ifindex; + r->ifa = addr; + r->flags = flags; + if ((flags & kRouteFlagsHasGateway) != 0) { + r->gateway = router; + } + else { + r->gateway = addr; + } + r->rank = primary_rank; + if (S_scopedroute_v6) { + r->flags |= kRouteFlagsKernelManaged; + } + r++; + } - num = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigEnable); - if (!isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberIntType, &pacEnabled)) { - /* if we don't like the enabled key/value */ - pacEnabled = 0; - } - if (pacEnabled) { - CFStringRef pacURL; + /* add IPv6LL route */ + r->ifindex = ifindex; + r->dest.s6_addr[0] = 0xfe; + r->dest.s6_addr[1] = 0x80; + r->prefix_length = 64; + r->rank = rank; + r->flags |= kRouteFlagsKernelManaged; + r++; - pacURL = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigURLString); - if (pacURL != NULL) { - if (!isA_CFString(pacURL)) { - /* if we don't like the PAC URL */ - pacEnabled = 0; - } - } else { - CFStringRef pacJS; - pacJS = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigJavaScript); - if (!isA_CFString(pacJS)) { - /* if we don't have (or like) the PAC JavaScript */ - pacEnabled = 0; - } - } - } + /* add the prefix route(s) */ + if (add_prefix) { + r->flags |= kRouteFlagsKernelManaged; + if ((flags & kRouteFlagsIsNULL) != 0) { + r->flags |= kRouteFlagsIsNULL; + } + r->ifindex = ifindex; + r->gateway = addr; + r->dest = addr; + in6_netaddr(&r->dest, prefix_length); + r->prefix_length = prefix_length; + r->ifa = addr; + r->rank = rank; + r++; + } - if (pacEnabled) { - /* - * we already have a PAC URL so disable WPAD. - */ - wpadEnabled = 0; - goto setWPAD; - } + if (additional_routes != NULL || excluded_routes != NULL) { + AddIPv6RouteContext context; - /* - * if WPAD is enabled and we don't already have a PAC URL then - * we check for a DHCP provided URL. If not available, we use - * a PAC URL pointing to a well-known file (wpad.dat) on a - * well-known host (wpad.). - */ - dhcp_options = get_service_state_entity(info, serviceID, kSCEntNetDHCP); - wpadURL = wpadURL_dhcp(dhcp_options); - if (wpadURL == NULL) { - wpadURL = wpadURL_dns(); - } - if (wpadURL == NULL) { - wpadEnabled = 0; /* if we don't have a WPAD URL */ - goto setWPAD; - } + bzero(&context, sizeof(context)); + context.count_p = &routes->count; + context.route_p = &r; + context.rank = rank; - pacEnabled = 1; - num = CFNumberCreate(NULL, kCFNumberIntType, &pacEnabled); - CFDictionarySetValue(new_dict, - kSCPropNetProxiesProxyAutoConfigEnable, - num); - CFRelease(num); - CFDictionarySetValue(new_dict, - kSCPropNetProxiesProxyAutoConfigURLString, - wpadURL); - CFRelease(wpadURL); + /* additional routes */ + if (additional_routes != NULL) { + context.ifindex = ifindex; + context.addr = &addr; + context.descr = "AdditionalRoutes"; + CFArrayApplyFunction(additional_routes, + CFRangeMake(0, additional_routes_count), + AddIPv6Route, &context); } - - setWPAD: - if (wpad != NULL) { - num = CFNumberCreate(NULL, kCFNumberIntType, &wpadEnabled); - CFDictionarySetValue(new_dict, - kSCPropNetProxiesProxyAutoDiscoveryEnable, - num); - CFRelease(num); + /* excluded routes */ + if (excluded_routes != NULL) { + context.descr = "ExcludedRoutes"; + /* exclude this interface */ + context.ifindex = 0; + context.exclude_ifindex = ifindex; + context.addr = NULL; + CFArrayApplyFunction(excluded_routes, + CFRangeMake(0, excluded_routes_count), + AddIPv6Route, &context); } } - - done: - changed = service_dict_set(serviceID, kSCEntNetProxies, new_dict); - my_CFRelease(&new_dict); - return (changed); + return (routes); } -#if !TARGET_OS_IPHONE -static boolean_t -get_smb_changes(CFStringRef serviceID, CFDictionaryRef state_dict, - CFDictionaryRef setup_dict, CFDictionaryRef info) +static const void * +IPv6RouteGateway(RouteRef r_route) { - boolean_t changed = FALSE; - int i; - CFMutableDictionaryRef new_dict = NULL; - const CFStringRef pick_list[] = { - kSCPropNetSMBNetBIOSName, - kSCPropNetSMBNetBIOSNodeType, -#ifdef ADD_NETBIOS_SCOPE - kSCPropNetSMBNetBIOSScope, -#endif // ADD_NETBIOS_SCOPE - kSCPropNetSMBWorkgroup, - }; + IPv6RouteRef route = (IPv6RouteRef)r_route; + return (&route->gateway); +} - if (service_dict_get(serviceID, kSCEntNetIPv4) == NULL) { - /* there is no IPv4 */ - goto done; - } +static void +IPv6RouteSetGateway(RouteRef r_route, const void * address) +{ + IPv6RouteRef route = (IPv6RouteRef)r_route; - if (state_dict == NULL && setup_dict == NULL) { - /* there is no SMB */ - goto done; - } + route->gateway = *((struct in6_addr *)address); + return; +} - /* merge SMB configuration */ - new_dict = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); +static const void * +IPv6RouteDestination(RouteRef r_route) +{ + IPv6RouteRef route = (IPv6RouteRef)r_route; + return (&route->dest); +} - merge_array_prop(new_dict, - kSCPropNetSMBWINSAddresses, - state_dict, - setup_dict, - 0, - FALSE); - for (i = 0; i < sizeof(pick_list)/sizeof(pick_list[0]); i++) { - pick_prop(new_dict, - pick_list[i], - state_dict, - setup_dict, - 0); - } - - if (CFDictionaryGetCount(new_dict) == 0) { - my_CFRelease(&new_dict); - goto done; - } - - done: - changed = service_dict_set(serviceID, kSCEntNetSMB, new_dict); - my_CFRelease(&new_dict); - return (changed); +static __inline__ int +in6_addr_cmp(const struct in6_addr * a, const struct in6_addr * b) +{ + return (memcmp(a->s6_addr, b->s6_addr, sizeof(struct in6_addr))); } -#endif /* !TARGET_OS_IPHONE */ -static CFStringRef -services_info_get_interface(CFDictionaryRef services_info, - CFStringRef serviceID) +static boolean_t +IPv6RouteIsEqual(RouteRef r_route1, RouteRef r_route2) { - CFStringRef interface = NULL; - CFDictionaryRef ipv4_dict; - - ipv4_dict = get_service_state_entity(services_info, serviceID, - kSCEntNetIPv4); - if (isA_CFDictionary(ipv4_dict) != NULL) { - interface = CFDictionaryGetValue(ipv4_dict, kSCPropInterfaceName); - } - else { - CFDictionaryRef ipv6_dict; + IPv6RouteRef route1 = (IPv6RouteRef)r_route1; + IPv6RouteRef route2 = (IPv6RouteRef)r_route2; - ipv6_dict = get_service_state_entity(services_info, serviceID, - kSCEntNetIPv6); - if (isA_CFDictionary(ipv6_dict) != NULL) { - interface = CFDictionaryGetValue(ipv6_dict, kSCPropInterfaceName); - } - } - return (interface); + return (route1->prefix_length == route2->prefix_length + && route1->ifindex == route2->ifindex + && route1->flags == route2->flags + && in6_addr_cmp(&route1->dest, &route2->dest) == 0 + && in6_addr_cmp(&route1->ifa, &route2->ifa) == 0 + && in6_addr_cmp(&route1->gateway, &route2->gateway) == 0); } - - -static const CFStringRef *statusEntityNames[] = { - &kSCEntNetIPSec, - &kSCEntNetPPP, - &kSCEntNetVPN, -}; - -static Boolean -get_transient_service_changes(CFStringRef serviceID, CFDictionaryRef services_info) +static boolean_t +IPv6RouteSameSubnet(RouteRef r_route, const void * addr) { - boolean_t changed = FALSE; - int i; + const struct in6_addr * address = (const struct in6_addr *)addr; + struct in6_addr netaddr; + IPv6RouteRef route = (IPv6RouteRef)r_route; - static const struct { - const CFStringRef *entityName; - const CFStringRef *statusKey; - } transientServiceInfo[] = { - { &kSCEntNetIPSec, &kSCPropNetIPSecStatus }, - { &kSCEntNetPPP, &kSCPropNetPPPStatus }, - { &kSCEntNetVPN, &kSCPropNetVPNStatus }, - }; - - for (i = 0; i < sizeof(transientServiceInfo)/sizeof(transientServiceInfo[0]); i++) { - CFDictionaryRef dict; - CFNumberRef status = NULL; - CFMutableDictionaryRef ts_dict = NULL; + netaddr = *address; + in6_netaddr(&netaddr, route->prefix_length); + return (in6_addr_cmp(&netaddr, &route->dest) == 0); +} - dict = get_service_state_entity(services_info, serviceID, *transientServiceInfo[i].entityName); - if (isA_CFDictionary(dict) != NULL) { - status = CFDictionaryGetValue(dict, *transientServiceInfo[i].statusKey); - } +#define V6_ROUTE_MSG_ADDRS_SPACE (5 * sizeof(struct sockaddr_dl) + 128) - if (isA_CFNumber(status) != NULL) { - ts_dict = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - CFDictionaryAddValue(ts_dict, - *transientServiceInfo[i].statusKey, - status); - } +typedef struct { + struct rt_msghdr hdr; + char addrs[V6_ROUTE_MSG_ADDRS_SPACE]; +} v6_route_msg; - if (service_dict_set(serviceID, *transientServiceInfo[i].entityName, ts_dict)) { - changed = TRUE; - } +/* + * Function: IPv6RouteApply + * Purpose: + * Add or remove the specified route to/from the kernel routing table. + */ +static int +IPv6RouteApply(RouteRef r_route, int cmd, int sockfd) +{ + int len; + int ret = 0; + IPv6RouteRef route = (IPv6RouteRef)r_route; + v6_route_msg rtmsg; + union { + struct sockaddr_in6 * in_p; + struct sockaddr_dl * dl_p; + void * ptr; + } rtaddr; - if (ts_dict != NULL) { - CFRelease(ts_dict); + if ((route->flags & kRouteFlagsIsScoped) != 0 + && !S_scopedroute_v6) { + return (EROUTENOTAPPLIED); + } + if ((route->flags & kRouteFlagsKernelManaged) != 0) { + /* the kernel manages this route, don't touch it */ + return (EROUTENOTAPPLIED); + } + if ((route->flags & kRouteFlagsIsNULL) != 0) { + return (EROUTENOTAPPLIED); + } + if (route->ifindex == 0) { + IPv6RouteLog(LOG_NOTICE, (RouteRef)route, + "IPMonitor IPv6RouteApply: no interface specified"); + return (ENXIO); + } + if (sockfd == -1) { +#ifdef TEST_IPV6_ROUTELIST + return (0); +#else /* TEST_IPV6_ROUTELIST */ + return (EBADF); +#endif /* TEST_IPV6_ROUTELIST */ + } + memset(&rtmsg, 0, sizeof(rtmsg)); + rtmsg.hdr.rtm_type = cmd; + rtmsg.hdr.rtm_version = RTM_VERSION; + rtmsg.hdr.rtm_seq = ++rtm_seq; + rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_IFP; + if (!IN6_IS_ADDR_UNSPECIFIED(&route->ifa)) { + rtmsg.hdr.rtm_addrs |= RTA_IFA; + } + rtmsg.hdr.rtm_flags = RTF_UP | RTF_STATIC; + if ((route->flags & kRouteFlagsIsHost) != 0) { + rtmsg.hdr.rtm_flags |= RTF_HOST; + } + else { + rtmsg.hdr.rtm_addrs |= RTA_NETMASK; + if ((route->flags & kRouteFlagsHasGateway) == 0) { + rtmsg.hdr.rtm_flags |= RTF_CLONING; } } - return (changed); -} - -static boolean_t -get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, - CFDictionaryRef setup_options, CFDictionaryRef services_info) -{ - boolean_t changed = FALSE; - CFBooleanRef ip_is_coupled = NULL; - CFMutableDictionaryRef new_dict = NULL; - CFStringRef new_rank = NULL; - CFStringRef setup_rank = NULL; - CFStringRef state_rank = NULL; + if ((route->flags & kRouteFlagsHasGateway) != 0) { + rtmsg.hdr.rtm_flags |= RTF_GATEWAY; + } + if ((route->flags & kRouteFlagsIsScoped) != 0) { + rtmsg.hdr.rtm_index = route->ifindex; + rtmsg.hdr.rtm_flags |= RTF_IFSCOPE; + } + rtaddr.ptr = rtmsg.addrs; - /* - * Check "PrimaryRank" setting - * - * Note 1: Rank setting in setup/state option overwrites the - * Rank setting in interface - * Within each rank setting, the following precedence is defined: - * - * Note 2: Rank Never > Rank Last > Rank First > Rank None - */ - if (isA_CFDictionary(state_options)) { - CFBooleanRef coupled; + /* dest */ + rtaddr.in_p->sin6_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin6_family = AF_INET6; + rtaddr.in_p->sin6_addr = route->dest; + in6_addr_scope_linklocal(&rtaddr.in_p->sin6_addr, route->ifindex); + rtaddr.ptr += sizeof(*rtaddr.in_p); - state_rank - = CFDictionaryGetValue(state_options, kSCPropNetServicePrimaryRank); - state_rank = isA_CFString(state_rank); - coupled = CFDictionaryGetValue(state_options, kIPIsCoupled); - if (isA_CFBoolean(coupled) != NULL) { - ip_is_coupled = coupled; - } + /* gateway */ + if ((rtmsg.hdr.rtm_flags & RTF_GATEWAY) != 0) { + /* gateway is an IP address */ + rtaddr.in_p->sin6_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin6_family = AF_INET6; + rtaddr.in_p->sin6_addr = route->gateway; + in6_addr_scope_linklocal(&rtaddr.in_p->sin6_addr, route->ifindex); + rtaddr.ptr += sizeof(*rtaddr.in_p); } - if (isA_CFDictionary(setup_options)) { - CFBooleanRef coupled; - - setup_rank - = CFDictionaryGetValue(setup_options, kSCPropNetServicePrimaryRank); - setup_rank = isA_CFString(setup_rank); - - coupled = CFDictionaryGetValue(setup_options, kIPIsCoupled); - if (isA_CFBoolean(coupled) != NULL) { - ip_is_coupled = coupled; - } + else { + /* gateway is the interface itself */ + rtaddr.dl_p->sdl_len = sizeof(*rtaddr.dl_p); + rtaddr.dl_p->sdl_family = AF_LINK; + rtaddr.dl_p->sdl_index = route->ifindex; + rtaddr.ptr += sizeof(*rtaddr.dl_p); } - if (((setup_rank != NULL) && CFEqual(setup_rank, kSCValNetServicePrimaryRankNever)) || - ((state_rank != NULL) && CFEqual(state_rank, kSCValNetServicePrimaryRankNever))) { - new_rank = kSCValNetServicePrimaryRankNever; + /* mask */ + if ((rtmsg.hdr.rtm_addrs & RTA_NETMASK) != 0) { + rtaddr.in_p->sin6_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin6_family = AF_INET6; + in6_len2mask(&rtaddr.in_p->sin6_addr, route->prefix_length); + rtaddr.ptr += sizeof(*rtaddr.in_p); } - else if (((setup_rank != NULL) && CFEqual(setup_rank, kSCValNetServicePrimaryRankLast)) || - ((state_rank != NULL) && CFEqual(state_rank, kSCValNetServicePrimaryRankLast))) { - new_rank = kSCValNetServicePrimaryRankLast; + + /* interface */ + if ((rtmsg.hdr.rtm_addrs & RTA_IFP) != 0) { + rtaddr.dl_p->sdl_len = sizeof(*rtaddr.dl_p); + rtaddr.dl_p->sdl_family = AF_LINK; + rtaddr.dl_p->sdl_index = route->ifindex; + rtaddr.ptr += sizeof(*rtaddr.dl_p); } - else if (((setup_rank != NULL) && CFEqual(setup_rank, kSCValNetServicePrimaryRankFirst)) || - ((state_rank != NULL) && CFEqual(state_rank, kSCValNetServicePrimaryRankFirst))) { - new_rank = kSCValNetServicePrimaryRankFirst; + /* interface address */ + if ((rtmsg.hdr.rtm_addrs & RTA_IFA) != 0) { + rtaddr.in_p->sin6_len = sizeof(*rtaddr.in_p); + rtaddr.in_p->sin6_family = AF_INET6; + rtaddr.in_p->sin6_addr = route->ifa; + rtaddr.ptr += sizeof(*rtaddr.in_p); } - /* This corresponds to Note 1 */ - if (setup_rank == NULL && state_rank == NULL) { - /* Fetch the interface associated with the service */ - CFStringRef interface; + /* apply the route */ + len = (int)(sizeof(rtmsg.hdr) + (rtaddr.ptr - (void *)rtmsg.addrs)); + rtmsg.hdr.rtm_msglen = len; + if (write(sockfd, &rtmsg, len) == -1) { + ret = errno; + } + return (ret); +} - interface = services_info_get_interface(services_info, serviceID); +static const RouteListInfo IPv6RouteListInfo = { + IPv6RouteListComputeSize, - /* Get the rank on that interface */ - if (interface != NULL) { - new_rank = CFDictionaryGetValue(S_if_rank_dict, interface); - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "serviceID %@ interface %@ rank = %@", - serviceID, interface, - (new_rank != NULL) ? new_rank : CFSTR("")); - } - } - } + IPv6RouteIsEqual, + IPv6RouteApply, + IPv6RouteGateway, + IPv6RouteSetGateway, + IPv6RouteDestination, + IPv6RouteSameSubnet, + IPv6RouteLog, + IPv6RouteCopyDescription, + sizeof(IPv6Route), + sizeof(struct in6_addr), + IPV6_ROUTE_ALL_BITS_SET +}; - if (ip_is_coupled != NULL && CFBooleanGetValue(ip_is_coupled) == FALSE) { - /* don't bother setting a value if it's the default */ - ip_is_coupled = NULL; - } - if (new_rank != NULL || ip_is_coupled != NULL) { - new_dict = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - if (new_rank != NULL) { - CFDictionarySetValue(new_dict, kSCPropNetServicePrimaryRank, - new_rank); - } - if (ip_is_coupled != NULL) { - CFDictionarySetValue(new_dict, kIPIsCoupled, kCFBooleanTrue); - } - } - changed = service_dict_set(serviceID, kSCEntNetService, new_dict); - my_CFRelease(&new_dict); - return (changed); +#ifdef TEST_IPV6_ROUTELIST +static IPv6RouteListRef +IPv6RouteListAddRouteList(IPv6RouteListRef routes, int init_size, + IPv6RouteListRef service_routes, Rank rank) +{ + return ((IPv6RouteListRef) + RouteListAddRouteList(&IPv6RouteListInfo, + (RouteListRef)routes, init_size, + (RouteListRef)service_routes, rank)); } +#endif /* TEST_IPV6_ROUTELIST */ -static CFStringRef -if_rank_key_copy(CFStringRef ifname) +#if !TARGET_IPHONE_SIMULATOR +static __inline__ void +IPv6RouteListLog(int level, IPv6RouteListRef routes) { - return (SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, - kSCDynamicStoreDomainState, - ifname, - kSCEntNetService)); + CFStringRef str = IPv6RouteListCopyDescription(routes); + + my_log(level, "%@", str); + CFRelease(str); + return; } static void -if_rank_set(CFStringRef ifname, CFDictionaryRef rank_dict) +IPv6RouteListFinalize(IPv6RouteListRef routes) { - CFStringRef rank = NULL; - - if (isA_CFDictionary(rank_dict) != NULL) { - rank = CFDictionaryGetValue(rank_dict, kSCPropNetServicePrimaryRank); - rank = isA_CFString(rank); - } - - /* specific rank is asserted */ - if (rank != NULL) { - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, "Interface %@ asserted rank %@", - ifname, rank); - } - CFDictionarySetValue(S_if_rank_dict, ifname, rank); - } else { - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, "Interface %@ removed rank", - ifname); - } - CFDictionaryRemoveValue(S_if_rank_dict, ifname); - } + RouteListFinalize(&IPv6RouteListInfo, (RouteListRef)routes); return; } static void -if_rank_apply(const void * key, const void * value, void * context) +IPv6RouteListApply(IPv6RouteListRef old_routes, IPv6RouteListRef new_routes, + int sockfd) { - CFStringRef ifname; - CFDictionaryRef rank_dict = (CFDictionaryRef)value; - - /* State:/Network/Interface//Service, is at index 3 */ - ifname = my_CFStringCopyComponent(key, CFSTR("/"), 3); - if (ifname != NULL) { - if_rank_set(ifname, rank_dict); - CFRelease(ifname); - } + RouteListApply(&IPv6RouteListInfo, + (RouteListRef)old_routes, (RouteListRef)new_routes, + sockfd); return; } +#endif /* !TARGET_IPHONE_SIMULATOR */ -static void -if_rank_dict_init(void) +/* + * Function: parse_component + * Purpose: + * Given a string 'key' and a string prefix 'prefix', + * return the next component in the slash '/' separated + * key. + * + * Examples: + * 1. key = "a/b/c" prefix = "a/" + * returns "b" + * 2. key = "a/b/c" prefix = "a/b/" + * returns "c" + */ +static CF_RETURNS_RETAINED CFStringRef +parse_component(CFStringRef key, CFStringRef prefix) { - CFDictionaryRef info; - CFStringRef pattern; - CFArrayRef patterns; + CFMutableStringRef comp; + CFRange range; - S_if_rank_dict - = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - pattern = if_rank_key_copy(kSCCompAnyRegex); - patterns = CFArrayCreate(NULL, - (const void **)&pattern, 1, - &kCFTypeArrayCallBacks); - CFRelease(pattern); - info = SCDynamicStoreCopyMultiple(S_session, NULL, patterns); - CFRelease(patterns); - if (info != NULL) { - CFDictionaryApplyFunction(info, if_rank_apply, NULL); - CFRelease(info); + if (CFStringHasPrefix(key, prefix) == FALSE) { + return (NULL); } - return; - + comp = CFStringCreateMutableCopy(NULL, 0, key); + if (comp == NULL) { + return (NULL); + } + CFStringDelete(comp, CFRangeMake(0, CFStringGetLength(prefix))); + range = CFStringFind(comp, CFSTR("/"), 0); + if (range.location == kCFNotFound) { + return (comp); + } + range.length = CFStringGetLength(comp) - range.location; + CFStringDelete(comp, range); + return (comp); } -static void -add_service_keys(CFStringRef serviceID, CFMutableArrayRef keys, CFMutableArrayRef patterns) +__private_extern__ boolean_t +service_contains_protocol(CFDictionaryRef service, int af) { - int i; - CFStringRef key; + boolean_t contains_protocol = FALSE; + CFStringRef entity; + RouteListRef routes; + CFDictionaryRef dict; - if (CFEqual(serviceID, kSCCompAnyRegex)) { - keys = patterns; + entity = (af == AF_INET) ? kSCEntNetIPv4 : kSCEntNetIPv6; + dict = CFDictionaryGetValue(service, entity); + if (dict == NULL) { + goto done; + } + routes = ipdict_get_routelist(dict); + if (routes == NULL) { + goto done; + } + if ((routes->flags & kRouteListFlagsExcludeNWI) != 0) { + goto done; } + contains_protocol = TRUE; - for (i = 0; i < ENTITY_TYPES_COUNT; i++) { - key = setup_service_key(serviceID, *entityTypeNames[i]); - CFArrayAppendValue(keys, key); - CFRelease(key); - key = state_service_key(serviceID, *entityTypeNames[i]); - CFArrayAppendValue(keys, key); - CFRelease(key); - } + done: + return (contains_protocol); +} - key = state_service_key(serviceID, kSCEntNetDHCP); - CFArrayAppendValue(patterns, key); - CFRelease(key); - key = setup_service_key(serviceID, NULL); - CFArrayAppendValue(patterns, key); - CFRelease(key); - key = state_service_key(serviceID, NULL); - CFArrayAppendValue(patterns, key); - CFRelease(key); +static CFMutableDictionaryRef +service_dict_copy(CFStringRef serviceID) +{ + CFDictionaryRef d = NULL; + CFMutableDictionaryRef service_dict; - return; + /* create a modifyable dictionary, a copy or a new one */ + d = CFDictionaryGetValue(S_service_state_dict, serviceID); + if (d == NULL) { + service_dict + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + else { + service_dict = CFDictionaryCreateMutableCopy(NULL, 0, d); + } + return (service_dict); } static void -add_status_keys(CFStringRef service_id, CFMutableArrayRef patterns) +log_service_entity(int level, CFStringRef serviceID, CFStringRef entity, + CFStringRef operation, CFTypeRef val) { - int i; + CFMutableStringRef this_val = NULL; - for (i = 0; i < sizeof(statusEntityNames)/sizeof(statusEntityNames[0]); i++) { - CFStringRef pattern; + if (val != NULL) { + boolean_t is_ipv4; + boolean_t is_ipv6; - pattern = state_service_key(service_id, *statusEntityNames[i]); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - } + if ((is_ipv4 = CFEqual(entity, kSCEntNetIPv4)) + || (is_ipv6 = CFEqual(entity, kSCEntNetIPv6))) { + RouteListUnion routes; + routes.ptr = ipdict_get_routelist(val); + if (routes.ptr != NULL) { + CFDictionaryRef service_dict = NULL; + + if (is_ipv4) { + this_val = IPv4RouteListCopyDescription(routes.v4); + } + else { + this_val = IPv6RouteListCopyDescription(routes.v6); + } + service_dict = ipdict_get_service(val); + if (service_dict != NULL) { + CFStringAppendFormat(this_val, NULL, + CFSTR("\n = %@"), + service_dict); + } + val = this_val; + } + } + } + if (val == NULL) { + val = CFSTR(""); + } + my_log(level, "IPMonitor: serviceID %@ %@ %@ value = %@", + serviceID, operation, entity, val); + my_CFRelease(&this_val); return; } -static const CFStringRef *reachabilitySetupKeys[] = { - &kSCEntNetPPP, - &kSCEntNetInterface, - &kSCEntNetIPv4, - &kSCEntNetIPv6, -}; - - -static void -add_reachability_keys(CFMutableArrayRef patterns) +static boolean_t +service_dict_set(CFStringRef serviceID, CFStringRef entity, + CFTypeRef new_val) { - int i; + boolean_t changed = FALSE; + CFTypeRef old_val; + CFMutableDictionaryRef service_dict; - for (i = 0; i < sizeof(reachabilitySetupKeys)/(sizeof(reachabilitySetupKeys[0])); i++) - { - CFStringRef pattern; - pattern = setup_service_key(kSCCompAnyRegex, *reachabilitySetupKeys[i]); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); + service_dict = service_dict_copy(serviceID); + old_val = CFDictionaryGetValue(service_dict, entity); + if (new_val == NULL) { + if (old_val != NULL) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + log_service_entity(LOG_DEBUG, serviceID, entity, + CFSTR("Removed:"), old_val); + } + CFDictionaryRemoveValue(service_dict, entity); + changed = TRUE; + } + } + else { + if (old_val == NULL || CFEqual(new_val, old_val) == FALSE) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + log_service_entity(LOG_DEBUG, serviceID, entity, + CFSTR("Changed: old"), old_val); + log_service_entity(LOG_DEBUG, serviceID, entity, + CFSTR("Changed: new"), new_val); + } + CFDictionarySetValue(service_dict, entity, new_val); + changed = TRUE; + } } + if (CFDictionaryGetCount(service_dict) == 0) { + CFDictionaryRemoveValue(S_service_state_dict, serviceID); + } + else { + CFDictionarySetValue(S_service_state_dict, serviceID, service_dict); + } + my_CFRelease(&service_dict); + return (changed); } - -static void -add_vpn_keys(CFMutableArrayRef patterns) +static CFDictionaryRef +service_dict_get(CFStringRef serviceID, CFStringRef entity) { - CFStringRef pattern; + CFDictionaryRef service_dict; - pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetVPN); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); + service_dict = CFDictionaryGetValue(S_service_state_dict, serviceID); + if (service_dict == NULL) { + return (NULL); + } + return (CFDictionaryGetValue(service_dict, entity)); } +#ifndef kSCPropNetHostname +#define kSCPropNetHostname CFSTR("Hostname") +#endif -static CFDictionaryRef -services_info_copy(SCDynamicStoreRef session, CFArrayRef service_list, - CFArrayRef if_rank_list) +__private_extern__ +CFStringRef +copy_dhcp_hostname(CFStringRef serviceID) { - int count; - CFMutableArrayRef get_keys; - CFMutableArrayRef get_patterns; - int if_count; - CFDictionaryRef info; - int s; - - count = CFArrayGetCount(service_list); - get_keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - get_patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - CFArrayAppendValue(get_keys, S_setup_global_ipv4); - CFArrayAppendValue(get_keys, S_multicast_resolvers); - CFArrayAppendValue(get_keys, S_private_resolvers); - - for (s = 0; s < count; s++) { - CFStringRef serviceID = CFArrayGetValueAtIndex(service_list, s); + CFDictionaryRef dict = NULL; + CFStringRef hostname = NULL; + CFDictionaryRef service_dict = NULL; - add_service_keys(serviceID, get_keys, get_patterns); - add_status_keys(serviceID, get_keys); + dict = service_dict_get(serviceID, kSCEntNetIPv4); + if (dict == NULL) { + return (NULL); } - - add_reachability_keys(get_patterns); - - add_vpn_keys(get_patterns); - - if_count = (if_rank_list != NULL) - ? CFArrayGetCount(if_rank_list) : 0; - for (s = 0; s < if_count; s++) { - CFStringRef ifname = CFArrayGetValueAtIndex(if_rank_list, s); - CFStringRef key; - - key = if_rank_key_copy(ifname); - CFArrayAppendValue(get_keys, key); - CFRelease(key); + service_dict = ipdict_get_service(dict); + if (service_dict == NULL) { + return (NULL); } - - info = SCDynamicStoreCopyMultiple(session, get_keys, get_patterns); - my_CFRelease(&get_keys); - my_CFRelease(&get_patterns); - return (info); + hostname = CFDictionaryGetValue(service_dict, kSCPropNetHostname); + if (hostname != NULL) { + CFRetain(hostname); + } + return (hostname); } #if !TARGET_IPHONE_SIMULATOR -static int rtm_seq = 0; -#endif /* !TARGET_IPHONE_SIMULATOR */ -#if !TARGET_IPHONE_SIMULATOR -static int -route_open_socket(void) +static struct in6_addr * +ipv6_service_get_router(CFDictionaryRef service, + IFIndex * ifindex_p, CFStringRef * ifname_p) { - int sockfd; + IPv6RouteListRef routes; + struct in6_addr * router = NULL; - if ((sockfd = socket(PF_ROUTE, SOCK_RAW, PF_ROUTE)) == -1) { - my_log(LOG_NOTICE, - "IPMonitor: route_open_socket: socket failed, %s", - strerror(errno)); + routes = ipdict_get_routelist(service); + if (routes != NULL + && (routes->flags & kRouteListFlagsExcludeNWI) == 0 + && (routes->flags & kRouteListFlagsHasDefault) != 0) { + router = &routes->list[0].gateway; + if (*ifindex_p == 0) { + *ifindex_p = routes->list[0].ifindex; + } + if (*ifname_p == NULL) { + *ifname_p = ipdict_get_ifname(service); + } } - return (sockfd); + return (router); } -#endif /* !TARGET_IPHONE_SIMULATOR */ - -/* - * Define: ROUTE_MSG_ADDRS_SPACE - * Purpose: - * Since sizeof(sockaddr_dl) > sizeof(sockaddr_in), we need space for - * 3 sockaddr_in's and 2 sockaddr_dl's, but pad it just in case - * someone changes the code and doesn't think to modify this. - */ -#define ROUTE_MSG_ADDRS_SPACE (3 * sizeof(struct sockaddr_in) \ - + 2 * sizeof(struct sockaddr_dl) \ - + 128) -typedef struct { - struct rt_msghdr hdr; - char addrs[ROUTE_MSG_ADDRS_SPACE]; -} route_msg; -#if !TARGET_IPHONE_SIMULATOR -static int -ipv4_route(int sockfd, - int cmd, struct in_addr gateway, struct in_addr netaddr, - struct in_addr netmask, char * ifname, unsigned int ifindex, - struct in_addr ifa, RouteFlags flags) +static void +ipv6_service_update_router(CFStringRef serviceID, CFDictionaryRef new_service) { - boolean_t default_route = (netaddr.s_addr == 0); - int len; - int ret = 0; - route_msg rtmsg; - union { - struct sockaddr_in * in_p; - struct sockaddr_dl * dl_p; - void * ptr; - } rtaddr; - - if (default_route && S_netboot) { - return (0); - } + IFIndex ifindex = 0; + CFStringRef ifname = NULL; + char ntopbuf[INET6_ADDRSTRLEN]; + CFDictionaryRef old_service; + struct in6_addr * old_router; + struct in6_addr * new_router; + int s = -1; - if (ifname == NULL) { - /* this should not happen, but rather than crash, return an error */ - my_log(LOG_NOTICE, - "IPMonitor: ipv4_route ifname is NULL on network address %s", - inet_ntoa(netaddr)); - return (EBADF); - } - if ((flags & kRouteIsNULLFlag) != 0) { - my_log(LOG_DEBUG, "IPMonitor: ignoring route %s on %s", - inet_ntoa(netaddr), ifname); - return (0); - } - memset(&rtmsg, 0, sizeof(rtmsg)); - rtmsg.hdr.rtm_type = cmd; - rtmsg.hdr.rtm_version = RTM_VERSION; - rtmsg.hdr.rtm_seq = ++rtm_seq; - rtmsg.hdr.rtm_addrs - = RTA_DST | RTA_GATEWAY | RTA_NETMASK | RTA_IFP | RTA_IFA; - if (default_route - && (flags & kRouteIsDirectToInterfaceFlag) == 0) { - rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC; + old_service = service_dict_get(serviceID, kSCEntNetIPv6); + old_router = ipv6_service_get_router(old_service, &ifindex, &ifname); + new_router = ipv6_service_get_router(new_service, &ifindex, &ifname); + if (ifname == NULL || ifindex == 0) { + return; } - else { - rtmsg.hdr.rtm_flags = RTF_UP | RTF_CLONING | RTF_STATIC; + s = inet6_dgram_socket(); + if (s < 0) { + my_log(LOG_ERR, + "IPMonitor: ipv6_service_update_router: socket failed, %s", + strerror(errno)); + goto done; } - if ((flags & kRouteIsScopedFlag) != 0) { -#ifdef RTF_IFSCOPE - if (!S_scopedroute) { - return (0); + /* remove the old router if it was defined */ + if (old_router != NULL + && (new_router == NULL + || !IN6_ARE_ADDR_EQUAL(old_router, new_router))) { + if (siocdrdel_in6(s, ifindex, old_router) < 0) { + if (errno != EINVAL + || (S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log((errno == EINVAL) ? LOG_DEBUG : LOG_ERR, + "IPMonitor: siocdrdel_in6(%@, %s) failed, %s", + ifname, + inet_ntop(AF_INET6, old_router, + ntopbuf, sizeof(ntopbuf)), + strerror(errno)); + } } - if (ifindex == 0) { - /* specifically asked for a scoped route, yet no index supplied */ - my_log(LOG_NOTICE, - "IPMonitor: ipv4_route index is 0 on %s-scoped route %s", - ifname, inet_ntoa(netaddr)); - return (EBADF); + else if (S_IPMonitor_debug & kDebugFlag1) { + my_log(LOG_DEBUG, + "IPMonitor: %@ removed default route %s", + ifname, + inet_ntop(AF_INET6, old_router, ntopbuf, sizeof(ntopbuf))); + } + } + /* add the new router if it is defined */ + if (new_router != NULL + && (old_router == NULL + || !IN6_ARE_ADDR_EQUAL(old_router, new_router))) { + if (siocdradd_in6(s, ifindex, new_router, 0) < 0) { + if (errno != EINVAL + || (S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log((errno == EINVAL) ? LOG_DEBUG : LOG_ERR, + "IPMonitor: siocdradd_in6(%@, %s) failed, %s", + ifname, + inet_ntop(AF_INET6, new_router, + ntopbuf, sizeof(ntopbuf)), + strerror(errno)); + } + } + else if (S_IPMonitor_debug & kDebugFlag1) { + my_log(LOG_DEBUG, + "IPMonitor: %@ added default route %s", + ifname, + inet_ntop(AF_INET6, new_router, ntopbuf, sizeof(ntopbuf))); } - rtmsg.hdr.rtm_index = ifindex; - rtmsg.hdr.rtm_flags |= RTF_IFSCOPE; -#else /* RTF_IFSCOPE */ - return (0); -#endif /* RTF_IFSCOPE */ } + close(s); - rtaddr.ptr = rtmsg.addrs; + done: + return; +} +#endif /* !TARGET_IPHONE_SIMULATOR */ - /* dest */ - rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); - rtaddr.in_p->sin_family = AF_INET; - rtaddr.in_p->sin_addr = netaddr; - rtaddr.ptr += sizeof(*rtaddr.in_p); +#define ALLOW_EMPTY_STRING 0x1 - /* gateway */ - if ((rtmsg.hdr.rtm_flags & RTF_GATEWAY) != 0) { - /* gateway is an IP address */ - rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); - rtaddr.in_p->sin_family = AF_INET; - rtaddr.in_p->sin_addr = gateway; - rtaddr.ptr += sizeof(*rtaddr.in_p); +static CF_RETURNS_RETAINED CFTypeRef +sanitize_prop(CFTypeRef val, uint32_t flags) +{ + if (val != NULL) { + if (isA_CFString(val)) { + CFMutableStringRef str; + + str = CFStringCreateMutableCopy(NULL, 0, (CFStringRef)val); + CFStringTrimWhitespace(str); + if (!(flags & ALLOW_EMPTY_STRING) && (CFStringGetLength(str) == 0)) { + CFRelease(str); + str = NULL; + } + val = str; + } else { + CFRetain(val); + } } - else { - /* gateway is the interface itself */ - rtaddr.dl_p->sdl_len = sizeof(*rtaddr.dl_p); - rtaddr.dl_p->sdl_family = AF_LINK; - rtaddr.dl_p->sdl_nlen = strlen(ifname); - bcopy(ifname, rtaddr.dl_p->sdl_data, rtaddr.dl_p->sdl_nlen); - rtaddr.ptr += sizeof(*rtaddr.dl_p); + + return val; +} + +static void +merge_array_prop(CFMutableDictionaryRef dict, + CFStringRef key, + CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, + uint32_t flags, + Boolean append) +{ + CFMutableArrayRef merge_prop; + CFArrayRef setup_prop = NULL; + CFArrayRef state_prop = NULL; + + if (setup_dict != NULL) { + setup_prop = isA_CFArray(CFDictionaryGetValue(setup_dict, key)); + } + if (state_dict != NULL) { + state_prop = isA_CFArray(CFDictionaryGetValue(state_dict, key)); } - /* mask */ - rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); - rtaddr.in_p->sin_family = AF_INET; - rtaddr.in_p->sin_addr = netmask; - rtaddr.ptr += sizeof(*rtaddr.in_p); + if ((setup_prop == NULL) && (state_prop == NULL)) { + return; + } - /* interface name */ - rtaddr.dl_p->sdl_len = sizeof(*rtaddr.dl_p); - rtaddr.dl_p->sdl_family = AF_LINK; - rtaddr.dl_p->sdl_nlen = strlen(ifname); - bcopy(ifname, rtaddr.dl_p->sdl_data, rtaddr.dl_p->sdl_nlen); - rtaddr.ptr += sizeof(*rtaddr.dl_p); + merge_prop = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + if (setup_prop != NULL) { + CFIndex i; + CFIndex n; - /* interface address */ - rtaddr.in_p->sin_len = sizeof(*rtaddr.in_p); - rtaddr.in_p->sin_family = AF_INET; - rtaddr.in_p->sin_addr = ifa; - rtaddr.ptr += sizeof(*rtaddr.in_p); + n = CFArrayGetCount(setup_prop); + for (i = 0; i < n; i++) { + CFTypeRef val; - len = sizeof(rtmsg.hdr) + (rtaddr.ptr - (void *)rtmsg.addrs); - rtmsg.hdr.rtm_msglen = len; - if (write(sockfd, &rtmsg, len) == -1) { - ret = errno; + val = CFArrayGetValueAtIndex(setup_prop, i); + val = sanitize_prop(val, flags); + if (val != NULL) { + CFArrayAppendValue(merge_prop, val); + CFRelease(val); + } + } } - return (ret); + if (state_prop != NULL + && (setup_prop == NULL || S_append_state)) { + CFIndex i; + CFIndex n; + CFRange setup_range = CFRangeMake(0, CFArrayGetCount(merge_prop)); + + n = CFArrayGetCount(state_prop); + for (i = 0; i < n; i++) { + CFTypeRef val; + + val = CFArrayGetValueAtIndex(state_prop, i); + val = sanitize_prop(val, flags); + if (val != NULL) { + if (append || !CFArrayContainsValue(merge_prop, setup_range, val)) { + CFArrayAppendValue(merge_prop, val); + } + CFRelease(val); + } + } + } + if (CFArrayGetCount(merge_prop) > 0) { + CFDictionarySetValue(dict, key, merge_prop); + } + CFRelease(merge_prop); + return; } -#endif /* !TARGET_IPHONE_SIMULATOR */ -#if !TARGET_IPHONE_SIMULATOR -static boolean_t -ipv6_route(int cmd, struct in6_addr gateway, struct in6_addr netaddr, - struct in6_addr netmask, char * ifname, boolean_t is_direct) +static void +pick_prop(CFMutableDictionaryRef dict, + CFStringRef key, + CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, + uint32_t flags) { - boolean_t default_route; - int len; - boolean_t ret = TRUE; - struct { - struct rt_msghdr hdr; - struct sockaddr_in6 dst; - struct sockaddr_in6 gway; - struct sockaddr_in6 mask; - struct sockaddr_dl ifp; - } rtmsg; - int sockfd = -1; - struct in6_addr zeroes = IN6ADDR_ANY_INIT; - - default_route = (bcmp(&zeroes, &netaddr, sizeof(netaddr)) == 0); - - if ((IN6_IS_ADDR_LINKLOCAL(&gateway) || - IN6_IS_ADDR_MC_LINKLOCAL(&gateway)) && - (ifname != NULL)) { - unsigned int index = if_nametoindex(ifname); - - /* add the scope id to the link local address */ - gateway.__u6_addr.__u6_addr16[1] = (uint16_t)htons(index); - } - sockfd = route_open_socket(); - if (sockfd == -1) { - return (FALSE); - } - memset(&rtmsg, 0, sizeof(rtmsg)); - rtmsg.hdr.rtm_type = cmd; - if (default_route) { - if (is_direct) { - /* if router is directly reachable, don't set the gateway flag */ - rtmsg.hdr.rtm_flags = RTF_UP | RTF_STATIC; + CFTypeRef val = NULL; + + if (setup_dict != NULL) { + val = CFDictionaryGetValue(setup_dict, key); + val = sanitize_prop(val, flags); } - else { - rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC; + if (val == NULL && state_dict != NULL) { + val = CFDictionaryGetValue(state_dict, key); + val = sanitize_prop(val, flags); + } + if (val != NULL) { + CFDictionarySetValue(dict, key, val); + CFRelease(val); + } + + return; +} + +/** + ** GetEntityChangesFunc functions + **/ +#define IPV4_ROUTES_N_STATIC 5 +#define IPV4_ROUTES_ALIGN_BUF_SIZE_UINT32 \ + (roundup(IPv4RouteListComputeSize(IPV4_ROUTES_N_STATIC), \ + sizeof(uint32_t)) \ + / sizeof(uint32_t)) + +#define IPV4_ROUTES_BUF_DECL(routes) \ + IPv4RouteListRef routes; \ + uint32_t routes_buf[IPV4_ROUTES_ALIGN_BUF_SIZE_UINT32]; \ + \ + routes = (IPv4RouteListRef)(void *)routes_buf; \ + routes->size = IPV4_ROUTES_N_STATIC; \ + routes->count = 0; \ + routes->flags = 0; + +static CFDataRef +IPv4RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion) +{ + IPv4RouteListRef r; + CFDataRef routes_data; + IPV4_ROUTES_BUF_DECL(routes); + + r = IPv4RouteListCreateWithDictionary(routes, dict, rank_assertion); + if (r != NULL) { + routes_data = CFDataCreate(NULL, + (const void *)r, + IPv4RouteListComputeSize(r->count)); + if (r != routes) { + free(r); } } else { - rtmsg.hdr.rtm_flags = RTF_UP | RTF_CLONING | RTF_STATIC; + routes_data = NULL; } - rtmsg.hdr.rtm_version = RTM_VERSION; - rtmsg.hdr.rtm_seq = ++rtm_seq; - rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; - rtmsg.dst.sin6_len = sizeof(rtmsg.dst); - rtmsg.dst.sin6_family = AF_INET6; - rtmsg.dst.sin6_addr = netaddr; - rtmsg.gway.sin6_len = sizeof(rtmsg.gway); - rtmsg.gway.sin6_family = AF_INET6; - rtmsg.gway.sin6_addr = gateway; - rtmsg.mask.sin6_len = sizeof(rtmsg.mask); - rtmsg.mask.sin6_family = AF_INET6; - rtmsg.mask.sin6_addr = netmask; - - len = sizeof(rtmsg); - if (ifname) { - rtmsg.ifp.sdl_len = sizeof(rtmsg.ifp); - rtmsg.ifp.sdl_family = AF_LINK; - rtmsg.ifp.sdl_nlen = strlen(ifname); - rtmsg.hdr.rtm_addrs |= RTA_IFP; - bcopy(ifname, rtmsg.ifp.sdl_data, rtmsg.ifp.sdl_nlen); + return (routes_data); +} +#define IPV6_ROUTES_N_STATIC 3 +#define IPV6_ROUTES_ALIGN_BUF_SIZE_UINT32 \ + (roundup(IPv6RouteListComputeSize(IPV6_ROUTES_N_STATIC), \ + sizeof(uint32_t)) \ + / sizeof(uint32_t)) + +#define IPV6_ROUTES_BUF_DECL(routes) \ + IPv6RouteListRef routes; \ + uint32_t routes_buf[IPV6_ROUTES_ALIGN_BUF_SIZE_UINT32]; \ + \ + routes = (IPv6RouteListRef)(void *)routes_buf; \ + routes->size = IPV6_ROUTES_N_STATIC; \ + routes->count = 0; \ + routes->flags = 0; + +static CFDataRef +IPv6RouteListDataCreate(CFDictionaryRef dict, CFNumberRef rank_assertion) +{ + IPv6RouteListRef r; + CFDataRef routes_data; + IPV6_ROUTES_BUF_DECL(routes); + + r = IPv6RouteListCreateWithDictionary(routes, dict, rank_assertion); + if (r != NULL) { + routes_data = CFDataCreate(NULL, + (const void *)r, + IPv6RouteListComputeSize(r->count)); + if (r != routes) { + free(r); + } } else { - /* no ifp information */ - len -= sizeof(rtmsg.ifp); + routes_data = NULL; } - rtmsg.hdr.rtm_msglen = len; - if (write(sockfd, &rtmsg, len) == -1) { - if ((cmd == RTM_ADD) && (errno == EEXIST)) { - /* no sense complaining about a route that already exists */ + return (routes_data); +} + +static CFDictionaryRef +IPDictCreate(int af, CFDictionaryRef state_dict, CFDictionaryRef setup_dict, + CFNumberRef rank_assertion) +{ + CFDictionaryRef aggregated_dict = NULL; + CFDictionaryRef dict; + CFMutableDictionaryRef modified_dict = NULL; + CFDataRef routes_data; + + dict = state_dict; + if (dict != NULL && setup_dict != NULL) { + /* look for keys in Setup: that override/merge with State: */ + CFArrayRef additional_routes; + CFStringRef router; + in_addr router_ip; + CFStringRef router_prop; + CFStringRef route_list_prop; + + /* Router */ + switch (af) { + case AF_INET: + router_prop = kSCPropNetIPv4Router; + route_list_prop = kSCPropNetIPv4AdditionalRoutes; + break; + default: + case AF_INET6: + router_prop = kSCPropNetIPv6Router; + route_list_prop = kSCPropNetIPv6AdditionalRoutes; + break; } - else if ((cmd == RTM_DELETE) && (errno == ESRCH)) { - /* no sense complaining about a route that isn't there */ + router = CFDictionaryGetValue(setup_dict, router_prop); + if (router != NULL + && !cfstring_to_ipvx(af, router, &router_ip, sizeof(router_ip))) { + router = NULL; } - else { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor ipv6_route: write routing" - " socket failed, %s", strerror(errno)); + + /* AdditionalRoutes */ + additional_routes + = CFDictionaryGetValue(setup_dict, route_list_prop); + additional_routes = isA_CFArray(additional_routes); + + if (router != NULL || additional_routes != NULL) { + modified_dict = CFDictionaryCreateMutableCopy(NULL, 0, dict); + if (router != NULL) { + CFDictionarySetValue(modified_dict, + router_prop, + router); + } + if (additional_routes != NULL) { + CFArrayRef combined_routes = NULL; + CFArrayRef state_routes; + + state_routes + = CFDictionaryGetValue(state_dict, + route_list_prop); + if (isA_CFArray(state_routes) != NULL) { + combined_routes + = my_CFArrayCreateCombinedArray(additional_routes, + state_routes); + additional_routes = combined_routes; + } + CFDictionarySetValue(modified_dict, + route_list_prop, + additional_routes); + if (combined_routes != NULL) { + CFRelease(combined_routes); + } } - ret = FALSE; + dict = modified_dict; } } - - close(sockfd); - return (ret); + switch (af) { + case AF_INET: + routes_data = IPv4RouteListDataCreate(dict, rank_assertion); + break; + default: + case AF_INET6: + routes_data = IPv6RouteListDataCreate(dict, rank_assertion); + break; + } + if (routes_data != NULL) { + aggregated_dict = ipdict_create(dict, routes_data); + CFRelease(routes_data); + } + if (modified_dict != NULL) { + CFRelease(modified_dict); + } + return (aggregated_dict); } static boolean_t -ipv6_default_route_delete(void) +get_ipv4_changes(CFStringRef serviceID, CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, CFDictionaryRef info) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, "IPMonitor: IPv6 route delete default"); + CFDictionaryRef dict = NULL; + boolean_t changed = FALSE; + CFNumberRef rank_assertion = NULL; + CFDictionaryRef service_options; + + if (state_dict == NULL) { + goto done; + } + service_options = service_dict_get(serviceID, kSCEntNetService); + if (service_options != NULL) { + rank_assertion + = CFDictionaryGetValue(service_options, + kServiceOptionRankAssertion); + } + dict = IPDictCreate(AF_INET, state_dict, setup_dict, rank_assertion); + + done: + changed = service_dict_set(serviceID, kSCEntNetIPv4, dict); + if (dict == NULL) { + /* clean up the rank too */ + CFDictionaryRemoveValue(S_ipv4_service_rank_dict, serviceID); } - return (ipv6_route(RTM_DELETE, S_ip6_zeros, S_ip6_zeros, S_ip6_zeros, - NULL, FALSE)); + my_CFRelease(&dict); + return (changed); } static boolean_t -ipv6_default_route_add(struct in6_addr router, char * ifname, - boolean_t is_direct) +get_ipv6_changes(CFStringRef serviceID, CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, CFDictionaryRef info) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - char ntopbuf[INET6_ADDRSTRLEN]; + CFDictionaryRef dict = NULL; + boolean_t changed = FALSE; + CFNumberRef rank_assertion = NULL; + CFDictionaryRef service_options; - my_log(LOG_DEBUG, - "IPMonitor: IPv6 route add default" - " %s interface %s direct %d", - inet_ntop(AF_INET6, &router, ntopbuf, sizeof(ntopbuf)), - ifname, is_direct); + if (state_dict == NULL) { + goto done; + } + service_options = service_dict_get(serviceID, kSCEntNetService); + if (service_options != NULL) { + rank_assertion + = CFDictionaryGetValue(service_options, + kServiceOptionRankAssertion); + } + dict = IPDictCreate(AF_INET6, state_dict, setup_dict, rank_assertion); + + done: +#if !TARGET_IPHONE_SIMULATOR + ipv6_service_update_router(serviceID, dict); +#endif /* !TARGET_IPHONE_SIMULATOR */ + changed = service_dict_set(serviceID, kSCEntNetIPv6, dict); + if (dict == NULL) { + /* clean up the rank too */ + CFDictionaryRemoveValue(S_ipv6_service_rank_dict, serviceID); } - return (ipv6_route(RTM_ADD, router, S_ip6_zeros, S_ip6_zeros, - ifname, is_direct)); + my_CFRelease(&dict); + return (changed); } -#endif /* !TARGET_IPHONE_SIMULATOR */ -#if !TARGET_IPHONE_SIMULATOR -static int -multicast_route_delete(int sockfd) +#ifdef TEST_DNS +__private_extern__ CFDictionaryRef +ipv4_dict_create(CFDictionaryRef state_dict) { - struct in_addr gateway = { htonl(INADDR_LOOPBACK) }; - struct in_addr netaddr = { htonl(INADDR_UNSPEC_GROUP) }; - struct in_addr netmask = { htonl(IN_CLASSD_NET) }; - - return (ipv4_route(sockfd, RTM_DELETE, gateway, netaddr, netmask, "lo0", 0, - gateway, 0)); + return (IPDictCreate(AF_INET, state_dict, NULL, NULL)); } -static int -multicast_route_add(int sockfd) +__private_extern__ CFDictionaryRef +ipv6_dict_create(CFDictionaryRef state_dict) { - struct in_addr gateway = { htonl(INADDR_LOOPBACK) }; - struct in_addr netaddr = { htonl(INADDR_UNSPEC_GROUP) }; - struct in_addr netmask = { htonl(IN_CLASSD_NET) }; - - return (ipv4_route(sockfd, RTM_ADD, gateway, netaddr, netmask, "lo0", 0, - gateway, 0)); + return (IPDictCreate(AF_INET6, state_dict, NULL, NULL)); } -#endif /* !TARGET_IPHONE_SIMULATOR */ -#if !TARGET_IPHONE_SIMULATOR -#ifdef RTF_IFSCOPE +#endif /* TEST_DNS */ + static void -set_ipv6_default_interface(char * ifname) +accumulate_dns_servers(CFArrayRef in_servers, ProtocolFlags active_protos, + CFMutableArrayRef out_servers, CFStringRef interface) { - struct in6_ndifreq ndifreq; - int sock; + CFIndex count; + CFIndex i; - bzero((char *)&ndifreq, sizeof(ndifreq)); - if (ifname != NULL) { - strlcpy(ndifreq.ifname, ifname, sizeof(ndifreq.ifname)); - ndifreq.ifindex = if_nametoindex(ifname); - } else { - strlcpy(ndifreq.ifname, "lo0", sizeof(ndifreq.ifname)); - ndifreq.ifindex = 0; - } + count = CFArrayGetCount(in_servers); + for (i = 0; i < count; i++) { + CFStringRef addr; + struct in6_addr ipv6_addr; + struct in_addr ip_addr; - sock = inet6_dgram_socket(); - if (sock == -1) { - my_log(LOG_ERR, - "IPMonitor: set_ipv6_default_interface: socket failed, %s", - strerror(errno)); - return; - } - if (ioctl(sock, SIOCSDEFIFACE_IN6, (caddr_t)&ndifreq) == -1) { - my_log(LOG_ERR, - "IPMonitor: set_ipv6_default_interface: ioctl(SIOCSDEFIFACE_IN6) failed, %s", - strerror(errno)); - } - close(sock); - return; -} -#endif /* RTF_IFSCOPE */ - -static void -set_ipv6_router(struct in6_addr * router, char * ifname, boolean_t is_direct) -{ - /* assign the new default route, ensure local multicast route available */ - (void)ipv6_default_route_delete(); - if (router != NULL) { - (void)ipv6_default_route_add(*router, ifname, is_direct); - } - return; -} -#endif /* !TARGET_IPHONE_SIMULATOR */ - -#if !TARGET_OS_IPHONE -static __inline__ void -empty_dns() -{ - (void)unlink(VAR_RUN_RESOLV_CONF); -} - -static void -set_dns(CFArrayRef val_search_domains, - CFStringRef val_domain_name, - CFArrayRef val_servers, - CFArrayRef val_sortlist) -{ - FILE * f = fopen(VAR_RUN_RESOLV_CONF "-", "w"); - - /* publish new resolv.conf */ - if (f) { - CFIndex i; - CFIndex n; - - SCPrint(TRUE, f, CFSTR("#\n")); - SCPrint(TRUE, f, CFSTR("# Mac OS X Notice\n")); - SCPrint(TRUE, f, CFSTR("#\n")); - SCPrint(TRUE, f, CFSTR("# This file is not used by the host name and address resolution\n")); - SCPrint(TRUE, f, CFSTR("# or the DNS query routing mechanisms used by most processes on\n")); - SCPrint(TRUE, f, CFSTR("# this Mac OS X system.\n")); - SCPrint(TRUE, f, CFSTR("#\n")); - SCPrint(TRUE, f, CFSTR("# This file is automatically generated.\n")); - SCPrint(TRUE, f, CFSTR("#\n")); - - if (isA_CFArray(val_search_domains)) { - SCPrint(TRUE, f, CFSTR("search")); - n = CFArrayGetCount(val_search_domains); - for (i = 0; i < n; i++) { - CFStringRef domain; + addr = CFArrayGetValueAtIndex(in_servers, i); + assert(addr != NULL); - domain = CFArrayGetValueAtIndex(val_search_domains, i); - if (isA_CFString(domain)) { - SCPrint(TRUE, f, CFSTR(" %@"), domain); + if (cfstring_to_ip(addr, &ip_addr)) { + /* IPv4 address */ + if ((active_protos & kProtocolFlagsIPv4) == 0 + && ntohl(ip_addr.s_addr) != INADDR_LOOPBACK) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: no IPv4 connectivity, " + "ignoring DNS server address " IP_FORMAT, + IP_LIST(&ip_addr)); } + continue; } - SCPrint(TRUE, f, CFSTR("\n")); - } - else if (isA_CFString(val_domain_name)) { - SCPrint(TRUE, f, CFSTR("domain %@\n"), val_domain_name); - } - if (isA_CFArray(val_servers)) { - n = CFArrayGetCount(val_servers); - for (i = 0; i < n; i++) { - CFStringRef nameserver; + CFRetain(addr); + } + else if (cfstring_to_ip6(addr, &ipv6_addr)) { + /* IPv6 address */ + if ((active_protos & kProtocolFlagsIPv6) == 0 + && !IN6_IS_ADDR_LOOPBACK(&ipv6_addr)) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + char ntopbuf[INET6_ADDRSTRLEN]; - nameserver = CFArrayGetValueAtIndex(val_servers, i); - if (isA_CFString(nameserver)) { - SCPrint(TRUE, f, CFSTR("nameserver %@\n"), nameserver); + my_log(LOG_DEBUG, + "IPMonitor: no IPv6 connectivity, " + "ignoring DNS server address %s", + inet_ntop(AF_INET6, &ipv6_addr, + ntopbuf, sizeof(ntopbuf))); } + continue; } - } - - if (isA_CFArray(val_sortlist)) { - SCPrint(TRUE, f, CFSTR("sortlist")); - n = CFArrayGetCount(val_sortlist); - for (i = 0; i < n; i++) { - CFStringRef address; - address = CFArrayGetValueAtIndex(val_sortlist, i); - if (isA_CFString(address)) { - SCPrint(TRUE, f, CFSTR(" %@"), address); - } + if ((IN6_IS_ADDR_LINKLOCAL(&ipv6_addr) || + IN6_IS_ADDR_MC_LINKLOCAL(&ipv6_addr)) + && (interface != NULL) + && (CFStringFind(addr, CFSTR("%"), 0).location == kCFNotFound)) { + // append interface name to IPv6 link local address + addr = CFStringCreateWithFormat(NULL, NULL, + CFSTR("%@%%%@"), + addr, + interface); + } else { + CFRetain(addr); } - SCPrint(TRUE, f, CFSTR("\n")); + } + else { + /* bad IP address */ + my_log(LOG_NOTICE, + "IPMonitor: ignoring bad DNS server address '%@'", + addr); + continue; } - fclose(f); - rename(VAR_RUN_RESOLV_CONF "-", VAR_RUN_RESOLV_CONF); + /* DNS server is valid and one we want */ + CFArrayAppendValue(out_servers, addr); + CFRelease(addr); } return; } -#endif /* !TARGET_OS_IPHONE */ -#if !TARGET_IPHONE_SIMULATOR -static boolean_t -router_is_our_ipv6_address(CFStringRef router, CFArrayRef addr_list) +static void +merge_dns_servers(CFMutableDictionaryRef new_dict, + CFArrayRef state_servers, + CFArrayRef setup_servers, + Boolean have_setup, + ProtocolFlags active_protos, + CFStringRef interface) { - CFIndex i; - CFIndex n = CFArrayGetCount(addr_list); - struct in6_addr r; - - (void)cfstring_to_ip6(router, &r); - for (i = 0; i < n; i++) { - struct in6_addr ip; + CFMutableArrayRef dns_servers; + Boolean have_dns_setup = FALSE; - if (cfstring_to_ip6(CFArrayGetValueAtIndex(addr_list, i), &ip) - && bcmp(&r, &ip, sizeof(r)) == 0) { - return (TRUE); + if (state_servers == NULL && setup_servers == NULL) { + /* no DNS servers */ + return; + } + dns_servers = CFArrayCreateMutable(NULL, 0, + &kCFTypeArrayCallBacks); + if (setup_servers != NULL) { + accumulate_dns_servers(setup_servers, active_protos, + dns_servers, interface); + if (CFArrayGetCount(dns_servers) > 0) { + have_dns_setup = TRUE; } } - return (FALSE); -} -#endif /* !TARGET_IPHONE_SIMULATOR */ - -static IPv4RouteListRef -service_dict_get_ipv4_routelist(CFDictionaryRef service_dict) -{ - CFDictionaryRef dict; + if ((CFArrayGetCount(dns_servers) == 0 || S_append_state) + && state_servers != NULL) { + accumulate_dns_servers(state_servers, active_protos, + dns_servers, NULL); + } - dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv4); + /* + * Here, we determine whether or not we want all queries for this DNS + * configuration to be bound to the associated network interface. + * + * For dynamically derived network configurations (i.e. from State:) + * this would be the preferred option using the argument "Hey, the + * server told us to use these servers on this network so let's not + * argue". + * + * But, when a DNS configuration has been provided by the user/admin + * via the Network pref pane (i.e. from Setup:) we opt to not force + * binding of the outbound queries. The simplest example why we take + * this stance is with a multi-homing configuration. Consider a system + * with one network service associated with "en0" and a second service + * associated with "en1". The "en0" service has been set higher in + * the network service order so it would be primary but the user/admin + * wants the DNS queries to go to a server only accessible via "en1". + * Without this exception we would take the DNS server addresses from + * the Network pref pane (for "en0") and have the queries bound to + * "en0" where they'd never reach their intended destination (via + * "en1"). So, our exception to the rule is that we will not bind + * user/admin configurations to any specific network interface. + * + * We also add an exception to the "follow the dynamically derived + * network configuration" path for on-the-fly (no Setup: content) + * network services. + */ + if (CFArrayGetCount(dns_servers) != 0) { + CFDictionarySetValue(new_dict, + kSCPropNetDNSServerAddresses, dns_servers); + if (have_setup && !have_dns_setup) { + CFDictionarySetValue(new_dict, DNS_CONFIGURATION_SCOPED_QUERY_KEY, kCFBooleanTrue); + } + } - return (ipv4_dict_get_routelist(dict)); + my_CFRelease(&dns_servers); + return; } -static CFStringRef -service_dict_get_ipv4_ifname(CFDictionaryRef service_dict) -{ - CFDictionaryRef dict; - - dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv4); - return (ipv4_dict_get_ifname(dict)); -} static boolean_t -service_get_ip_is_coupled(CFStringRef serviceID) +get_dns_changes(CFStringRef serviceID, CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, CFDictionaryRef info) { - CFDictionaryRef dict; - boolean_t ip_is_coupled = FALSE; + ProtocolFlags active_protos = kProtocolFlagsNone; + boolean_t changed = FALSE; + CFStringRef domain; + Boolean have_setup = FALSE; + CFStringRef interface = NULL; + CFDictionaryRef ipv4; + CFDictionaryRef ipv6; + int i; + const struct { + CFStringRef key; + uint32_t flags; + Boolean append; + } merge_list[] = { + { kSCPropNetDNSSearchDomains, 0, FALSE }, + { kSCPropNetDNSSortList, 0, FALSE }, + { kSCPropNetDNSSupplementalMatchDomains, ALLOW_EMPTY_STRING, TRUE }, + { kSCPropNetDNSSupplementalMatchOrders, 0, TRUE }, + }; + CFMutableDictionaryRef new_dict = NULL; + const CFStringRef pick_list[] = { + kSCPropNetDNSDomainName, + kSCPropNetDNSOptions, + kSCPropNetDNSSearchOrder, + kSCPropNetDNSServerPort, + kSCPropNetDNSServerTimeout, + kSCPropNetDNSServiceIdentifier, + kSCPropNetDNSSupplementalMatchDomainsNoSearch, + }; - dict = service_dict_get(serviceID, kSCEntNetService); - if (dict != NULL) { - if (CFDictionaryContainsKey(dict, kIPIsCoupled)) { - ip_is_coupled = TRUE; + if ((state_dict == NULL) && (setup_dict == NULL)) { + /* there is no DNS content */ + goto done; + } + + ipv4 = service_dict_get(serviceID, kSCEntNetIPv4); + if (ipv4 != NULL) { + if (get_service_setup_entity(info, serviceID, kSCEntNetIPv4) != NULL) { + have_setup = TRUE; } + active_protos |= kProtocolFlagsIPv4; + interface = ipdict_get_ifname(ipv4); } - return (ip_is_coupled); -} -#if !TARGET_IPHONE_SIMULATOR + ipv6 = service_dict_get(serviceID, kSCEntNetIPv6); + if (ipv6 != NULL) { + if (!have_setup + && (get_service_setup_entity(info, serviceID, kSCEntNetIPv6) + != NULL)) { + have_setup = TRUE; + } + active_protos |= kProtocolFlagsIPv6; + if (interface == NULL) { + interface = ipdict_get_ifname(ipv6); + } + } -typedef struct apply_ipv4_route_context { - IPv4RouteListRef old; - IPv4RouteListRef new; - int sockfd; -} apply_ipv4_route_context_t; -/* add/remove a router/32 subnet */ -static int -ipv4_route_gateway(int sockfd, int cmd, char * ifn_p, - IPv4RouteRef def_route) -{ - struct in_addr mask; + if (active_protos == kProtocolFlagsNone) { + /* there is no IPv4 nor IPv6 */ + if (state_dict == NULL) { + /* ... and no DNS content that we care about */ + goto done; + } + setup_dict = NULL; + } - mask.s_addr = htonl(INADDR_BROADCAST); - return (ipv4_route(sockfd, cmd, def_route->ifa, - def_route->gateway, mask, ifn_p, def_route->ifindex, - def_route->ifa, def_route->flags)); -} + /* merge DNS configuration */ + new_dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); -/* - * Function: apply_ipv4_route - * Purpose: - * Callback function that adds/removes the specified route. - */ -static void -apply_ipv4_route(IPv4RouteListApplyCommand cmd, IPv4RouteRef route, void * arg) -{ - apply_ipv4_route_context_t *context = (apply_ipv4_route_context_t *)arg; - char * ifn_p; - int retval; + if (active_protos == kProtocolFlagsNone) { + merge_dns_servers(new_dict, + my_CFDictionaryGetArray(state_dict, + kSCPropNetDNSServerAddresses), + NULL, + FALSE, + kProtocolFlagsIPv4 | kProtocolFlagsIPv6, + NULL); + } + else { + merge_dns_servers(new_dict, + my_CFDictionaryGetArray(state_dict, + kSCPropNetDNSServerAddresses), + my_CFDictionaryGetArray(setup_dict, + kSCPropNetDNSServerAddresses), + have_setup, + active_protos, + interface); + } - ifn_p = route->ifname; - switch (cmd) { - case kIPv4RouteListAddRouteCommand: - if ((route->flags & kRouteIsNotSubnetLocalFlag) != 0) { - retval = ipv4_route_gateway(context->sockfd, RTM_ADD, - ifn_p, route); - if (retval == EEXIST) { - /* delete and add again */ - (void)ipv4_route_gateway(context->sockfd, RTM_DELETE, - ifn_p, route); - retval = ipv4_route_gateway(context->sockfd, RTM_ADD, - ifn_p, route); - } - if (retval != 0) { - my_log(LOG_NOTICE, - "IPMonitor apply_ipv4_route failed to add" - " %s/32 route, %s", - inet_ntoa(route->gateway), strerror(retval)); - } - else if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, "Added IPv4 Route %s/32", - inet_ntoa(route->gateway)); - } - } - retval = ipv4_route(context->sockfd, - RTM_ADD, route->gateway, - route->dest, route->mask, ifn_p, route->ifindex, - route->ifa, route->flags); - if (retval == EEXIST) { - /* delete and add again */ - (void)ipv4_route(context->sockfd, - RTM_DELETE, route->gateway, - route->dest, route->mask, ifn_p, route->ifindex, - route->ifa, route->flags); - retval = ipv4_route(context->sockfd, - RTM_ADD, route->gateway, - route->dest, route->mask, - ifn_p, route->ifindex, - route->ifa, route->flags); - } - if (retval != 0) { - my_log(LOG_NOTICE, - "IPMonitor apply_ipv4_route failed to add" - " route, %s:", strerror(retval)); - IPv4RouteLog(LOG_NOTICE, route); - } - else if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "Added IPv4 route new[%d] = ", - route - context->new->list); - IPv4RouteLog(LOG_DEBUG, route); - } - break; - case kIPv4RouteListRemoveRouteCommand: - retval = ipv4_route(context->sockfd, - RTM_DELETE, route->gateway, - route->dest, route->mask, ifn_p, route->ifindex, - route->ifa, route->flags); - if (retval != 0) { - if (retval != ESRCH) { - my_log(LOG_NOTICE, - "IPMonitor apply_ipv4_route failed to remove" - " route, %s: ", strerror(retval)); - IPv4RouteLog(LOG_NOTICE, route); + for (i = 0; i < countof(merge_list); i++) { + merge_array_prop(new_dict, + merge_list[i].key, + state_dict, + setup_dict, + merge_list[i].flags, + merge_list[i].append); + } + + for (i = 0; i < countof(pick_list); i++) { + pick_prop(new_dict, + pick_list[i], + state_dict, + setup_dict, + 0); + } + + if (active_protos == kProtocolFlagsNone) { + /* there is no IPv4 nor IPv6, only supplemental or service-specific DNS */ + if (CFDictionaryContainsKey(new_dict, + kSCPropNetDNSSupplementalMatchDomains)) { + /* only keep State: supplemental */ + CFDictionaryRemoveValue(new_dict, kSCPropNetDNSDomainName); + CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSearchDomains); + CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSearchOrder); + CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSortList); + + if ((interface == NULL) && (setup_dict == NULL) && (state_dict != NULL)) { + /* + * for supplemental-only configurations, add any scoped (or + * wild-card "*") interface + */ + interface = CFDictionaryGetValue(state_dict, kSCPropInterfaceName); } + } else if (CFDictionaryContainsKey(new_dict, kSCPropNetDNSServiceIdentifier) && + (interface == NULL) && + (state_dict != NULL)) { + interface = CFDictionaryGetValue(state_dict, kSCPropInterfaceName); + } else { + goto done; } - else if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "Removed IPv4 route old[%d] = ", - route - context->old->list); - IPv4RouteLog(LOG_DEBUG, route); - } - if ((route->flags & kRouteIsNotSubnetLocalFlag) != 0) { - retval = ipv4_route_gateway(context->sockfd, RTM_DELETE, - ifn_p, route); - if (retval != 0) { - my_log(LOG_NOTICE, - "IPMonitor apply_ipv4_route failed to remove" - " %s/32 route, %s: ", - inet_ntoa(route->gateway), strerror(retval)); - } - else if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, "Removed IPv4 Route %s/32", - inet_ntoa(route->gateway)); + } + + if (CFDictionaryGetCount(new_dict) == 0) { + my_CFRelease(&new_dict); + goto done; + } + + if (interface != NULL) { + CFDictionarySetValue(new_dict, kSCPropInterfaceName, interface); + } + + if (S_append_state) { + /* + * ensure any specified domain name (e.g. the domain returned by + * a DHCP server) is in the search list. + */ + domain = CFDictionaryGetValue(new_dict, kSCPropNetDNSDomainName); + if (isA_CFString(domain)) { + CFArrayRef search; + + search = CFDictionaryGetValue(new_dict, kSCPropNetDNSSearchDomains); + if (isA_CFArray(search) && + !CFArrayContainsValue(search, CFRangeMake(0, CFArrayGetCount(search)), domain)) { + CFMutableArrayRef new_search; + + new_search = CFArrayCreateMutableCopy(NULL, 0, search); + CFArrayAppendValue(new_search, domain); + CFDictionarySetValue(new_dict, kSCPropNetDNSSearchDomains, new_search); + my_CFRelease(&new_search); } } - break; - default: - break; } - return; + + done: + changed = service_dict_set(serviceID, kSCEntNetDNS, new_dict); + my_CFRelease(&new_dict); + return (changed); } -#endif /* !TARGET_IPHONE_SIMULATOR */ -/* - * Function: update_ipv4 - * - * Purpose: - * Update the IPv4 configuration based on the latest information. - * Publish the State:/Network/Global/IPv4 information, and update the - * IPv4 routing table. IPv4RouteListApply() invokes our callback, - * apply_ipv4_route(), to install/remove the routes. - */ static void -update_ipv4(CFStringRef primary, - IPv4RouteListRef new_routelist, - keyChangeListRef keys) +merge_dict(const void *key, const void *value, void *context) { -#if !TARGET_IPHONE_SIMULATOR - apply_ipv4_route_context_t context; -#endif /* !TARGET_IPHONE_SIMULATOR */ + CFMutableDictionaryRef dict = (CFMutableDictionaryRef)context; - if (keys != NULL) { - if (new_routelist != NULL && primary != NULL) { - char * ifn_p = NULL; - IPv4RouteRef r; - CFMutableDictionaryRef dict = NULL; + CFDictionarySetValue(dict, key, value); + return; +} - dict = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - /* the first entry is the default route */ - r = new_routelist->list; - if (r->gateway.s_addr != 0) { - CFStringRef router; +#define PROXY_AUTO_DISCOVERY_URL 252 - router = CFStringCreateWithCString(NULL, - inet_ntoa(r->gateway), - kCFStringEncodingASCII); - if (router != NULL) { - CFDictionarySetValue(dict, kSCPropNetIPv4Router, router); - CFRelease(router); - } - } - if (r->ifname[0] != '\0') { - ifn_p = r->ifname; - } - if (ifn_p != NULL) { - CFStringRef ifname_cf; +static CF_RETURNS_RETAINED CFStringRef +wpadURL_dhcp(CFDictionaryRef dhcp_options) +{ + CFStringRef urlString = NULL; - ifname_cf = CFStringCreateWithCString(NULL, - ifn_p, - kCFStringEncodingASCII); - if (ifname_cf != NULL) { - CFDictionarySetValue(dict, - kSCDynamicStorePropNetPrimaryInterface, - ifname_cf); - CFRelease(ifname_cf); - } - } - CFDictionarySetValue(dict, kSCDynamicStorePropNetPrimaryService, - primary); - keyChangeListSetValue(keys, S_state_global_ipv4, dict); - CFRelease(dict); - } - else { - keyChangeListRemoveValue(keys, S_state_global_ipv4); - } - } + if (dhcp_options != NULL) { + CFDataRef data; -#if !TARGET_IPHONE_SIMULATOR - bzero(&context, sizeof(context)); - context.sockfd = route_open_socket(); - if (context.sockfd != -1) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - if (S_ipv4_routelist == NULL) { - my_log(LOG_DEBUG, "Old Routes = "); - } - else { - my_log(LOG_DEBUG, "Old Routes = "); - IPv4RouteListLog(LOG_DEBUG, S_ipv4_routelist); + data = DHCPInfoGetOptionData(dhcp_options, PROXY_AUTO_DISCOVERY_URL); + if (data != NULL) { + CFURLRef url; + const UInt8 *urlBytes; + CFIndex urlLen; + + urlBytes = CFDataGetBytePtr(data); + urlLen = CFDataGetLength(data); + while ((urlLen > 0) && (urlBytes[urlLen - 1] == 0)) { + // remove trailing NUL + urlLen--; } - if (new_routelist == NULL) { - my_log(LOG_DEBUG, "New Routes = "); + + if (urlLen <= 0) { + return NULL; } - else { - my_log(LOG_DEBUG, "New Routes = "); - IPv4RouteListLog(LOG_DEBUG, new_routelist); + + url = CFURLCreateWithBytes(NULL, urlBytes, urlLen, kCFStringEncodingUTF8, NULL); + if (url != NULL) { + urlString = CFURLGetString(url); + if (urlString != NULL) { + CFRetain(urlString); + } + CFRelease(url); } } - context.old = S_ipv4_routelist; - context.new = new_routelist; - IPv4RouteListApply(S_ipv4_routelist, new_routelist, - &apply_ipv4_route, (void *)&context); - if (new_routelist != NULL) { - (void)multicast_route_delete(context.sockfd); - } - else { - (void)multicast_route_add(context.sockfd); - } - close(context.sockfd); } - if (S_ipv4_routelist != NULL) { - free(S_ipv4_routelist); - } - S_ipv4_routelist = new_routelist; -#endif /* !TARGET_IPHONE_SIMULATOR */ - return; + return urlString; } -static void -update_ipv6(CFStringRef primary, - keyChangeListRef keys) +static CF_RETURNS_RETAINED CFStringRef +wpadURL_dns(void) { - CFDictionaryRef ipv6_dict = NULL; + CFURLRef url; + CFStringRef urlString = NULL; - if (primary != NULL) { - ipv6_dict = service_dict_get(primary, kSCEntNetIPv6); - } - if (ipv6_dict != NULL) { + url = CFURLCreateWithString(NULL, CFSTR("http://wpad/wpad.dat"), NULL); + if (url != NULL) { + urlString = CFURLGetString(url); + if (urlString != NULL) { + CFRetain(urlString); + } + CFRelease(url); + } + + return urlString; +} + +static boolean_t +get_proxies_changes(CFStringRef serviceID, CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, CFDictionaryRef info) +{ + ProtocolFlags active_protos = kProtocolFlagsNone; + boolean_t changed = FALSE; + CFStringRef interface = NULL; + CFDictionaryRef ipv4; + CFDictionaryRef ipv6; + CFMutableDictionaryRef new_dict = NULL; + const struct { + CFStringRef key; + uint32_t flags; + Boolean append; + } merge_list[] = { + { kSCPropNetProxiesSupplementalMatchDomains, ALLOW_EMPTY_STRING, TRUE }, + { kSCPropNetProxiesSupplementalMatchOrders, 0, TRUE }, + }; + const struct { + CFStringRef key1; /* an "enable" key */ + CFStringRef key2; + CFStringRef key3; + } pick_list[] = { + { kSCPropNetProxiesFTPEnable, kSCPropNetProxiesFTPProxy, kSCPropNetProxiesFTPPort }, + { kSCPropNetProxiesGopherEnable, kSCPropNetProxiesGopherProxy, kSCPropNetProxiesGopherPort }, + { kSCPropNetProxiesHTTPEnable, kSCPropNetProxiesHTTPProxy, kSCPropNetProxiesHTTPPort }, + { kSCPropNetProxiesHTTPSEnable, kSCPropNetProxiesHTTPSProxy, kSCPropNetProxiesHTTPSPort }, + { kSCPropNetProxiesRTSPEnable, kSCPropNetProxiesRTSPProxy, kSCPropNetProxiesRTSPPort }, + { kSCPropNetProxiesSOCKSEnable, kSCPropNetProxiesSOCKSProxy, kSCPropNetProxiesSOCKSPort }, + { kSCPropNetProxiesProxyAutoConfigEnable, + kSCPropNetProxiesProxyAutoConfigURLString, + kSCPropNetProxiesProxyAutoConfigJavaScript, }, + { kSCPropNetProxiesProxyAutoDiscoveryEnable, + NULL, + NULL, } + }; + + if ((state_dict == NULL) && (setup_dict == NULL)) { + /* there is no proxy content */ + goto done; + } + ipv4 = service_dict_get(serviceID, kSCEntNetIPv4); + if (ipdict_get_routelist(ipv4) != NULL) { + active_protos |= kProtocolFlagsIPv4; + interface = ipdict_get_ifname(ipv4); + } + ipv6 = service_dict_get(serviceID, kSCEntNetIPv6); + if (ipdict_get_routelist(ipv6) != NULL) { + active_protos |= kProtocolFlagsIPv6; + if (interface == NULL) { + interface = ipdict_get_ifname(ipv6); + } + } + if (active_protos == kProtocolFlagsNone) { + /* there is no IPv4 nor IPv6 */ + if (state_dict == NULL) { + /* ... and no proxy content that we care about */ + goto done; + } + setup_dict = NULL; + } + + if ((setup_dict != NULL) && (state_dict != NULL)) { + CFIndex i; + CFMutableDictionaryRef setup_copy; + + /* + * Merge the per-service "Setup:" and "State:" proxy information with + * the "Setup:" information always taking precedence. Additionally, + * ensure that if any group of "Setup:" values (e.g. Enabled, Proxy, + * Port) is defined than all of the values for that group will be + * used. That is, we don't allow mixing some of the values from + * the "Setup:" keys and others from the "State:" keys. + */ + new_dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); + for (i = 0; i < countof(merge_list); i++) { + merge_array_prop(new_dict, + merge_list[i].key, + state_dict, + setup_dict, + merge_list[i].flags, + merge_list[i].append); + } + + setup_copy = CFDictionaryCreateMutableCopy(NULL, 0, setup_dict); + for (i = 0; i < countof(pick_list); i++) { + if (CFDictionaryContainsKey(setup_copy, pick_list[i].key1)) { + /* + * if a "Setup:" enabled key has been provided than we want to + * ignore all of the "State:" keys + */ + CFDictionaryRemoveValue(new_dict, pick_list[i].key1); + if (pick_list[i].key2 != NULL) { + CFDictionaryRemoveValue(new_dict, pick_list[i].key2); + } + if (pick_list[i].key3 != NULL) { + CFDictionaryRemoveValue(new_dict, pick_list[i].key3); + } + } else if (CFDictionaryContainsKey(state_dict, pick_list[i].key1) || + ((pick_list[i].key2 != NULL) && CFDictionaryContainsKey(state_dict, pick_list[i].key2)) || + ((pick_list[i].key3 != NULL) && CFDictionaryContainsKey(state_dict, pick_list[i].key3))) { + /* + * if a "Setup:" enabled key has not been provided and we have + * some" "State:" keys than we remove all of of "Setup:" keys + */ + CFDictionaryRemoveValue(setup_copy, pick_list[i].key1); + if (pick_list[i].key2 != NULL) { + CFDictionaryRemoveValue(setup_copy, pick_list[i].key2); + } + if (pick_list[i].key3 != NULL) { + CFDictionaryRemoveValue(setup_copy, pick_list[i].key3); + } + } + } + + /* merge the "Setup:" keys */ + CFDictionaryApplyFunction(setup_copy, merge_dict, new_dict); + CFRelease(setup_copy); + } + else if (setup_dict != NULL) { + new_dict = CFDictionaryCreateMutableCopy(NULL, 0, setup_dict); + } + else if (state_dict != NULL) { + new_dict = CFDictionaryCreateMutableCopy(NULL, 0, state_dict); + } + + if ((new_dict != NULL) && (CFDictionaryGetCount(new_dict) == 0)) { + CFRelease(new_dict); + new_dict = NULL; + } + + if ((new_dict != NULL) && (interface != NULL)) { + CFDictionarySetValue(new_dict, kSCPropInterfaceName, interface); + } + + /* process WPAD */ + if (new_dict != NULL) { + CFDictionaryRef dhcp_options; + CFNumberRef num; + CFNumberRef wpad = NULL; + int wpadEnabled = 0; + CFStringRef wpadURL = NULL; + + if (CFDictionaryGetValueIfPresent(new_dict, + kSCPropNetProxiesProxyAutoDiscoveryEnable, + (const void **)&num) && + isA_CFNumber(num)) { + /* if we have a WPAD key */ + wpad = num; + if (!CFNumberGetValue(num, kCFNumberIntType, &wpadEnabled)) { + /* if we don't like the enabled key/value */ + wpadEnabled = 0; + } + } + + if (wpadEnabled) { + int pacEnabled = 0; + + num = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigEnable); + if (!isA_CFNumber(num) || + !CFNumberGetValue(num, kCFNumberIntType, &pacEnabled)) { + /* if we don't like the enabled key/value */ + pacEnabled = 0; + } + + if (pacEnabled) { + CFStringRef pacURL; + + pacURL = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigURLString); + if (pacURL != NULL) { + if (!isA_CFString(pacURL)) { + /* if we don't like the PAC URL */ + pacEnabled = 0; + } + } else { + CFStringRef pacJS; + + pacJS = CFDictionaryGetValue(new_dict, kSCPropNetProxiesProxyAutoConfigJavaScript); + if (!isA_CFString(pacJS)) { + /* if we don't have (or like) the PAC JavaScript */ + pacEnabled = 0; + } + } + } + + if (pacEnabled) { + /* + * we already have a PAC URL so disable WPAD. + */ + wpadEnabled = 0; + goto setWPAD; + } + + /* + * if WPAD is enabled and we don't already have a PAC URL then + * we check for a DHCP provided URL. If not available, we use + * a PAC URL pointing to a well-known file (wpad.dat) on a + * well-known host (wpad.). + */ + dhcp_options = get_service_state_entity(info, serviceID, kSCEntNetDHCP); + wpadURL = wpadURL_dhcp(dhcp_options); + if (wpadURL == NULL) { + wpadURL = wpadURL_dns(); + } + if (wpadURL == NULL) { + wpadEnabled = 0; /* if we don't have a WPAD URL */ + goto setWPAD; + } + + pacEnabled = 1; + num = CFNumberCreate(NULL, kCFNumberIntType, &pacEnabled); + CFDictionarySetValue(new_dict, + kSCPropNetProxiesProxyAutoConfigEnable, + num); + CFRelease(num); + CFDictionarySetValue(new_dict, + kSCPropNetProxiesProxyAutoConfigURLString, + wpadURL); + CFRelease(wpadURL); + } + + setWPAD: + if (wpad != NULL) { + num = CFNumberCreate(NULL, kCFNumberIntType, &wpadEnabled); + CFDictionarySetValue(new_dict, + kSCPropNetProxiesProxyAutoDiscoveryEnable, + num); + CFRelease(num); + } + } + + done: + changed = service_dict_set(serviceID, kSCEntNetProxies, new_dict); + my_CFRelease(&new_dict); + return (changed); +} + +#if !TARGET_OS_IPHONE +static boolean_t +get_smb_changes(CFStringRef serviceID, CFDictionaryRef state_dict, + CFDictionaryRef setup_dict, CFDictionaryRef info) +{ + boolean_t changed = FALSE; + int i; + CFMutableDictionaryRef new_dict = NULL; + const CFStringRef pick_list[] = { + kSCPropNetSMBNetBIOSName, + kSCPropNetSMBNetBIOSNodeType, +#ifdef ADD_NETBIOS_SCOPE + kSCPropNetSMBNetBIOSScope, +#endif // ADD_NETBIOS_SCOPE + kSCPropNetSMBWorkgroup, + }; + + if (state_dict == NULL && setup_dict == NULL) { + /* there is no SMB */ + goto done; + } + if (service_dict_get(serviceID, kSCEntNetIPv4) == NULL + && service_dict_get(serviceID, kSCEntNetIPv6) == NULL) { + /* there is no IPv4 or IPv6 */ + goto done; + } + + /* merge SMB configuration */ + new_dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + merge_array_prop(new_dict, + kSCPropNetSMBWINSAddresses, + state_dict, + setup_dict, + 0, + FALSE); + for (i = 0; i < countof(pick_list); i++) { + pick_prop(new_dict, + pick_list[i], + state_dict, + setup_dict, + 0); + } + + if (CFDictionaryGetCount(new_dict) == 0) { + my_CFRelease(&new_dict); + goto done; + } + + done: + changed = service_dict_set(serviceID, kSCEntNetSMB, new_dict); + my_CFRelease(&new_dict); + return (changed); +} +#endif /* !TARGET_OS_IPHONE */ + +static CFStringRef +services_info_get_interface(CFDictionaryRef services_info, + CFStringRef serviceID) +{ + CFStringRef interface = NULL; + CFDictionaryRef ipv4_dict; + + ipv4_dict = get_service_state_entity(services_info, serviceID, + kSCEntNetIPv4); + if (ipv4_dict != NULL) { + interface = CFDictionaryGetValue(ipv4_dict, kSCPropInterfaceName); + } + else { + CFDictionaryRef ipv6_dict; + + ipv6_dict = get_service_state_entity(services_info, serviceID, + kSCEntNetIPv6); + if (ipv6_dict != NULL) { + interface = CFDictionaryGetValue(ipv6_dict, kSCPropInterfaceName); + } + } + return (interface); +} + + +static const struct { + const CFStringRef * entityName; + const CFStringRef * statusKey; +} transientServiceInfo[] = { + { &kSCEntNetIPSec, &kSCPropNetIPSecStatus }, + { &kSCEntNetPPP, &kSCPropNetPPPStatus }, + { &kSCEntNetVPN, &kSCPropNetVPNStatus }, +}; + +static Boolean +get_transient_status_changes(CFStringRef serviceID, + CFDictionaryRef services_info) +{ + boolean_t changed = FALSE; + int i; + + for (i = 0; i < countof(transientServiceInfo); i++) { + CFDictionaryRef dict; + CFNumberRef status = NULL; + CFMutableDictionaryRef ts_dict = NULL; + + dict = get_service_state_entity(services_info, serviceID, + *transientServiceInfo[i].entityName); + + if (dict != NULL) { + status = CFDictionaryGetValue(dict, + *transientServiceInfo[i].statusKey); + } + + if (isA_CFNumber(status) != NULL) { + ts_dict = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionaryAddValue(ts_dict, + *transientServiceInfo[i].statusKey, + status); + } + + if (service_dict_set(serviceID, *transientServiceInfo[i].entityName, + ts_dict)) { + changed = TRUE; + } + + if (ts_dict != NULL) { + CFRelease(ts_dict); + } + } + return (changed); +} + +static boolean_t +service_is_expensive(CFStringRef serviceID, CFDictionaryRef services_info) +{ + CFStringRef ifname; + boolean_t is_expensive = FALSE; + + ifname = services_info_get_interface(services_info, serviceID); + if (ifname != NULL) { + CFDictionaryRef if_dict; + CFStringRef key; + + key = interface_entity_key_copy(ifname, kSCEntNetLink); + if_dict = CFDictionaryGetValue(services_info, key); + CFRelease(key); + if (isA_CFDictionary(if_dict) != NULL) { + CFBooleanRef expensive; + + expensive = CFDictionaryGetValue(if_dict, kSCPropNetLinkExpensive); + if (isA_CFBoolean(expensive) != NULL + && CFBooleanGetValue(expensive)) { + is_expensive = TRUE; + } + } + } + return (is_expensive); +} + +static boolean_t +get_rank_changes(CFStringRef serviceID, CFDictionaryRef state_options, + CFDictionaryRef setup_options, CFDictionaryRef services_info) +{ + boolean_t changed = FALSE; + boolean_t ip_is_coupled = FALSE; + CFMutableDictionaryRef new_dict = NULL; + Rank rank_assertion = kRankAssertionDefault; + Boolean rank_assertion_is_set = FALSE; + CFStringRef setup_rank = NULL; + CFStringRef state_rank = NULL; + + + if (state_options != NULL) { + CFBooleanRef coupled; + + state_rank + = CFDictionaryGetValue(state_options, kSCPropNetServicePrimaryRank); + state_rank = isA_CFString(state_rank); + coupled = CFDictionaryGetValue(state_options, kIPIsCoupled); + if (isA_CFBoolean(coupled) != NULL && CFBooleanGetValue(coupled)) { + ip_is_coupled = TRUE; + } + } + if (setup_options != NULL) { + CFBooleanRef coupled; + + setup_rank + = CFDictionaryGetValue(setup_options, kSCPropNetServicePrimaryRank); + setup_rank = isA_CFString(setup_rank); + coupled = CFDictionaryGetValue(setup_options, kIPIsCoupled); + if (isA_CFBoolean(coupled) != NULL && CFBooleanGetValue(coupled)) { + ip_is_coupled = TRUE; + } + } + + if (ip_is_coupled == FALSE) { + ip_is_coupled = service_is_expensive(serviceID, services_info); + } + if (setup_rank != NULL || state_rank != NULL) { + /* rank assertion is set on the service */ + Rank setup_assertion; + Rank state_assertion; + Boolean state_assertion_is_set = FALSE; + + setup_assertion = PrimaryRankGetRankAssertion(setup_rank, NULL); + state_assertion = PrimaryRankGetRankAssertion(state_rank, + &state_assertion_is_set); + if (setup_assertion > state_assertion) { + rank_assertion = setup_assertion; + rank_assertion_is_set = TRUE; + } + else if (state_assertion_is_set) { + rank_assertion = state_assertion; + rank_assertion_is_set = TRUE; + } + } + + if (rank_assertion_is_set == FALSE) { + /* check for a rank assertion on the interface */ + CFStringRef interface; + + interface = services_info_get_interface(services_info, serviceID); + if (interface != NULL) { + CFNumberRef if_rank = NULL; + + if (S_if_rank_dict != NULL) { + if_rank = CFDictionaryGetValue(S_if_rank_dict, interface); + } + rank_assertion + = InterfaceRankGetRankAssertion(if_rank, + &rank_assertion_is_set); + if (S_IPMonitor_debug & kDebugFlag1) { + my_log(LOG_DEBUG, + "serviceID %@ interface %@ rank = %@", + serviceID, interface, if_rank); + } + } + } + + + if (rank_assertion_is_set || ip_is_coupled) { + new_dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + if (rank_assertion_is_set) { + CFNumberRef new_rank; + + new_rank = CFNumberCreate(NULL, kCFNumberSInt32Type, + (const void *)&rank_assertion); + CFDictionarySetValue(new_dict, kServiceOptionRankAssertion, + new_rank); + CFRelease(new_rank); + } + if (ip_is_coupled) { + CFDictionarySetValue(new_dict, kIPIsCoupled, kCFBooleanTrue); + } + } + changed = service_dict_set(serviceID, kSCEntNetService, new_dict); + my_CFRelease(&new_dict); + return (changed); +} + +static void +add_service_keys(CFStringRef serviceID, + CFMutableArrayRef keys, CFMutableArrayRef patterns) +{ + int i; + CFStringRef key; + + if (CFEqual(serviceID, kSCCompAnyRegex)) { + keys = patterns; + } + + for (i = 0; i < ENTITY_TYPES_COUNT; i++) { + key = setup_service_key(serviceID, *entityTypeNames[i]); + CFArrayAppendValue(keys, key); + CFRelease(key); + key = state_service_key(serviceID, *entityTypeNames[i]); + CFArrayAppendValue(keys, key); + CFRelease(key); + } + + key = state_service_key(serviceID, kSCEntNetDHCP); + CFArrayAppendValue(patterns, key); + CFRelease(key); + + key = setup_service_key(serviceID, NULL); + CFArrayAppendValue(patterns, key); + CFRelease(key); + key = state_service_key(serviceID, NULL); + CFArrayAppendValue(patterns, key); + CFRelease(key); + + return; +} + +static void +add_transient_status_keys(CFStringRef service_id, CFMutableArrayRef patterns) +{ + int i; + + for (i = 0; i < countof(transientServiceInfo); i++) { + CFStringRef pattern; + + pattern = state_service_key(service_id, + *transientServiceInfo[i].entityName); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); + } + + return; +} + +static const CFStringRef *reachabilitySetupKeys[] = { + &kSCEntNetPPP, + &kSCEntNetInterface, + &kSCEntNetIPv4, + &kSCEntNetIPv6, +}; + + +static void +add_reachability_patterns(CFMutableArrayRef patterns) +{ + int i; + + for (i = 0; i < countof(reachabilitySetupKeys); i++) { + CFStringRef pattern; + pattern = setup_service_key(kSCCompAnyRegex, *reachabilitySetupKeys[i]); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); + } +} + + +static void +add_vpn_pattern(CFMutableArrayRef patterns) +{ + CFStringRef pattern; + + pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetVPN); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); +} + +static void +add_interface_link_pattern(CFMutableArrayRef patterns) +{ + CFStringRef pattern; + + pattern = interface_entity_key_copy(kSCCompAnyRegex, kSCEntNetLink); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); +} + +static CFDictionaryRef +services_info_copy(SCDynamicStoreRef session, CFArrayRef service_list) +{ + CFIndex count; + CFMutableArrayRef get_keys; + CFMutableArrayRef get_patterns; + CFDictionaryRef info; + CFIndex s; + + count = CFArrayGetCount(service_list); + get_keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + get_patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + CFArrayAppendValue(get_keys, S_setup_global_ipv4); + CFArrayAppendValue(get_keys, S_multicast_resolvers); + CFArrayAppendValue(get_keys, S_private_resolvers); + + for (s = 0; s < count; s++) { + CFStringRef serviceID = CFArrayGetValueAtIndex(service_list, s); + + add_service_keys(serviceID, get_keys, get_patterns); + add_transient_status_keys(serviceID, get_keys); + } + + add_reachability_patterns(get_patterns); + + add_vpn_pattern(get_patterns); + + add_interface_link_pattern(get_patterns); + + info = SCDynamicStoreCopyMultiple(session, get_keys, get_patterns); + my_CFRelease(&get_keys); + my_CFRelease(&get_patterns); + return (info); +} + +#if !TARGET_IPHONE_SIMULATOR + +static int +multicast_route(int sockfd, int cmd) +{ + IPv4Route route; + + bzero(&route, sizeof(route)); + route.dest.s_addr = htonl(INADDR_UNSPEC_GROUP); + route.mask.s_addr = htonl(IN_CLASSD_NET); + route.ifindex = lo0_ifindex(); + return (IPv4RouteApply((RouteRef)&route, cmd, sockfd)); +} + +#endif /* !TARGET_IPHONE_SIMULATOR */ + +#if !TARGET_IPHONE_SIMULATOR + +static boolean_t +set_ipv6_default_interface(IFIndex ifindex) +{ + struct in6_ndifreq ndifreq; + int sock; + boolean_t success = FALSE; + + bzero((char *)&ndifreq, sizeof(ndifreq)); + strlcpy(ndifreq.ifname, kLoopbackInterface, sizeof(ndifreq.ifname)); + if (ifindex != 0) { + ndifreq.ifindex = ifindex; + } + else { + ndifreq.ifindex = lo0_ifindex(); + } + sock = inet6_dgram_socket(); + if (sock == -1) { + my_log(LOG_ERR, + "IPMonitor: set_ipv6_default_interface: socket failed, %s", + strerror(errno)); + } + else { + if (ioctl(sock, SIOCSDEFIFACE_IN6, (caddr_t)&ndifreq) == -1) { + my_log(LOG_ERR, + "IPMonitor: ioctl(SIOCSDEFIFACE_IN6) failed, %s", + strerror(errno)); + } + else { + success = TRUE; + } + close(sock); + } + return (success); +} + +#endif /* !TARGET_IPHONE_SIMULATOR */ + +#if !TARGET_OS_IPHONE +static __inline__ void +empty_dns() +{ + (void)unlink(VAR_RUN_RESOLV_CONF); +} + +static void +set_dns(CFArrayRef val_search_domains, + CFStringRef val_domain_name, + CFArrayRef val_servers, + CFArrayRef val_sortlist) +{ + FILE * f = fopen(VAR_RUN_RESOLV_CONF "-", "w"); + + /* publish new resolv.conf */ + if (f) { + CFIndex i; + CFIndex n; + + SCPrint(TRUE, f, CFSTR("#\n")); + SCPrint(TRUE, f, CFSTR("# Mac OS X Notice\n")); + SCPrint(TRUE, f, CFSTR("#\n")); + SCPrint(TRUE, f, CFSTR("# This file is not used by the host name and address resolution\n")); + SCPrint(TRUE, f, CFSTR("# or the DNS query routing mechanisms used by most processes on\n")); + SCPrint(TRUE, f, CFSTR("# this Mac OS X system.\n")); + SCPrint(TRUE, f, CFSTR("#\n")); + SCPrint(TRUE, f, CFSTR("# This file is automatically generated.\n")); + SCPrint(TRUE, f, CFSTR("#\n")); + + if (isA_CFArray(val_search_domains)) { + SCPrint(TRUE, f, CFSTR("search")); + n = CFArrayGetCount(val_search_domains); + for (i = 0; i < n; i++) { + CFStringRef domain; + + domain = CFArrayGetValueAtIndex(val_search_domains, i); + if (isA_CFString(domain)) { + SCPrint(TRUE, f, CFSTR(" %@"), domain); + } + } + SCPrint(TRUE, f, CFSTR("\n")); + } + else if (isA_CFString(val_domain_name)) { + SCPrint(TRUE, f, CFSTR("domain %@\n"), val_domain_name); + } + + if (isA_CFArray(val_servers)) { + n = CFArrayGetCount(val_servers); + for (i = 0; i < n; i++) { + CFStringRef nameserver; + + nameserver = CFArrayGetValueAtIndex(val_servers, i); + if (isA_CFString(nameserver)) { + SCPrint(TRUE, f, CFSTR("nameserver %@\n"), nameserver); + } + } + } + + if (isA_CFArray(val_sortlist)) { + SCPrint(TRUE, f, CFSTR("sortlist")); + n = CFArrayGetCount(val_sortlist); + for (i = 0; i < n; i++) { + CFStringRef address; + + address = CFArrayGetValueAtIndex(val_sortlist, i); + if (isA_CFString(address)) { + SCPrint(TRUE, f, CFSTR(" %@"), address); + } + } + SCPrint(TRUE, f, CFSTR("\n")); + } + + fclose(f); + rename(VAR_RUN_RESOLV_CONF "-", VAR_RUN_RESOLV_CONF); + } + return; +} +#endif /* !TARGET_OS_IPHONE */ + +static boolean_t +service_get_ip_is_coupled(CFStringRef serviceID) +{ + CFDictionaryRef dict; + boolean_t ip_is_coupled = FALSE; + + dict = service_dict_get(serviceID, kSCEntNetService); + if (dict != NULL) { + if (CFDictionaryContainsKey(dict, kIPIsCoupled)) { + ip_is_coupled = TRUE; + } + } + return (ip_is_coupled); +} + +static CFStringRef +my_CFStringCreateWithInAddr(struct in_addr ip) +{ + CFStringRef str; + + str = CFStringCreateWithFormat(NULL, NULL, CFSTR(IP_FORMAT), IP_LIST(&ip)); + return (str); +} + +static CFStringRef +my_CFStringCreateWithIn6Addr(const struct in6_addr * ip) +{ + char ntopbuf[INET6_ADDRSTRLEN]; + + (void)inet_ntop(AF_INET6, ip, ntopbuf, sizeof(ntopbuf)); + return (CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), ntopbuf)); +} + +/* + * Function: update_ipv4 + * Purpose: + * Update the IPv4 configuration based on the latest information. + * Publish the State:/Network/Global/IPv4 information, and update the + * IPv4 routing table. + */ +static void +update_ipv4(CFStringRef primary, + IPv4RouteListRef new_routelist, + keyChangeListRef keys) +{ +#if !TARGET_IPHONE_SIMULATOR + int sockfd; +#endif /* !TARGET_IPHONE_SIMULATOR */ + + if (keys != NULL) { + if (new_routelist != NULL && primary != NULL) { + const char * ifn_p = NULL; + char ifname[IFNAMSIZ]; + IPv4RouteRef r; + CFMutableDictionaryRef dict = NULL; + + dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + /* the first entry is the default route */ + r = new_routelist->list; + if (r->gateway.s_addr != 0) { + CFStringRef str; + + str = my_CFStringCreateWithInAddr(r->gateway); + CFDictionarySetValue(dict, kSCPropNetIPv4Router, str); + CFRelease(str); + } + ifn_p = my_if_indextoname(r->ifindex, ifname); + if (ifn_p != NULL) { + CFStringRef ifname_cf; + + ifname_cf = CFStringCreateWithCString(NULL, + ifn_p, + kCFStringEncodingASCII); + if (ifname_cf != NULL) { + CFDictionarySetValue(dict, + kSCDynamicStorePropNetPrimaryInterface, + ifname_cf); + CFRelease(ifname_cf); + } + } + CFDictionarySetValue(dict, kSCDynamicStorePropNetPrimaryService, + primary); + keyChangeListSetValue(keys, S_state_global_ipv4, dict); + CFRelease(dict); + } + else { + keyChangeListRemoveValue(keys, S_state_global_ipv4); + } + } + +#if !TARGET_IPHONE_SIMULATOR + sockfd = open_routing_socket(); + if (sockfd != -1) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + if (S_ipv4_routelist == NULL) { + my_log(LOG_DEBUG, "Old Routes = "); + } + else { + my_log(LOG_DEBUG, "Old Routes = "); + IPv4RouteListLog(LOG_DEBUG, S_ipv4_routelist); + } + if (new_routelist == NULL) { + my_log(LOG_DEBUG, "New Routes = "); + } + else { + my_log(LOG_DEBUG, "New Routes = "); + IPv4RouteListLog(LOG_DEBUG, new_routelist); + } + } + /* go through routelist and bind any unbound routes */ + IPv4RouteListFinalize(new_routelist); + IPv4RouteListApply(S_ipv4_routelist, new_routelist, sockfd); + if (new_routelist != NULL) { + (void)multicast_route(sockfd, RTM_DELETE); + } + else { + (void)multicast_route(sockfd, RTM_ADD); + } + close(sockfd); + } + if (S_ipv4_routelist != NULL) { + free(S_ipv4_routelist); + } + S_ipv4_routelist = new_routelist; +#else /* !TARGET_IPHONE_SIMULATOR */ + if (new_routelist != NULL) { + free(new_routelist); + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + + return; +} + +/* + * Function: update_ipv6 + * Purpose: + * Update the IPv6 configuration based on the latest information. + * Publish the State:/Network/Global/IPv6 information, and update the + * IPv6 routing table. + */ +static void +update_ipv6(CFStringRef primary, + IPv6RouteListRef new_routelist, + keyChangeListRef keys) +{ +#if !TARGET_IPHONE_SIMULATOR + int sockfd; +#endif /* !TARGET_IPHONE_SIMULATOR */ + + if (keys != NULL) { + if (new_routelist != NULL && primary != NULL) { + const char * ifn_p = NULL; + char ifname[IFNAMSIZ]; + IPv6RouteRef r; + CFMutableDictionaryRef dict = NULL; + + dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + /* the first entry is the default route */ + r = new_routelist->list; + if ((r->flags & kRouteFlagsHasGateway) != 0) { + CFStringRef router; + + router = my_CFStringCreateWithIn6Addr(&r->gateway); + CFDictionarySetValue(dict, kSCPropNetIPv6Router, router); + CFRelease(router); + } + ifn_p = my_if_indextoname(r->ifindex, ifname); + if (ifn_p != NULL) { + CFStringRef ifname_cf; + + ifname_cf = CFStringCreateWithCString(NULL, + ifn_p, + kCFStringEncodingASCII); + if (ifname_cf != NULL) { + CFDictionarySetValue(dict, + kSCDynamicStorePropNetPrimaryInterface, + ifname_cf); + CFRelease(ifname_cf); + } + } + CFDictionarySetValue(dict, kSCDynamicStorePropNetPrimaryService, + primary); + keyChangeListSetValue(keys, S_state_global_ipv6, dict); + CFRelease(dict); +#if !TARGET_IPHONE_SIMULATOR + if (S_scopedroute_v6) { + set_ipv6_default_interface(r->ifindex); + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + } + else { #if !TARGET_IPHONE_SIMULATOR - CFArrayRef addrs; + if (S_scopedroute_v6) { + set_ipv6_default_interface(0); + } #endif /* !TARGET_IPHONE_SIMULATOR */ - CFMutableDictionaryRef dict = NULL; - CFStringRef if_name = NULL; + keyChangeListRemoveValue(keys, S_state_global_ipv6); + } + } + #if !TARGET_IPHONE_SIMULATOR - char ifn[IFNAMSIZ] = { '\0' }; - char * ifn_p = NULL; - boolean_t is_direct = FALSE; + sockfd = open_routing_socket(); + if (sockfd != -1) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + if (S_ipv6_routelist == NULL) { + my_log(LOG_DEBUG, "Old Routes = "); + } + else { + my_log(LOG_DEBUG, "Old Routes = "); + IPv6RouteListLog(LOG_DEBUG, S_ipv6_routelist); + } + if (new_routelist == NULL) { + my_log(LOG_DEBUG, "New Routes = "); + } + else { + my_log(LOG_DEBUG, "New Routes = "); + IPv6RouteListLog(LOG_DEBUG, new_routelist); + } + } + /* go through routelist and bind any unbound routes */ + IPv6RouteListFinalize(new_routelist); + IPv6RouteListApply(S_ipv6_routelist, new_routelist, sockfd); + close(sockfd); + } + if (S_ipv6_routelist != NULL) { + free(S_ipv6_routelist); + } + S_ipv6_routelist = new_routelist; +#else /* !TARGET_IPHONE_SIMULATOR */ + if (new_routelist != NULL) { + free(new_routelist); + } #endif /* !TARGET_IPHONE_SIMULATOR */ - CFStringRef val_router = NULL; - dict = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); + return; +} + +static Boolean +update_dns(CFDictionaryRef services_info, + CFStringRef primary, + keyChangeListRef keys) +{ + Boolean changed = FALSE; + CFDictionaryRef dict = NULL; + + if (primary != NULL) { + CFDictionaryRef service_dict; + + service_dict = CFDictionaryGetValue(S_service_state_dict, primary); + if (service_dict != NULL) { + dict = CFDictionaryGetValue(service_dict, kSCEntNetDNS); + } + } + + if (!_SC_CFEqual(S_dns_dict, dict)) { + if (dict == NULL) { +#if !TARGET_OS_IPHONE + empty_dns(); +#endif /* !TARGET_OS_IPHONE */ + keyChangeListRemoveValue(keys, S_state_global_dns); + } else { + CFMutableDictionaryRef new_dict; + +#if !TARGET_OS_IPHONE + set_dns(CFDictionaryGetValue(dict, kSCPropNetDNSSearchDomains), + CFDictionaryGetValue(dict, kSCPropNetDNSDomainName), + CFDictionaryGetValue(dict, kSCPropNetDNSServerAddresses), + CFDictionaryGetValue(dict, kSCPropNetDNSSortList)); +#endif /* !TARGET_OS_IPHONE */ + new_dict = CFDictionaryCreateMutableCopy(NULL, 0, dict); + CFDictionaryRemoveValue(new_dict, kSCPropInterfaceName); + CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSupplementalMatchDomains); + CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSupplementalMatchOrders); + CFDictionaryRemoveValue(new_dict, DNS_CONFIGURATION_SCOPED_QUERY_KEY); + keyChangeListSetValue(keys, S_state_global_dns, new_dict); + CFRelease(new_dict); + } + changed = TRUE; + } + + if (dict != NULL) CFRetain(dict); + if (S_dns_dict != NULL) CFRelease(S_dns_dict); + S_dns_dict = dict; + + return changed; +} + +static Boolean +update_dnsinfo(CFDictionaryRef services_info, + CFStringRef primary, + keyChangeListRef keys, + CFArrayRef service_order) +{ + Boolean changed; + CFDictionaryRef dict = NULL; + CFArrayRef multicastResolvers; + CFArrayRef privateResolvers; + + multicastResolvers = CFDictionaryGetValue(services_info, S_multicast_resolvers); + privateResolvers = CFDictionaryGetValue(services_info, S_private_resolvers); + + if (primary != NULL) { + CFDictionaryRef service_dict; + + service_dict = CFDictionaryGetValue(S_service_state_dict, primary); + if (service_dict != NULL) { + dict = CFDictionaryGetValue(service_dict, kSCEntNetDNS); + } + } + + changed = dns_configuration_set(dict, + S_service_state_dict, + service_order, + multicastResolvers, + privateResolvers); + if (changed) { + keyChangeListNotifyKey(keys, S_state_global_dns); + } + return changed; +} + +static Boolean +update_nwi(nwi_state_t state) +{ + unsigned char signature[CC_SHA1_DIGEST_LENGTH]; + static unsigned char signature_last[CC_SHA1_DIGEST_LENGTH]; + + _nwi_state_signature(state, signature, sizeof(signature)); + if (bcmp(signature, signature_last, sizeof(signature)) == 0) { + return FALSE; + } + + // save [new] signature + bcopy(signature, signature_last, sizeof(signature)); + + // save [new] configuration + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, "Updating network information"); + S_nwi_state_dump(state); + } + if (_nwi_state_store(state) == FALSE) { + my_log(LOG_ERR, "Notifying nwi_state_store failed"); + } + + return TRUE; +} + +static Boolean +update_proxies(CFDictionaryRef services_info, + CFStringRef primary, + keyChangeListRef keys, + CFArrayRef service_order) +{ + Boolean changed = FALSE; + CFDictionaryRef dict = NULL; + CFDictionaryRef new_dict; + + if (primary != NULL) { + CFDictionaryRef service_dict; + + service_dict = CFDictionaryGetValue(S_service_state_dict, primary); + if (service_dict != NULL) { + dict = CFDictionaryGetValue(service_dict, kSCEntNetProxies); + } + } + + new_dict = proxy_configuration_update(dict, + S_service_state_dict, + service_order, + services_info); + if (!_SC_CFEqual(S_proxies_dict, new_dict)) { + if (new_dict == NULL) { + keyChangeListRemoveValue(keys, S_state_global_proxies); + } else { + keyChangeListSetValue(keys, S_state_global_proxies, new_dict); + } + changed = TRUE; + } + + if (S_proxies_dict != NULL) CFRelease(S_proxies_dict); + S_proxies_dict = new_dict; + + return changed; +} + +#if !TARGET_OS_IPHONE +static Boolean +update_smb(CFDictionaryRef services_info, + CFStringRef primary, + keyChangeListRef keys) +{ + Boolean changed = FALSE; + CFDictionaryRef dict = NULL; + + if (primary != NULL) { + CFDictionaryRef service_dict; + + service_dict = CFDictionaryGetValue(S_service_state_dict, primary); + if (service_dict != NULL) { + dict = CFDictionaryGetValue(service_dict, kSCEntNetSMB); + } + } + + if (!_SC_CFEqual(S_smb_dict, dict)) { + if (dict == NULL) { + keyChangeListRemoveValue(keys, S_state_global_smb); + } else { + keyChangeListSetValue(keys, S_state_global_smb, dict); + } + changed = TRUE; + } + + if (dict != NULL) CFRetain(dict); + if (S_smb_dict != NULL) CFRelease(S_smb_dict); + S_smb_dict = dict; + + return changed; +} +#endif /* !TARGET_OS_IPHONE */ + +static Rank +get_service_rank(CFArrayRef order, int n_order, CFStringRef serviceID) +{ + CFIndex i; + Rank rank = kRankIndexMask; + + if (serviceID != NULL && order != NULL && n_order > 0) { + for (i = 0; i < n_order; i++) { + CFStringRef s = isA_CFString(CFArrayGetValueAtIndex(order, i)); + + if (s == NULL) { + continue; + } + if (CFEqual(serviceID, s)) { + rank = (Rank)i + 1; + break; + } + } + } + return (rank); +} + +/** + ** Service election: + **/ +/* + * Function: rank_dict_get_service_rank + * Purpose: + * Retrieve the service rank in the given dictionary. + */ +static Rank +rank_dict_get_service_rank(CFDictionaryRef rank_dict, CFStringRef serviceID) +{ + CFNumberRef rank; + Rank rank_val; + + rank_val = RankMake(kRankIndexMask, kRankAssertionDefault); + rank = CFDictionaryGetValue(rank_dict, serviceID); + if (rank != NULL) { + CFNumberGetValue(rank, kCFNumberSInt32Type, &rank_val); + } + return (rank_val); +} + +/* + * Function: rank_dict_set_service_rank + * Purpose: + * Save the results of ranking the service so we can look it up later without + * repeating all of the ranking code. + */ +static void +rank_dict_set_service_rank(CFMutableDictionaryRef rank_dict, + CFStringRef serviceID, Rank rank_val) +{ + CFNumberRef rank; + + rank = CFNumberCreate(NULL, kCFNumberSInt32Type, (const void *)&rank_val); + if (rank != NULL) { + CFDictionarySetValue(rank_dict, serviceID, rank); + CFRelease(rank); + } + return; +} + +static const CFStringRef *transientInterfaceEntityNames[] = { + &kSCEntNetPPP, +}; + + +static void +CollectTransientServices(const void * key, + const void * value, + void * context) +{ + int i; + CFStringRef service = key; + CFMutableArrayRef vif_setup_keys = context; + + /* This service is either a vpn type service or a comm center service */ + if (!CFStringHasPrefix(service, kSCDynamicStoreDomainSetup)) { + return; + } + + for (i = 0; i < countof(transientInterfaceEntityNames); i++) { + if (CFStringHasSuffix(service, *transientInterfaceEntityNames[i])) { + CFArrayAppendValue(vif_setup_keys, service); + break; + } + } + + return; +} + + +static SCNetworkReachabilityFlags +GetReachabilityFlagsFromVPN(CFDictionaryRef services_info, + CFStringRef service_id, + CFStringRef entity, + CFStringRef vpn_setup_key) +{ + CFStringRef key; + CFDictionaryRef dict; + SCNetworkReachabilityFlags flags = 0; + + + key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, + kSCDynamicStoreDomainSetup, + service_id, + kSCEntNetInterface); + dict = CFDictionaryGetValue(services_info, key); + CFRelease(key); + + if (isA_CFDictionary(dict) + && CFDictionaryContainsKey(dict, kSCPropNetInterfaceDeviceName)) { + + flags = (kSCNetworkReachabilityFlagsReachable + | kSCNetworkReachabilityFlagsTransientConnection + | kSCNetworkReachabilityFlagsConnectionRequired); + + if (CFEqual(entity, kSCEntNetPPP)) { + CFNumberRef num; + CFDictionaryRef p_dict = CFDictionaryGetValue(services_info, vpn_setup_key); + + if (!isA_CFDictionary(p_dict)) { + return (flags); + } + + // get PPP dial-on-traffic status + num = CFDictionaryGetValue(p_dict, kSCPropNetPPPDialOnDemand); + if (isA_CFNumber(num)) { + int32_t ppp_demand; + + if (CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand)) { + if (ppp_demand) { + flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; + } + } + } + } + } + return (flags); +} + +static Boolean +S_dict_get_boolean(CFDictionaryRef dict, CFStringRef key, Boolean def_value) +{ + Boolean ret = def_value; + + if (dict != NULL) { + CFBooleanRef val; + + val = CFDictionaryGetValue(dict, key); + if (isA_CFBoolean(val) != NULL) { + ret = CFBooleanGetValue(val); + } + } + return (ret); +} + + +static void +GetReachabilityFlagsFromTransientServices(CFDictionaryRef services_info, + SCNetworkReachabilityFlags *reach_flags_v4, + SCNetworkReachabilityFlags *reach_flags_v6) +{ + CFIndex i; + CFIndex count; + CFMutableArrayRef vif_setup_keys; + + vif_setup_keys = CFArrayCreateMutable(NULL, + 0, + &kCFTypeArrayCallBacks); + CFDictionaryApplyFunction(services_info, CollectTransientServices, + vif_setup_keys); + count = CFArrayGetCount(vif_setup_keys); + for (i = 0; i < count; i++) { + CFArrayRef components = NULL; + CFStringRef entity; + CFStringRef service_id; + CFStringRef vif_setup_key; + + vif_setup_key = CFArrayGetValueAtIndex(vif_setup_keys, i); + + /* + * setup key in the following format: + * Setup:/Network/Service// + */ + components = CFStringCreateArrayBySeparatingStrings(NULL, vif_setup_key, CFSTR("/")); + + if (CFArrayGetCount(components) != 5) { + // invalid Setup key encountered + goto skip; + } + + /* service id is the 3rd element */ + service_id = CFArrayGetValueAtIndex(components, 3); + + /* entity id is the 4th element */ + entity = CFArrayGetValueAtIndex(components, 4); + + + if (CFEqual(entity, kSCEntNetPPP)) { + SCNetworkReachabilityFlags flags; + CFStringRef key; -#if !TARGET_IPHONE_SIMULATOR - addrs = CFDictionaryGetValue(ipv6_dict, - kSCPropNetIPv6Addresses); -#endif /* !TARGET_IPHONE_SIMULATOR */ + flags = GetReachabilityFlagsFromVPN(services_info, + service_id, + entity, + vif_setup_key); - val_router = CFDictionaryGetValue(ipv6_dict, kSCPropNetIPv6Router); - if (val_router != NULL) { -#if !TARGET_IPHONE_SIMULATOR - is_direct = router_is_our_ipv6_address(val_router, addrs); -#endif /* !TARGET_IPHONE_SIMULATOR */ - /* no router if router is one of our IP addresses */ - CFDictionarySetValue(dict, kSCPropNetIPv6Router, - val_router); - } -#if !TARGET_IPHONE_SIMULATOR - else { - val_router = CFArrayGetValueAtIndex(addrs, 0); - is_direct = TRUE; - } -#endif /* !TARGET_IPHONE_SIMULATOR */ - if_name = CFDictionaryGetValue(ipv6_dict, kSCPropInterfaceName); - if (if_name) { - CFDictionarySetValue(dict, - kSCDynamicStorePropNetPrimaryInterface, - if_name); -#if !TARGET_IPHONE_SIMULATOR - if (CFStringGetCString(if_name, ifn, sizeof(ifn), - kCFStringEncodingASCII)) { - ifn_p = ifn; + /* Check for the v4 reachability flags */ + key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, + kSCDynamicStoreDomainSetup, + service_id, + kSCEntNetIPv4); + + if (CFDictionaryContainsKey(services_info, key)) { + *reach_flags_v4 |= flags; + my_log(LOG_DEBUG, "Service %@ setting ipv4 reach flags: %d", service_id, *reach_flags_v4); } -#endif /* !TARGET_IPHONE_SIMULATOR */ - } - CFDictionarySetValue(dict, kSCDynamicStorePropNetPrimaryService, - primary); - keyChangeListSetValue(keys, S_state_global_ipv6, dict); - CFRelease(dict); -#if !TARGET_IPHONE_SIMULATOR -#ifdef RTF_IFSCOPE - if (S_scopedroute_v6) { - set_ipv6_default_interface(ifn_p); - } else -#endif /* RTF_IFSCOPE */ - { /* route add default ... */ - struct in6_addr router; + CFRelease(key); + + /* Check for the v6 reachability flags */ + key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, + kSCDynamicStoreDomainSetup, + service_id, + kSCEntNetIPv6); + + if (CFDictionaryContainsKey(services_info, key)) { + *reach_flags_v6 |= flags; + my_log(LOG_DEBUG, "Service %@ setting ipv6 reach flags: %d", service_id, *reach_flags_v6); + } + CFRelease(key); - (void)cfstring_to_ip6(val_router, &router); - set_ipv6_router(&router, ifn_p, is_direct); + if (flags != 0) { + if (components != NULL) { + CFRelease(components); + } + goto done; + } } -#endif /* !TARGET_IPHONE_SIMULATOR */ - } - else { - keyChangeListRemoveValue(keys, S_state_global_ipv6); -#if !TARGET_IPHONE_SIMULATOR -#ifdef RTF_IFSCOPE - if (S_scopedroute_v6) { - set_ipv6_default_interface(NULL); - } else -#endif /* RTF_IFSCOPE */ - { /* route delete default ... */ - set_ipv6_router(NULL, NULL, FALSE); +skip: + if (components != NULL) { + CFRelease(components); } -#endif /* !TARGET_IPHONE_SIMULATOR */ } +done: + CFRelease(vif_setup_keys); return; } -static Boolean -update_dns(CFDictionaryRef services_info, - CFStringRef primary, - keyChangeListRef keys) +static SCNetworkReachabilityFlags +GetReachFlagsFromStatus(CFStringRef entity, int status) { - Boolean changed = FALSE; - CFDictionaryRef dict = NULL; - - if (primary != NULL) { - CFDictionaryRef service_dict; + SCNetworkReachabilityFlags flags = 0; - service_dict = CFDictionaryGetValue(S_service_state_dict, primary); - if (service_dict != NULL) { - dict = CFDictionaryGetValue(service_dict, kSCEntNetDNS); + if (CFEqual(entity, kSCEntNetPPP)) { + switch (status) { + case PPP_RUNNING : + /* if we're really UP and RUNNING */ + break; + case PPP_ONHOLD : + /* if we're effectively UP and RUNNING */ + break; + case PPP_IDLE : + /* if we're not connected at all */ + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; + case PPP_STATERESERVED : + // if we're not connected at all + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; + default : + /* if we're in the process of [dis]connecting */ + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; + } + } + else if (CFEqual(entity, kSCEntNetIPSec)) { + switch (status) { + case IPSEC_RUNNING : + /* if we're really UP and RUNNING */ + break; + case IPSEC_IDLE : + /* if we're not connected at all */ + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; + default : + /* if we're in the process of [dis]connecting */ + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; + } + } + else if (CFEqual(entity, kSCEntNetVPN)) { + switch (status) { + case VPN_RUNNING : + /* if we're really UP and RUNNING */ + break; + case VPN_IDLE : + case VPN_LOADING : + case VPN_LOADED : + case VPN_UNLOADING : + /* if we're not connected at all */ + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; + default : + /* if we're in the process of [dis]connecting */ + flags |= kSCNetworkReachabilityFlagsConnectionRequired; + break; } } + return (flags); +} - if (!_SC_CFEqual(S_dns_dict, dict)) { - if (dict == NULL) { -#if !TARGET_OS_IPHONE - empty_dns(); -#endif /* !TARGET_OS_IPHONE */ - keyChangeListRemoveValue(keys, S_state_global_dns); - } else { - CFMutableDictionaryRef new_dict; +static void +VPNAttributesGet(CFStringRef service_id, + CFDictionaryRef services_info, + SCNetworkReachabilityFlags *flags, + CFStringRef *server_address, + int af) +{ + int i; + CFDictionaryRef entity_dict; + CFNumberRef num; + CFDictionaryRef p_state = NULL; + int status = 0; + CFStringRef transient_entity = NULL; -#if !TARGET_OS_IPHONE - set_dns(CFDictionaryGetValue(dict, kSCPropNetDNSSearchDomains), - CFDictionaryGetValue(dict, kSCPropNetDNSDomainName), - CFDictionaryGetValue(dict, kSCPropNetDNSServerAddresses), - CFDictionaryGetValue(dict, kSCPropNetDNSSortList)); -#endif /* !TARGET_OS_IPHONE */ - new_dict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - CFDictionaryRemoveValue(new_dict, kSCPropInterfaceName); - CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSupplementalMatchDomains); - CFDictionaryRemoveValue(new_dict, kSCPropNetDNSSupplementalMatchOrders); - CFDictionaryRemoveValue(new_dict, DNS_CONFIGURATION_SCOPED_QUERY_KEY); - keyChangeListSetValue(keys, S_state_global_dns, new_dict); - CFRelease(new_dict); - } - changed = TRUE; + if (af == AF_INET) { + entity_dict = service_dict_get(service_id, kSCEntNetIPv4); + } + else { + entity_dict = service_dict_get(service_id, kSCEntNetIPv6); + } + entity_dict = ipdict_get_service(entity_dict); + if (entity_dict == NULL) { + return; } - if (dict != NULL) CFRetain(dict); - if (S_dns_dict != NULL) CFRelease(S_dns_dict); - S_dns_dict = dict; + for (i = 0; i < countof(transientServiceInfo); i++) { + CFStringRef entity = *transientServiceInfo[i].entityName; - return changed; -} + p_state = service_dict_get(service_id, entity); -static Boolean -update_dnsinfo(CFDictionaryRef services_info, - CFStringRef primary, - keyChangeListRef keys, - CFArrayRef service_order) -{ - Boolean changed; - CFDictionaryRef dict = NULL; - CFArrayRef multicastResolvers; - CFArrayRef privateResolvers; + /* ensure that this is a VPN Type service */ + if (isA_CFDictionary(p_state)) { + transient_entity = entity; + break; + } + } - multicastResolvers = CFDictionaryGetValue(services_info, S_multicast_resolvers); - privateResolvers = CFDictionaryGetValue(services_info, S_private_resolvers); + /* Did we find a vpn type service? If not, we are done.*/ + if (transient_entity == NULL) { + return; + } - if (primary != NULL) { - CFDictionaryRef service_dict; + *flags |= (kSCNetworkReachabilityFlagsReachable + | kSCNetworkReachabilityFlagsTransientConnection); - service_dict = CFDictionaryGetValue(S_service_state_dict, primary); - if (service_dict != NULL) { - dict = CFDictionaryGetValue(service_dict, kSCEntNetDNS); + /* Get the Server Address */ + if (server_address != NULL) { + *server_address = CFDictionaryGetValue(entity_dict, + CFSTR("ServerAddress")); + *server_address = isA_CFString(*server_address); + if (*server_address != NULL) { + CFRetain(*server_address); } } - changed = dns_configuration_set(dict, - S_service_state_dict, - service_order, - multicastResolvers, - privateResolvers); - if (changed) { - keyChangeListNotifyKey(keys, S_state_global_dns); + /* get status */ + if (!CFDictionaryGetValueIfPresent(p_state, + kSCPropNetVPNStatus, // IPSecStatus, PPPStatus, VPNStatus + (const void **)&num) || + !isA_CFNumber(num) || + !CFNumberGetValue(num, kCFNumberSInt32Type, &status)) { + return; } - return changed; + + *flags |= GetReachFlagsFromStatus(transient_entity, status); + if (CFEqual(transient_entity, kSCEntNetPPP)) { + CFStringRef key; + CFDictionaryRef p_setup; + int ppp_demand; + + key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, + kSCDynamicStoreDomainSetup, + service_id, + kSCEntNetPPP); + p_setup = CFDictionaryGetValue(services_info, key); + CFRelease(key); + + /* get dial-on-traffic status */ + if (isA_CFDictionary(p_setup) && + CFDictionaryGetValueIfPresent(p_setup, + kSCPropNetPPPDialOnDemand, + (const void **)&num) && + isA_CFNumber(num) && + CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand) && + (ppp_demand != 0)) { + *flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; + if (status == PPP_IDLE) { + *flags |= kSCNetworkReachabilityFlagsInterventionRequired; + } + } + } + return; } -static Boolean -update_nwi(nwi_state_t state) + +typedef struct ElectionInfo { + int af; + CFStringRef entity; + int n_services; + CFArrayRef order; + int n_order; + ElectionResultsRef results; + CFMutableDictionaryRef rank_dict; +} ElectionInfo, * ElectionInfoRef; + +typedef CFDictionaryApplierFunction ElectionFuncRef; + +static void +CandidateRelease(CandidateRef candidate) { - unsigned char signature[CC_SHA1_DIGEST_LENGTH]; - static unsigned char signature_last[CC_SHA1_DIGEST_LENGTH]; + my_CFRelease(&candidate->serviceID); + my_CFRelease(&candidate->if_name); + my_CFRelease(&candidate->signature); + return; +} - _nwi_state_signature(state, signature, sizeof(signature)); - if (bcmp(signature, signature_last, sizeof(signature)) == 0) { - return FALSE; +static void +CandidateCopy(CandidateRef dest, CandidateRef src) +{ + *dest = *src; + if (dest->serviceID) { + CFRetain(dest->serviceID); } - - // save [new] signature - bcopy(signature, signature_last, sizeof(signature)); - - // save [new] configuration - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, "Updating network information"); - S_nwi_state_dump(state); + if (dest->if_name) { + CFRetain(dest->if_name); } - if (_nwi_state_store(state) == FALSE) { - my_log(LOG_ERR, "Notifying nwi_state_store failed"); + if(dest->signature) { + CFRetain(dest->signature); } - - return TRUE; + return; } -static Boolean -update_proxies(CFDictionaryRef services_info, - CFStringRef primary, - keyChangeListRef keys, - CFArrayRef service_order) +static ElectionResultsRef +ElectionResultsAlloc(int af, int size) { - Boolean changed = FALSE; - CFDictionaryRef dict = NULL; - CFDictionaryRef new_dict; + ElectionResultsRef results; - if (primary != NULL) { - CFDictionaryRef service_dict; + results = (ElectionResultsRef)malloc(ElectionResultsComputeSize(size)); + results->af = af; + results->count = 0; + results->size = size; + return (results); +} - service_dict = CFDictionaryGetValue(S_service_state_dict, primary); - if (service_dict != NULL) { - dict = CFDictionaryGetValue(service_dict, kSCEntNetProxies); - } - } +static void +ElectionResultsRelease(ElectionResultsRef results) +{ + int i; + CandidateRef scan; - new_dict = proxy_configuration_update(dict, - S_service_state_dict, - service_order, - services_info); - if (!_SC_CFEqual(S_proxies_dict, new_dict)) { - if (new_dict == NULL) { - keyChangeListRemoveValue(keys, S_state_global_proxies); - } else { - keyChangeListSetValue(keys, S_state_global_proxies, new_dict); - } - changed = TRUE; + for (i = 0, scan = results->candidates; + i < results->count; + i++, scan++) { + CandidateRelease(scan); } - - if (S_proxies_dict != NULL) CFRelease(S_proxies_dict); - S_proxies_dict = new_dict; - - return changed; + free(results); + return; } -#if !TARGET_OS_IPHONE -static Boolean -update_smb(CFDictionaryRef services_info, - CFStringRef primary, - keyChangeListRef keys) +static void +ElectionResultsLog(int level, ElectionResultsRef results, const char * prefix) { - Boolean changed = FALSE; - CFDictionaryRef dict = NULL; - - if (primary != NULL) { - CFDictionaryRef service_dict; + int i; + CandidateRef scan; - service_dict = CFDictionaryGetValue(S_service_state_dict, primary); - if (service_dict != NULL) { - dict = CFDictionaryGetValue(service_dict, kSCEntNetSMB); - } + if (results == NULL) { + my_log(level, "%s: no candidates", prefix); + return; } + my_log(level, "%s: %d candidates", prefix, results->count); + for (i = 0, scan = results->candidates; + i < results->count; + i++, scan++) { + char ntopbuf[INET6_ADDRSTRLEN]; - if (!_SC_CFEqual(S_smb_dict, dict)) { - if (dict == NULL) { - keyChangeListRemoveValue(keys, S_state_global_smb); - } else { - keyChangeListSetValue(keys, S_state_global_smb, dict); - } - changed = TRUE; + (void)inet_ntop(results->af, &scan->addr, ntopbuf, sizeof(ntopbuf)); + my_log(level, "%d. %@ serviceID=%@ addr=%s rank=0x%x", + i, scan->if_name, scan->serviceID, ntopbuf, scan->rank); } - - if (dict != NULL) CFRetain(dict); - if (S_smb_dict != NULL) CFRelease(S_smb_dict); - S_smb_dict = dict; - - return changed; + return; } -#endif /* !TARGET_OS_IPHONE */ -static Rank -get_service_rank(CFArrayRef order, int n_order, CFStringRef serviceID) +/* + * Function: ElectionResultsAddCandidate + * Purpose: + * Add the candidate into the election results. Find the insertion point + * by comparing the rank of the candidate with existing entries. + */ +static void +ElectionResultsAddCandidate(ElectionResultsRef results, CandidateRef candidate) { CFIndex i; - Rank rank = kRankIndexMask; + CFIndex where; - if (serviceID != NULL && order != NULL && n_order > 0) { - for (i = 0; i < n_order; i++) { - CFStringRef s = isA_CFString(CFArrayGetValueAtIndex(order, i)); + if (results->count == results->size) { + /* this should not happen */ + my_log(LOG_NOTICE, "can't fit another candidate"); + return; + } - if (s == NULL) { - continue; - } - if (CFEqual(serviceID, s)) { - rank = i + 1; - break; - } + /* find the insertion point */ + where = kCFNotFound; + for (i = 0; i < results->count; i++) { + CandidateRef this_candidate = results->candidates + i; + + if (candidate->rank < this_candidate->rank) { + where = i; + break; } } - return (rank); + /* add it to the end */ + if (where == kCFNotFound) { + CandidateCopy(results->candidates + results->count, candidate); + results->count++; + return; + } + /* slide existing entries over */ + for (i = results->count; i > where; i--) { + results->candidates[i] = results->candidates[i - 1]; + } + /* insert element */ + CandidateCopy(results->candidates + where, candidate); + results->count++; + return; } -/** - ** Service election: - **/ +static void +elect_ip(const void * key, const void * value, void * context); + /* - * Function: rank_dict_get_service_rank + * Function: ElectionResultsCopy * Purpose: - * Retrieve the service rank in the given dictionary. + * Visit all of the services and invoke the protocol-specific election + * function. Return the results of the election. */ -static Rank -rank_dict_get_service_rank(CFDictionaryRef rank_dict, CFStringRef serviceID) +static ElectionResultsRef +ElectionResultsCopy(int af, CFArrayRef order, int n_order) { - CFNumberRef rank; - Rank rank_val = RankMake(kRankIndexMask, kRankAssertionDefault); + int count; + ElectionInfo info; - rank = CFDictionaryGetValue(rank_dict, serviceID); - if (rank != NULL) { - CFNumberGetValue(rank, kCFNumberSInt32Type, &rank_val); + count = (int)CFDictionaryGetCount(S_service_state_dict); + if (count == 0) { + return (NULL); } - return (rank_val); + info.af = af; + if (af == AF_INET) { + info.entity = kSCEntNetIPv4; + info.rank_dict = S_ipv4_service_rank_dict; + } + else { + info.entity = kSCEntNetIPv6; + info.rank_dict = S_ipv6_service_rank_dict; + } + info.results = ElectionResultsAlloc(af, count); + info.n_services = count; + info.order = order; + info.n_order = n_order; + CFDictionaryApplyFunction(S_service_state_dict, elect_ip, (void *)&info); + if (info.results->count == 0) { + ElectionResultsRelease(info.results); + info.results = NULL; + } + return (info.results); } /* - * Function: rank_dict_set_service_rank + * Function: ElectionResultsCandidateNeedsDemotion * Purpose: - * Save the results of ranking the service so we can look it up later without - * repeating all of the ranking code. + * Check whether the given candidate requires demotion. A candidate + * might need to be demoted if its IPv4 and IPv6 services must be coupled + * but a higher ranked service has IPv4 or IPv6. */ -static void -rank_dict_set_service_rank(CFMutableDictionaryRef rank_dict, - CFStringRef serviceID, Rank rank_val) +static Boolean +ElectionResultsCandidateNeedsDemotion(ElectionResultsRef other_results, + CandidateRef candidate) { - CFNumberRef rank; + CandidateRef other_candidate; + Boolean ret = FALSE; - rank = CFNumberCreate(NULL, kCFNumberSInt32Type, (const void *)&rank_val); - if (rank != NULL) { - CFDictionarySetValue(rank_dict, serviceID, rank); - CFRelease(rank); + if (other_results == NULL + || candidate->ip_is_coupled == FALSE + || RANK_ASSERTION_MASK(candidate->rank) == kRankAssertionNever) { + goto done; } - return; -} - -static const CFStringRef *transientInterfaceEntityNames[] = { - &kSCEntNetPPP, -}; - - -static void -CollectTransientServices(const void * key, - const void * value, - void * context) -{ - int i; - CFStringRef service = key; - CFMutableArrayRef vif_setup_keys = context; - - /* This service is either a vpn type service or a comm center service */ - if (!CFStringHasPrefix(service, kSCDynamicStoreDomainSetup)) { - return; + other_candidate = other_results->candidates; + if (CFEqual(other_candidate->if_name, candidate->if_name)) { + /* they are over the same interface, no need to demote */ + goto done; + } + if (CFStringHasPrefix(other_candidate->if_name, CFSTR("stf"))) { + /* avoid creating a feedback loop */ + goto done; + } + if (RANK_ASSERTION_MASK(other_candidate->rank) == kRankAssertionNever) { + /* the other candidate isn't eligible to become primary, ignore */ + goto done; + } + if (candidate->rank < other_candidate->rank) { + /* we're higher ranked than the other candidate, ignore */ + goto done; } + ret = TRUE; - for (i = 0; i < sizeof(transientInterfaceEntityNames)/sizeof(transientInterfaceEntityNames[0]); i++) { - if (!CFStringHasSuffix(service, *transientInterfaceEntityNames[i])) { - continue; - } + done: + return (ret); - CFArrayAppendValue(vif_setup_keys, service); - } - return; } -static SCNetworkReachabilityFlags -GetReachabilityFlagsFromVPN(CFDictionaryRef services_info, - CFStringRef service_id, - CFStringRef entity, - CFStringRef vpn_setup_key) +static void +get_signature_sha1(CFStringRef signature, + unsigned char * sha1) { - CFStringRef key; - CFDictionaryRef dict; - SCNetworkReachabilityFlags flags = 0; - + CC_SHA1_CTX ctx; + CFDataRef signature_data; - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service_id, - kSCEntNetInterface); - dict = CFDictionaryGetValue(services_info, key); - CFRelease(key); + signature_data = CFStringCreateExternalRepresentation(NULL, + signature, + kCFStringEncodingUTF8, + 0); - if (isA_CFDictionary(dict) - && CFDictionaryContainsKey(dict, kSCPropNetInterfaceDeviceName)) { + CC_SHA1_Init(&ctx); + CC_SHA1_Update(&ctx, + signature_data, + (CC_LONG)CFDataGetLength(signature_data)); + CC_SHA1_Final(sha1, &ctx); - flags = (kSCNetworkReachabilityFlagsReachable - | kSCNetworkReachabilityFlagsTransientConnection - | kSCNetworkReachabilityFlagsConnectionRequired); + CFRelease(signature_data); - if (CFEqual(entity, kSCEntNetPPP)) { - CFNumberRef num; - CFDictionaryRef p_dict = CFDictionaryGetValue(services_info, vpn_setup_key); + return; +} - if (!isA_CFDictionary(p_dict)) { - return (flags); - } - // get PPP dial-on-traffic status - num = CFDictionaryGetValue(p_dict, kSCPropNetPPPDialOnDemand); - if (isA_CFNumber(num)) { - int32_t ppp_demand; +static void +add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, + CandidateRef candidate, Rank rank) +{ + uint64_t flags = 0; + char ifname[IFNAMSIZ]; + nwi_ifstate_t ifstate; - if (CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand)) { - if (ppp_demand) { - flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; - } - } - } - } + if (nwi_state == NULL) { + /* can't happen */ + return; } - return (flags); -} - -static Boolean -S_dict_get_boolean(CFDictionaryRef dict, CFStringRef key, Boolean def_value) -{ - Boolean ret = def_value; + if (RANK_ASSERTION_MASK(rank) == kRankAssertionNever) { + flags |= NWI_IFSTATE_FLAGS_NOT_IN_LIST; + } + if (service_dict_get(candidate->serviceID, kSCEntNetDNS) != NULL) { + flags |= NWI_IFSTATE_FLAGS_HAS_DNS; + } + CFStringGetCString(candidate->if_name, ifname, sizeof(ifname), + kCFStringEncodingASCII); + if ((S_IPMonitor_debug & kDebugFlag2) != 0) { + char ntopbuf[INET6_ADDRSTRLEN]; - if (dict != NULL) { - CFBooleanRef val; + (void)inet_ntop(af, &candidate->addr, ntopbuf, sizeof(ntopbuf)); + my_log(LOG_DEBUG, + "Inserting IPv%c [%s] %s " + "with flags 0x%llx rank 0x%x reach_flags 0x%x", + ipvx_char(af), ifname, ntopbuf, + flags, rank, candidate->reachability_flags); + } + ifstate = nwi_insert_ifstate(nwi_state, ifname, af, flags, rank, + (void *)&candidate->addr, + (void *)&candidate->vpn_server_addr, + candidate->reachability_flags); + if (ifstate != NULL && candidate->signature) { + uint8_t hash[CC_SHA1_DIGEST_LENGTH]; - val = CFDictionaryGetValue(dict, key); - if (isA_CFBoolean(val) != NULL) { - ret = CFBooleanGetValue(val); - } + get_signature_sha1(candidate->signature, hash); + nwi_ifstate_set_signature(ifstate, hash); } - return (ret); + return; } static void -GetReachabilityFlagsFromTransientServices(CFDictionaryRef services_info, - SCNetworkReachabilityFlags *reach_flags_v4, - SCNetworkReachabilityFlags *reach_flags_v6) +add_reachability_flags_to_candidate(CandidateRef candidate, CFDictionaryRef services_info, int af) { - int i; - int count; - CFMutableArrayRef vif_setup_keys; - - vif_setup_keys = CFArrayCreateMutable(NULL, - 0, - &kCFTypeArrayCallBacks); - - CFDictionaryApplyFunction(services_info, CollectTransientServices, vif_setup_keys); + SCNetworkReachabilityFlags flags = kSCNetworkReachabilityFlagsReachable; + CFStringRef vpn_server_address = NULL; - count = CFArrayGetCount(vif_setup_keys); + VPNAttributesGet(candidate->serviceID, + services_info, + &flags, + &vpn_server_address, + af); - if (count != 0) { - my_log(LOG_DEBUG, "Collected the following VIF Setup Keys: %@", vif_setup_keys); - } + candidate->reachability_flags = flags; - for (i = 0; i < count; i++) { - CFArrayRef components = NULL; - CFStringRef entity; - CFStringRef service_id; - CFStringRef vif_setup_key; + if (vpn_server_address == NULL) { + bzero(&candidate->vpn_server_addr, sizeof(candidate->vpn_server_addr)); + } else { + char buf[128]; - vif_setup_key = CFArrayGetValueAtIndex(vif_setup_keys, i); + CFStringGetCString(vpn_server_address, buf, sizeof(buf), + kCFStringEncodingASCII); + _SC_string_to_sockaddr(buf, + AF_UNSPEC, + (void *)&candidate->vpn_server_addr, + sizeof(candidate->vpn_server_addr)); - /* - * setup key in the following format: - * Setup:/Network/Service// - */ - components = CFStringCreateArrayBySeparatingStrings(NULL, vif_setup_key, CFSTR("/")); + CFRelease(vpn_server_address); + } + return; +} +/* + * Function: ElectionResultsCopyPrimary + * Purpose: + * Use the results of the current protocol and the other protocol to + * determine which service should become primary. + * + * At the same time, generate the IPv4/IPv6 routing table and + * the nwi_state for the protocol. + */ +static CFStringRef +ElectionResultsCopyPrimary(ElectionResultsRef results, + ElectionResultsRef other_results, + nwi_state_t nwi_state, int af, + RouteListRef * ret_routes, + CFDictionaryRef services_info) +{ + CFStringRef primary = NULL; + Boolean primary_is_null = FALSE; + RouteListRef routes = NULL; - if (CFArrayGetCount(components) != 5) { - my_log(LOG_ERR, "Invalid Setup Key encountered: %@", vif_setup_key); - goto skip; + if (nwi_state != NULL) { + nwi_state_clear(nwi_state, af); + } + if (results != NULL) { + CandidateRef deferred[results->count]; + int deferred_count; + CFStringRef entity_name; + int i; + int initial_size; + RouteListInfoRef info; + CandidateRef scan; + + switch (af) { + case AF_INET: + entity_name = kSCEntNetIPv4; + info = &IPv4RouteListInfo; + initial_size = results->count * IPV4_ROUTES_N_STATIC; + break; + default: + case AF_INET6: + entity_name = kSCEntNetIPv6; + info = &IPv6RouteListInfo; + initial_size = results->count * IPV6_ROUTES_N_STATIC; + break; } + deferred_count = 0; + for (i = 0, scan = results->candidates; + i < results->count; + i++, scan++) { + Boolean is_primary = FALSE; + Rank rank = scan->rank; + CFDictionaryRef service_dict; + RouteListRef service_routes; + Boolean skip = FALSE; - /* service id is the 3rd element */ - service_id = CFArrayGetValueAtIndex(components, 3); - - /* entity id is the 4th element */ - entity = CFArrayGetValueAtIndex(components, 4); - - my_log(LOG_DEBUG, "Service %@ is a %@ Entity", service_id, entity); - - - if (CFEqual(entity, kSCEntNetPPP)) { - SCNetworkReachabilityFlags flags; - CFStringRef key; - - flags = GetReachabilityFlagsFromVPN(services_info, - service_id, - entity, - vif_setup_key); - - /* Check for the v4 reachability flags */ - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service_id, - kSCEntNetIPv4); - - if (CFDictionaryContainsKey(services_info, key)) { - *reach_flags_v4 |= flags; - my_log(LOG_DEBUG,"Service %@ setting ipv4 reach flags: %d", service_id, *reach_flags_v4); + if (primary == NULL + && RANK_ASSERTION_MASK(rank) != kRankAssertionNever) { + if (ElectionResultsCandidateNeedsDemotion(other_results, + scan)) { + /* demote to RankNever */ + my_log(LOG_NOTICE, + "IPv%c over %@ demoted: not primary for IPv%c", + ipvx_char(af), scan->if_name, ipvx_other_char(af)); + rank = RankMake(rank, kRankAssertionNever); + deferred[deferred_count++] = scan; + skip = TRUE; + } + else { + primary = CFRetain(scan->serviceID); + is_primary = TRUE; + } } - - CFRelease(key); - - /* Check for the v6 reachability flags */ - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service_id, - kSCEntNetIPv6); - - if (CFDictionaryContainsKey(services_info, key)) { - *reach_flags_v6 |= flags; - my_log(LOG_DEBUG,"Service %@ setting ipv6 reach flags: %d", service_id, *reach_flags_v6); + /* contribute to the routing table */ + service_dict = service_dict_get(scan->serviceID, entity_name); + service_routes = ipdict_get_routelist(service_dict); + if (service_routes != NULL) { + routes = RouteListAddRouteList(info, routes, initial_size, + service_routes, rank); + if ((service_routes->flags & kRouteListFlagsExcludeNWI) != 0) { + skip = TRUE; + } } - CFRelease(key); - - if (flags != 0) { - if (components != NULL) { - CFRelease(components); + else { + skip = TRUE; + } + if (skip) { + /* if we're skipping the primary, it's NULL */ + if (is_primary) { + primary_is_null = TRUE; } - goto done; + } + else { + if (primary_is_null) { + /* everything after the primary must be Never */ + rank = RankMake(rank, kRankAssertionNever); + } + add_reachability_flags_to_candidate(scan, services_info, af); + add_candidate_to_nwi_state(nwi_state, af, scan, rank); } } -skip: - if (components != NULL) { - CFRelease(components); + for (i = 0; i < deferred_count; i++) { + CandidateRef candidate = deferred[i]; + Rank rank; + + /* demote to RankNever */ + rank = RankMake(candidate->rank, kRankAssertionNever); + add_reachability_flags_to_candidate(candidate, services_info, af); + add_candidate_to_nwi_state(nwi_state, af, candidate, rank); } } -done: - CFRelease(vif_setup_keys); - return; + if (nwi_state != NULL) { + nwi_state_set_last(nwi_state, af); + } + if (ret_routes != NULL) { + *ret_routes = routes; + } + else if (routes != NULL) { + free(routes); + } + if (primary_is_null) { + my_CFRelease(&primary); + } + return (primary); } -static SCNetworkReachabilityFlags -GetReachFlagsFromStatus(CFStringRef entity, int status) + +static inline +CFStringRef +service_dict_get_signature(CFDictionaryRef service_dict) { - SCNetworkReachabilityFlags flags = 0; + CFStringRef ifname; - if (CFEqual(entity, kSCEntNetPPP)) { - switch (status) { - case PPP_RUNNING : - /* if we're really UP and RUNNING */ - break; - case PPP_ONHOLD : - /* if we're effectively UP and RUNNING */ - break; - case PPP_IDLE : - /* if we're not connected at all */ - my_log(LOG_INFO, "PPP link idle"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - case PPP_STATERESERVED : - // if we're not connected at all - my_log(LOG_INFO, "PPP link idle, dial-on-traffic to connect"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - default : - /* if we're in the process of [dis]connecting */ - my_log(LOG_INFO, "PPP link, connection in progress"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - } - } -#ifdef HAVE_IPSEC_STATUS - else if (CFEqual(entity, kSCEntNetIPSec)) { - switch (status) { - case IPSEC_RUNNING : - /* if we're really UP and RUNNING */ - break; - case IPSEC_IDLE : - /* if we're not connected at all */ - my_log(LOG_INFO, "IPSec link idle"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - default : - /* if we're in the process of [dis]connecting */ - my_log(LOG_INFO, "IPSec link, connection in progress"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - } - } -#endif // HAVE_IPSEC_STATUS -#ifdef HAVE_VPN_STATUS - else if (CFEqual(entity, kSCEntNetVPN)) { - switch (status) { - case VPN_RUNNING : - /* if we're really UP and RUNNING */ - break; - case VPN_IDLE : - case VPN_LOADING : - case VPN_LOADED : - case VPN_UNLOADING : - /* if we're not connected at all */ - my_log(LOG_INFO, "%s VPN link idle"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - default : - /* if we're in the process of [dis]connecting */ - my_log(LOG_INFO, "VPN link, connection in progress"); - flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - } + ifname = CFDictionaryGetValue(service_dict, kSCPropInterfaceName); + if (isA_CFString(ifname) == NULL + || confirm_interface_name(service_dict, ifname) == FALSE) { + return (NULL); } -#endif // HAVE_VPN_STATUS - return (flags); + return (CFDictionaryGetValue(service_dict, kStoreKeyNetworkSignature)); } +/* + * Function: elect_ip + * Purpose: + * Evaluate the service and determine what rank the service should have. + * If it's a suitable candidate, add it to the election results. + */ static void -VPNAttributesGet(CFStringRef service_id, - CFDictionaryRef services_info, - SCNetworkReachabilityFlags *flags, - CFStringRef *server_address, - int af) +elect_ip(const void * key, const void * value, void * context) { - int i; - CFDictionaryRef entity_dict; - boolean_t found = FALSE; - CFNumberRef num; - CFDictionaryRef p_state = NULL; - int status = 0; + CFDictionaryRef all_entities_dict = (CFDictionaryRef)value; + Candidate candidate; + Rank default_rank; + ElectionInfoRef elect_info; + CFStringRef if_name; + CFDictionaryRef ipdict; + Rank primary_rank; + RouteListUnion routelist; + CFDictionaryRef service_dict; - /* if the IPv[4/6] exist */ - entity_dict = service_dict_get(service_id, (af == AF_INET) ? kSCEntNetIPv4 : kSCEntNetIPv6); - if (!isA_CFDictionary(entity_dict)) { - return; + elect_info = (ElectionInfoRef)context; + ipdict = CFDictionaryGetValue(all_entities_dict, elect_info->entity); + if (ipdict != NULL) { + routelist.ptr = ipdict_get_routelist(ipdict); + service_dict = ipdict_get_service(ipdict); } - - if (af == AF_INET) { - entity_dict = CFDictionaryGetValue(entity_dict, kIPv4DictService); - if (!isA_CFDictionary(entity_dict)) { - return; - } + else { + routelist.ptr = NULL; } - - for (i = 0; i < sizeof(statusEntityNames)/sizeof(statusEntityNames[0]); i++) { - p_state = service_dict_get(service_id, *statusEntityNames[i]); - /* ensure that this is a VPN Type service */ - if (isA_CFDictionary(p_state)) { - found = TRUE; - break; - } + if (routelist.ptr == NULL || service_dict == NULL) { + /* no connectivity */ + return; } - - /* Did we find a vpn type service? If not, we are done.*/ - if (!found) { + if ((routelist.common->flags & kRouteListFlagsHasDefault) == 0) { + /* no default route, not a candidate for being primary */ return; } - - *flags |= (kSCNetworkReachabilityFlagsReachable| kSCNetworkReachabilityFlagsTransientConnection); - - /* Get the Server Address */ - if (server_address != NULL) { - *server_address = CFDictionaryGetValue(entity_dict, CFSTR("ServerAddress")); - *server_address = isA_CFString(*server_address); - if (*server_address != NULL) { - CFRetain(*server_address); - } + if_name = CFDictionaryGetValue(service_dict, kSCPropInterfaceName); + if (if_name == NULL) { + /* need an interface name */ + return; } - - /* get status */ - if (!CFDictionaryGetValueIfPresent(p_state, - kSCPropNetVPNStatus, - (const void **)&num) || - !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &status)) { + if (CFEqual(if_name, CFSTR(kLoopbackInterface))) { + /* don't process loopback */ return; } + bzero(&candidate, sizeof(candidate)); + candidate.serviceID = (CFStringRef)key; + candidate.rank = get_service_rank(elect_info->order, elect_info->n_order, + candidate.serviceID); + if (elect_info->af == AF_INET) { + default_rank = routelist.v4->list->rank; + candidate.addr.v4 = routelist.v4->list->ifa; + } + else { + default_rank = routelist.v6->list->rank; + candidate.addr.v6 = routelist.v6->list->ifa; + } + primary_rank = RANK_ASSERTION_MASK(default_rank); + if (S_ppp_override_primary) { + char ifn[IFNAMSIZ]; - *flags |= GetReachFlagsFromStatus(*statusEntityNames[i], status); - - if (CFEqual(*statusEntityNames[i], kSCEntNetPPP)) { - CFStringRef key; - CFDictionaryRef p_setup; - int ppp_demand; - - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service_id, - kSCEntNetPPP); - p_setup = CFDictionaryGetValue(services_info, key); - CFRelease(key); - - /* get dial-on-traffic status */ - if (isA_CFDictionary(p_setup) && - CFDictionaryGetValueIfPresent(p_setup, - kSCPropNetPPPDialOnDemand, - (const void **)&num) && - isA_CFNumber(num) && - CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand) && - (ppp_demand != 0)) { - *flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; - if (status == PPP_IDLE) { - *flags |= kSCNetworkReachabilityFlagsInterventionRequired; - } + if (CFStringGetCString(if_name, ifn, sizeof(ifn), + kCFStringEncodingASCII) + && (strncmp(PPP_PREFIX, ifn, sizeof(PPP_PREFIX) - 1) == 0)) { + /* PPP override: make ppp* look the best */ + primary_rank = kRankAssertionFirst; } } + candidate.rank = RankMake(candidate.rank, primary_rank); + candidate.ip_is_coupled = service_get_ip_is_coupled(candidate.serviceID); + candidate.if_name = if_name; + rank_dict_set_service_rank(elect_info->rank_dict, + candidate.serviceID, candidate.rank); + candidate.signature = service_dict_get_signature(service_dict); + ElectionResultsAddCandidate(elect_info->results, &candidate); return; } -typedef struct ElectionInfo { - int n_services; - CFArrayRef order; - int n_order; - ElectionResultsRef results; -} ElectionInfo, * ElectionInfoRef; - -typedef CFDictionaryApplierFunction ElectionFuncRef; - -static void -CandidateRelease(CandidateRef candidate) +static uint32_t +service_changed(CFDictionaryRef services_info, CFStringRef serviceID) { - my_CFRelease(&candidate->serviceID); - my_CFRelease(&candidate->if_name); - my_CFRelease(&candidate->signature); - return; -} + uint32_t changed = 0; + int i; -static void -CandidateCopy(CandidateRef dest, CandidateRef src) -{ - *dest = *src; - if (dest->serviceID) { - CFRetain(dest->serviceID); + /* update service options first (e.g. rank) */ + if (get_rank_changes(serviceID, + get_service_state_entity(services_info, serviceID, + NULL), + get_service_setup_entity(services_info, serviceID, + NULL), + services_info)) { + changed |= (1 << kEntityTypeServiceOptions); } - if (dest->if_name) { - CFRetain(dest->if_name); + /* update IPv4, IPv6, DNS, Proxies, SMB, ... */ + for (i = 0; i < ENTITY_TYPES_COUNT; i++) { + GetEntityChangesFuncRef func = entityChangeFunc[i]; + if ((*func)(serviceID, + get_service_state_entity(services_info, serviceID, + *entityTypeNames[i]), + get_service_setup_entity(services_info, serviceID, + *entityTypeNames[i]), + services_info)) { + changed |= (1 << i); + } } - if(dest->signature) { - CFRetain(dest->signature); + + if (get_transient_status_changes(serviceID, services_info)) { + changed |= (1 << kEntityTypeTransientStatus); } - return; + + return (changed); } -static ElectionResultsRef -ElectionResultsAlloc(int size) +static CFArrayRef +service_order_get(CFDictionaryRef services_info) { - ElectionResultsRef results; + CFArrayRef order = NULL; + CFDictionaryRef ipv4_dict; - results = (ElectionResultsRef)malloc(ElectionResultsComputeSize(size)); - results->count = 0; - results->size = size; - return (results); + ipv4_dict = my_CFDictionaryGetDictionary(services_info, + S_setup_global_ipv4); + if (ipv4_dict != NULL) { + CFNumberRef ppp_override; + int ppp_val = 0; + + order = CFDictionaryGetValue(ipv4_dict, kSCPropNetServiceOrder); + order = isA_CFArray(order); + + /* get ppp override primary */ + ppp_override = CFDictionaryGetValue(ipv4_dict, + kSCPropNetPPPOverridePrimary); + ppp_override = isA_CFNumber(ppp_override); + if (ppp_override != NULL) { + CFNumberGetValue(ppp_override, kCFNumberIntType, &ppp_val); + } + S_ppp_override_primary = (ppp_val != 0) ? TRUE : FALSE; + } + else { + S_ppp_override_primary = FALSE; + } + return (order); } -static void -ElectionResultsRelease(ElectionResultsRef results) +static boolean_t +set_new_primary(CFStringRef * primary_p, CFStringRef new_primary, + const char * entity) { - int i; - CandidateRef scan; + boolean_t changed = FALSE; + CFStringRef primary = *primary_p; - for (i = 0, scan = results->candidates; - i < results->count; - i++, scan++) { - CandidateRelease(scan); + if (new_primary != NULL) { + if (primary != NULL && CFEqual(new_primary, primary)) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: %@ is still primary %s", + new_primary, entity); + } + } + else { + my_CFRelease(primary_p); + *primary_p = CFRetain(new_primary); + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: %@ is the new primary %s", + new_primary, entity); + } + changed = TRUE; + } } - free(results); - return; + else if (primary != NULL) { + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: %@ is no longer primary %s", + primary, entity); + } + my_CFRelease(primary_p); + changed = TRUE; + } + return (changed); } -static void -ElectionResultsLog(int level, ElectionResultsRef results, const char * prefix) +static Rank +rank_service_entity(CFDictionaryRef rank_dict, CFStringRef serviceID, + CFStringRef entity) { - int i; - CandidateRef scan; - - if (results == NULL) { - my_log(level, "%s: no candidates", prefix); - return; - } - my_log(level, "%s: %d candidates", prefix, results->count); - for (i = 0, scan = results->candidates; - i < results->count; - i++, scan++) { - my_log(level, "%d. %@ Rank=0x%x serviceID=%@", i, scan->if_name, - scan->rank, scan->serviceID); + if (service_dict_get(serviceID, entity) == NULL) { + return (RankMake(kRankIndexMask, kRankAssertionDefault)); } - return; + return (rank_dict_get_service_rank(rank_dict, serviceID)); } -/* - * Function: ElectionResultsAddCandidate - * Purpose: - * Add the candidate into the election results. Find the insertion point - * by comparing the rank of the candidate with existing entries. - */ static void -ElectionResultsAddCandidate(ElectionResultsRef results, CandidateRef candidate) +append_serviceIDs_for_interface(CFMutableArrayRef services_changed, + CFStringRef ifname) { - int i; - int where; + CFIndex count; + CFIndex i; + void * * keys; +#define N_KEYS_VALUES_STATIC 10 + void * keys_values_buf[N_KEYS_VALUES_STATIC * 2]; + void * * values; -#define BAD_INDEX (-1) - if (results->count == results->size) { - /* this should not happen */ - my_log(LOG_NOTICE, "can't fit another candidate"); - return; + count = CFDictionaryGetCount(S_service_state_dict); + if (count <= N_KEYS_VALUES_STATIC) { + keys = keys_values_buf; + } else { + keys = (void * *)malloc(sizeof(*keys) * count * 2); } + values = keys + count; + CFDictionaryGetKeysAndValues(S_service_state_dict, + (const void * *)keys, + (const void * *)values); - /* find the insertion point */ - where = BAD_INDEX; - for (i = 0; i < results->count; i++) { - CandidateRef this_candidate = results->candidates + i; + for (i = 0; i < count; i++) { + CFDictionaryRef ipdict = NULL; + CFStringRef interface = NULL; + CFStringRef serviceID; + CFDictionaryRef service_dict; - if (candidate->rank < this_candidate->rank) { - where = i; - break; + serviceID = (CFStringRef)keys[i]; + service_dict = (CFDictionaryRef)values[i]; + + /* check whether service has IPv4 or IPv6 */ + ipdict = CFDictionaryGetValue(service_dict, kSCEntNetIPv4); + if (ipdict == NULL) { + ipdict = CFDictionaryGetValue(service_dict, kSCEntNetIPv6); + if (ipdict == NULL) { + continue; + } + } + interface = ipdict_get_ifname(ipdict); + if (interface != NULL && CFEqual(interface, ifname)) { + if (S_IPMonitor_debug & kDebugFlag1) { + my_log(LOG_DEBUG, + "Found IP service %@ on interface %@.", + serviceID, ifname); + } + my_CFArrayAppendUniqueValue(services_changed, serviceID); } } - /* add it to the end */ - if (where == BAD_INDEX) { - CandidateCopy(results->candidates + results->count, candidate); - results->count++; - return; - } - /* slide existing entries over */ - for (i = results->count; i > where; i--) { - results->candidates[i] = results->candidates[i - 1]; + if (keys != keys_values_buf) { + free(keys); } - /* insert element */ - CandidateCopy(results->candidates + where, candidate); - results->count++; return; } -/* - * Function: ElectionResultsCopy - * Purpose: - * Visit all of the services and invoke the protocol-specific election - * function. Return the results of the election. - */ -static ElectionResultsRef -ElectionResultsCopy(ElectionFuncRef elect_func, CFArrayRef order, int n_order) +static __inline__ const char * +get_changed_str(CFStringRef serviceID, CFStringRef entity, + CFDictionaryRef old_dict) { - int count; - ElectionInfo info; + CFDictionaryRef new_dict = NULL; - count = CFDictionaryGetCount(S_service_state_dict); - if (count == 0) { - return (NULL); + if (serviceID != NULL) { + new_dict = service_dict_get(serviceID, entity); } - info.results = ElectionResultsAlloc(count); - info.n_services = count; - info.order = order; - info.n_order = n_order; - CFDictionaryApplyFunction(S_service_state_dict, elect_func, (void *)&info); - if (info.results->count == 0) { - ElectionResultsRelease(info.results); - info.results = NULL; + + if (old_dict == NULL) { + if (new_dict != NULL) { + return "+"; + } + } else { + if (new_dict == NULL) { + return "-"; + } else if (!CFEqual(old_dict, new_dict)) { + return "!"; + } } - return (info.results); + return ""; } -/* - * Function: ElectionResultsCandidateNeedsDemotion - * Purpose: - * Check whether the given candidate requires demotion. A candidate - * might need to be demoted if its IPv4 and IPv6 services must be coupled - * but a higher ranked service has IPv4 or IPv6. - */ -static Boolean -ElectionResultsCandidateNeedsDemotion(ElectionResultsRef other_results, - CandidateRef candidate) +static CF_RETURNS_RETAINED CFStringRef +generate_log_changes(nwi_state_t changes_state, + boolean_t dns_changed, + boolean_t dnsinfo_changed, + CFDictionaryRef old_primary_dns, + boolean_t proxy_changed, + CFDictionaryRef old_primary_proxy, + boolean_t smb_changed, + CFDictionaryRef old_primary_smb + ) { - CandidateRef other_candidate; - Boolean ret = FALSE; + int idx; + CFMutableStringRef log_output; + nwi_ifstate_t scan; - if (other_results == NULL - || candidate->ip_is_coupled == FALSE - || RANK_ASSERTION_MASK(candidate->rank) == kRankAssertionNever) { - goto done; - } - other_candidate = other_results->candidates; - if (CFEqual(other_candidate->if_name, candidate->if_name)) { - /* they are over the same interface, no need to demote */ - goto done; - } - if (CFStringHasPrefix(other_candidate->if_name, CFSTR("stf"))) { - /* avoid creating a feedback loop */ - goto done; + log_output = CFStringCreateMutable(NULL, 0); + + if (changes_state != NULL) { + for (idx = 0; idx < countof(nwi_af_list); idx++) { + CFMutableStringRef changes = NULL; + CFMutableStringRef primary_str = NULL; + + scan = nwi_state_get_first_ifstate(changes_state, nwi_af_list[idx]); + + while (scan != NULL) { + const char * changed_str; + + changed_str = nwi_ifstate_get_diff_str(scan); + if (changed_str != NULL) { + void * address; + const char * addr_str; + char ntopbuf[INET6_ADDRSTRLEN]; + + address = (void *)nwi_ifstate_get_address(scan); + addr_str = inet_ntop(scan->af, address, ntopbuf, + sizeof(ntopbuf)); + if (primary_str == NULL) { + primary_str = CFStringCreateMutable(NULL, 0); + CFStringAppendFormat(primary_str, NULL, + CFSTR("%s%s:%s"), + nwi_ifstate_get_ifname(scan), + changed_str, addr_str); + } else { + if (changes == NULL) { + changes = CFStringCreateMutable(NULL, 0); + } + CFStringAppendFormat(changes, NULL, CFSTR(", %s"), + nwi_ifstate_get_ifname(scan)); + if (strcmp(changed_str, "") != 0) { + CFStringAppendFormat(changes, NULL, CFSTR("%s:%s"), + changed_str, addr_str); + } + } + } + scan = nwi_ifstate_get_next(scan, scan->af); + } + + if (primary_str != NULL) { + CFStringAppendFormat(log_output, NULL, CFSTR(" %s(%@"), + nwi_af_list[idx] == AF_INET ? "v4" : "v6", + primary_str); + + if (changes != NULL && CFStringGetLength(changes) != 0) { + CFStringAppendFormat(log_output, NULL, CFSTR("%@"), + changes); + } + CFStringAppend(log_output, CFSTR(")")); + + my_CFRelease(&primary_str); + my_CFRelease(&changes); + } + } } - if (RANK_ASSERTION_MASK(other_candidate->rank) == kRankAssertionNever) { - /* the other candidate isn't eligible to become primary, ignore */ - goto done; + + if (dns_changed || dnsinfo_changed) { + const char *str; + + str = get_changed_str(S_primary_dns, kSCEntNetDNS, old_primary_dns); + if ((strcmp(str, "") == 0) && dnsinfo_changed) { + str = "*"; // dnsinfo change w/no change to primary + } + CFStringAppendFormat(log_output, NULL, CFSTR(" DNS%s"), str); + } else if (S_primary_dns != NULL) { + CFStringAppend(log_output, CFSTR(" DNS")); } - if (candidate->rank < other_candidate->rank) { - /* we're higher ranked than the other candidate, ignore */ - goto done; + + if (proxy_changed) { + const char *str; + + str = get_changed_str(S_primary_proxies, kSCEntNetProxies, old_primary_proxy); + CFStringAppendFormat(log_output, NULL, CFSTR(" Proxy%s"), str); + } else if (S_primary_proxies != NULL) { + CFStringAppend(log_output, CFSTR(" Proxy")); } - ret = TRUE; - done: - return (ret); +#if !TARGET_OS_IPHONE + if (smb_changed) { + const char *str; + + str = get_changed_str(S_primary_smb, kSCEntNetSMB, old_primary_smb); + CFStringAppendFormat(log_output, NULL, CFSTR(" SMB%s"), str); + } else if (S_primary_smb != NULL) { + CFStringAppend(log_output, CFSTR(" SMB")); + } +#endif // !TARGET_OS_IPHONE + return log_output; } +#pragma mark - +#pragma mark Network changed notification -static void -get_signature_sha1(CFStringRef signature, - unsigned char * sha1) +static dispatch_queue_t +__network_change_queue() { - CC_SHA1_CTX ctx; - CFDataRef signature_data; - - signature_data = CFStringCreateExternalRepresentation(NULL, - signature, - kCFStringEncodingUTF8, - 0); - - CC_SHA1_Init(&ctx); - CC_SHA1_Update(&ctx, - signature_data, - CFDataGetLength(signature_data)); - CC_SHA1_Final(sha1, &ctx); + static dispatch_once_t once; + static dispatch_queue_t q; - CFRelease(signature_data); + dispatch_once(&once, ^{ + q = dispatch_queue_create("network change queue", NULL); + }); - return; + return q; } - +// Note: must run on __network_change_queue() static void -add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, - CandidateRef candidate, Rank rank) +post_network_change_when_ready() { - uint64_t flags = 0; - char ifname[IFNAMSIZ]; - nwi_ifstate_t ifstate; + int status; - if (nwi_state == NULL) { - /* can't happen */ + if (S_network_change_needed == 0) { return; } - if (RANK_ASSERTION_MASK(rank) == kRankAssertionNever) { - flags |= NWI_IFSTATE_FLAGS_NOT_IN_LIST; - } - if (service_dict_get(candidate->serviceID, kSCEntNetDNS) != NULL) { - flags |= NWI_IFSTATE_FLAGS_HAS_DNS; - } - CFStringGetCString(candidate->if_name, ifname, sizeof(ifname), - kCFStringEncodingASCII); - if ((S_IPMonitor_debug & kDebugFlag2) != 0) { - my_log(LOG_DEBUG, - "Inserting IPv%c [%s] with flags 0x%x primary_rank 0x%x reach_flags %d", - ipvx_char(af), ifname, rank, candidate->reachability_flags); - } - ifstate = nwi_insert_ifstate(nwi_state, ifname, af, flags, rank, - (void *)&candidate->addr, - (void *)&candidate->vpn_server_addr, - candidate->reachability_flags); - if (ifstate != NULL && candidate->signature) { - uint8_t hash[CC_SHA1_DIGEST_LENGTH]; - - get_signature_sha1(candidate->signature, hash); - nwi_ifstate_set_signature(ifstate, hash); - } - return; -} + if (!S_network_change_timeout && + (!S_dnsinfo_synced || !S_nwi_synced)) { + // if we [still] need to wait for the DNS configuration + // or network information changes to be ack'd -static void -add_reachability_flags_to_candidate(CandidateRef candidate, CFDictionaryRef services_info, int af) -{ - SCNetworkReachabilityFlags flags = kSCNetworkReachabilityFlagsReachable; - CFStringRef vpn_server_address = NULL; + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "Defer \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s, %s)", + S_dnsinfo_synced ? "DNS" : "!DNS", + S_nwi_synced ? "nwi" : "!nwi"); + } + return; + } - VPNAttributesGet(candidate->serviceID, - services_info, - &flags, - &vpn_server_address, - af); + // cancel any running timer + if (S_network_change_timer != NULL) { + dispatch_source_cancel(S_network_change_timer); + dispatch_release(S_network_change_timer); + S_network_change_timer = NULL; + S_network_change_timeout = FALSE; + } - candidate->reachability_flags = flags; + // set (and log?) the post time + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + struct timeval elapsed; + struct timeval end; - if (vpn_server_address == NULL) { - bzero(&candidate->vpn_server_addr, sizeof(candidate->vpn_server_addr)); - } else { - char buf[128]; - CFStringGetCString(vpn_server_address, buf, sizeof(buf), kCFStringEncodingASCII); + (void) gettimeofday(&end, NULL); + timersub(&end, &S_network_change_start, &elapsed); - _SC_string_to_sockaddr(buf, - AF_UNSPEC, - (void *)&candidate->vpn_server_addr, - sizeof(candidate->vpn_server_addr)); +#define QUERY_TIME__FMT "%ld.%6.6d" +#define QUERY_TIME__DIV 1 - CFRelease(vpn_server_address); + my_log(LOG_DEBUG, + "Post \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s: " QUERY_TIME__FMT ": 0x%x)", + S_network_change_timeout ? "timeout" : "delayed", + elapsed.tv_sec, + elapsed.tv_usec / QUERY_TIME__DIV, + S_network_change_needed); } - return; -} -/* - * Function: ElectionResultsCopyPrimary - * Purpose: - * Use the results of the current protocol and the other protocol to - * determine which service should become primary. - * - * At the same time, generate the nwi_state for the protocol. - * - * For IPv4, also generate the IPv4 routing table. - */ -static CFStringRef -ElectionResultsCopyPrimary(ElectionResultsRef results, - ElectionResultsRef other_results, - nwi_state_t nwi_state, int af, - IPv4RouteListRef * ret_routes, - CFDictionaryRef services_info) -{ - CFStringRef primary = NULL; - Boolean primary_is_null = FALSE; - IPv4RouteListRef routes = NULL; - if (nwi_state != NULL) { - nwi_state_clear(nwi_state, af); + if ((S_network_change_needed & NETWORK_CHANGE_NET) != 0) { + status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_NWI); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, + "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_NWI ") failed: error=%d", status); + } } - if (results != NULL) { - CandidateRef deferred[results->count]; - int deferred_count; - int i; - CandidateRef scan; - - deferred_count = 0; - for (i = 0, scan = results->candidates; - i < results->count; - i++, scan++) { - Boolean is_primary = FALSE; - Rank rank = scan->rank; - Boolean skip = FALSE; - - if (primary == NULL - && RANK_ASSERTION_MASK(rank) != kRankAssertionNever) { - if (ElectionResultsCandidateNeedsDemotion(other_results, - scan)) { - /* demote to RankNever */ - my_log(LOG_NOTICE, - "IPv%c over %@ demoted: not primary for IPv%c", - ipvx_char(af), scan->if_name, ipvx_other_char(af)); - rank = RankMake(rank, kRankAssertionNever); - deferred[deferred_count++] = scan; - skip = TRUE; - } - else { - primary = CFRetain(scan->serviceID); - is_primary = TRUE; - } - } - if (af == AF_INET) { - /* generate the routing table for IPv4 */ - CFDictionaryRef service_dict; - IPv4RouteListRef service_routes; - - service_dict - = service_dict_get(scan->serviceID, kSCEntNetIPv4); - service_routes = ipv4_dict_get_routelist(service_dict); - if (service_routes != NULL) { - routes = IPv4RouteListAddRouteList(routes, - results->count * 3, - service_routes, - rank); - if (service_routes->exclude_from_nwi) { - skip = TRUE; - } - } - else { - skip = TRUE; - } - } - else { - /* a NULL service must be excluded from nwi */ - CFDictionaryRef ipv6_dict; - - ipv6_dict = service_dict_get(scan->serviceID, kSCEntNetIPv6); - if (S_dict_get_boolean(ipv6_dict, kIsNULL, FALSE)) { - skip = TRUE; - } - } - if (skip) { - /* if we're skipping the primary, it's NULL */ - if (is_primary) { - primary_is_null = TRUE; - } - } - else { - if (primary_is_null) { - /* everything after the primary must be Never */ - rank = RankMake(rank, kRankAssertionNever); - } - add_reachability_flags_to_candidate(scan, services_info, af); - add_candidate_to_nwi_state(nwi_state, af, scan, rank); - } + if ((S_network_change_needed & NETWORK_CHANGE_DNS) != 0) { + status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_DNS); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, + "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_DNS ") failed: error=%d", status); } - for (i = 0; i < deferred_count; i++) { - CandidateRef candidate = deferred[i]; - Rank rank; + } - /* demote to RankNever */ - rank = RankMake(candidate->rank, kRankAssertionNever); - add_reachability_flags_to_candidate(candidate, services_info, af); - add_candidate_to_nwi_state(nwi_state, af, candidate, rank); + if ((S_network_change_needed & NETWORK_CHANGE_PROXY) != 0) { + status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, + "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_PROXY ") failed: error=%d", status); } } - if (nwi_state != NULL) { - nwi_state_set_last(nwi_state, af); + + status = notify_post(_SC_NOTIFY_NETWORK_CHANGE); + if (status != NOTIFY_STATUS_OK) { + my_log(LOG_ERR, + "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE ") failed: error=%d", status); } - if (ret_routes != NULL) { - *ret_routes = routes; + + S_network_change_needed = 0; + return; +} + +#define TRAILING_EDGE_TIMEOUT_NSEC 5 * NSEC_PER_SEC // 5s + +// Note: must run on __network_change_queue() +static void +post_network_change(uint32_t change) +{ + if (S_network_change_needed == 0) { + // set the start time + (void) gettimeofday(&S_network_change_start, NULL); } - else if (routes != NULL) { - free(routes); + + // indicate that we need to post a change for ... + S_network_change_needed |= change; + + // cancel any running timer + if (S_network_change_timer != NULL) { + dispatch_source_cancel(S_network_change_timer); + dispatch_release(S_network_change_timer); + S_network_change_timer = NULL; + S_network_change_timeout = FALSE; } - if (primary_is_null) { - my_CFRelease(&primary); + + // if needed, start new timer + if (!S_dnsinfo_synced || !S_nwi_synced) { + S_network_change_timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, + 0, + 0, + __network_change_queue()); + dispatch_source_set_event_handler(S_network_change_timer, ^{ + S_network_change_timeout = TRUE; + post_network_change_when_ready(); + }); + dispatch_source_set_timer(S_network_change_timer, + dispatch_time(DISPATCH_TIME_NOW, + TRAILING_EDGE_TIMEOUT_NSEC), // start + DISPATCH_TIME_FOREVER, // interval + 10 * NSEC_PER_MSEC); // leeway + dispatch_resume(S_network_change_timer); } - return (primary); -} + post_network_change_when_ready(); -static inline -CFStringRef -service_dict_get_signature(CFDictionaryRef service_dict) -{ - return (CFDictionaryGetValue(service_dict, kStoreKeyNetworkSignature)); + return; } +#pragma mark - +#pragma mark Process network (SCDynamicStore) changes -/* - * Function: elect_ipv4 - * Purpose: - * Evaluate the service and determine what rank the service should have. - * If it's a suitable candidate, add it to the election results. - */ static void -elect_ipv4(const void * key, const void * value, void * context) +IPMonitorProcessChanges(SCDynamicStoreRef session, CFArrayRef changed_keys, + CFArrayRef if_rank_changes) { - Candidate candidate; - CFStringRef if_name; - ElectionInfoRef info; - Rank primary_rank; - CFDictionaryRef service_dict = (CFDictionaryRef)value; - IPv4RouteListRef service_routes; - CFDictionaryRef v4_dict; - CFDictionaryRef v4_service_dict; - - service_routes = service_dict_get_ipv4_routelist(service_dict); - if (service_routes == NULL) { - /* no service routes, no service */ - return; + CFIndex count = 0; + uint32_t changes = 0; + nwi_state_t changes_state = NULL; + boolean_t dns_changed = FALSE; + boolean_t dnsinfo_changed = FALSE; + boolean_t global_ipv4_changed = FALSE; + boolean_t global_ipv6_changed = FALSE; + CFIndex i; + keyChangeList keys; + CFIndex n; + CFStringRef network_change_msg = NULL; + int n_services; + int n_service_order = 0; + nwi_state_t old_nwi_state = NULL; + CFDictionaryRef old_primary_dns = NULL; + CFDictionaryRef old_primary_proxy = NULL; +#if !TARGET_OS_IPHONE + CFDictionaryRef old_primary_smb = NULL; +#endif // !TARGET_OS_IPHONE + boolean_t proxies_changed = FALSE; + boolean_t reachability_changed = FALSE; + CFArrayRef service_order; + CFMutableArrayRef service_changes = NULL; + CFDictionaryRef services_info = NULL; +#if !TARGET_OS_IPHONE + boolean_t smb_changed = FALSE; +#endif // !TARGET_OS_IPHONE + + /* populate name/index cache */ + my_if_nameindex(); + + if (changed_keys != NULL) { + count = CFArrayGetCount(changed_keys); + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: changed keys %@ (%ld)", changed_keys, count); + } } - if_name = service_dict_get_ipv4_ifname(service_dict); - if (if_name == NULL) { - /* need an interface name */ + if (if_rank_changes == NULL && count == 0) { return; } - if (CFEqual(if_name, CFSTR("lo0"))) { - /* don't ever elect loopback */ - return; + + if (S_primary_dns != NULL) { + old_primary_dns = service_dict_get(S_primary_dns, kSCEntNetDNS); + if (old_primary_dns != NULL) { + old_primary_dns = CFDictionaryCreateCopy(NULL, old_primary_dns); + } } - info = (ElectionInfoRef)context; - bzero(&candidate, sizeof(candidate)); - candidate.serviceID = (CFStringRef)key; - candidate.rank = get_service_rank(info->order, info->n_order, - candidate.serviceID); - primary_rank = RANK_ASSERTION_MASK(service_routes->list->rank); - if (S_ppp_override_primary - && (strncmp(PPP_PREFIX, service_routes->list->ifname, - sizeof(PPP_PREFIX) - 1) == 0)) { - /* PPP override: make ppp* look the best */ - /* Hack: should use interface type, not interface name */ - primary_rank = kRankAssertionFirst; + + if (S_primary_proxies != NULL) { + old_primary_proxy + = service_dict_get(S_primary_proxies, kSCEntNetProxies); + if (old_primary_proxy != NULL) { + old_primary_proxy = CFDictionaryCreateCopy(NULL, old_primary_proxy); + } } - candidate.rank = RankMake(candidate.rank, primary_rank); - candidate.ip_is_coupled = service_get_ip_is_coupled(candidate.serviceID); - candidate.if_name = if_name; - candidate.addr.v4 = service_routes->list->ifa; - rank_dict_set_service_rank(S_ipv4_service_rank_dict, - candidate.serviceID, candidate.rank); - v4_dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv4); - v4_service_dict = CFDictionaryGetValue(v4_dict, kIPv4DictService); - candidate.signature = service_dict_get_signature(v4_service_dict); - ElectionResultsAddCandidate(info->results, &candidate); - return; -} +#if !TARGET_OS_IPHONE + if (S_primary_smb != NULL) { + old_primary_smb = service_dict_get(S_primary_smb, kSCEntNetSMB); + if (old_primary_smb != NULL) { + old_primary_smb = CFDictionaryCreateCopy(NULL, old_primary_smb); + } + } +#endif // !TARGET_OS_IPHONE + + keyChangeListInit(&keys); + service_changes = CFArrayCreateMutable(NULL, 0, + &kCFTypeArrayCallBacks); -/* - * Function: elect_ipv6 - * Purpose: - * Evaluate the service and determine what rank the service should have. - * If it's a suitable candidate, add it to the election results. - */ -static void -elect_ipv6(const void * key, const void * value, void * context) -{ - CFArrayRef addrs; - Candidate candidate; - CFStringRef if_name; - ElectionInfoRef info; - Rank primary_rank = kRankAssertionDefault; - CFDictionaryRef ipv6_dict; - CFStringRef router; - CFDictionaryRef service_dict = (CFDictionaryRef)value; - CFDictionaryRef service_options; + for (i = 0; i < count; i++) { + CFStringRef change = CFArrayGetValueAtIndex(changed_keys, i); + if (CFEqual(change, S_setup_global_ipv4)) { + global_ipv4_changed = TRUE; + global_ipv6_changed = TRUE; + } + else if (CFEqual(change, S_multicast_resolvers)) { + dnsinfo_changed = TRUE; + } + else if (CFEqual(change, S_private_resolvers)) { + dnsinfo_changed = TRUE; + } +#if !TARGET_OS_IPHONE + else if (CFEqual(change, CFSTR(_PATH_RESOLVER_DIR))) { + dnsinfo_changed = TRUE; + } +#endif /* !TARGET_OS_IPHONE */ + else if (CFStringHasPrefix(change, S_state_service_prefix)) { + CFStringRef serviceID; + serviceID = parse_component(change, S_state_service_prefix); + if (serviceID) { + my_CFArrayAppendUniqueValue(service_changes, serviceID); + CFRelease(serviceID); + } + } + else if (CFStringHasPrefix(change, S_setup_service_prefix)) { + int j; - ipv6_dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv6); - if (ipv6_dict == NULL) { - /* no IPv6 */ - return; + CFStringRef serviceID = parse_component(change, + S_setup_service_prefix); + if (serviceID) { + my_CFArrayAppendUniqueValue(service_changes, serviceID); + CFRelease(serviceID); + } + + for (j = 0; j < countof(transientInterfaceEntityNames); j++) { + if (CFStringHasSuffix(change, + *transientInterfaceEntityNames[j])) { + reachability_changed = TRUE; + break; + } + } + + if (CFStringHasSuffix(change, kSCEntNetInterface)) { + reachability_changed = TRUE; + } + } } - if_name = CFDictionaryGetValue(ipv6_dict, kSCPropInterfaceName); - if (if_name == NULL) { - /* need an interface name */ - return; + + /* determine which serviceIDs are impacted by the interface rank changes */ + if (if_rank_changes != NULL) { + n = CFArrayGetCount(if_rank_changes); + for (i = 0; i < n; i++) { + CFStringRef ifname = CFArrayGetValueAtIndex(if_rank_changes, i); + + if (S_IPMonitor_debug & kDebugFlag1) { + my_log(LOG_DEBUG, "Interface rank changed %@", + ifname); + } + append_serviceIDs_for_interface(service_changes, ifname); + } } - if (CFEqual(if_name, CFSTR("lo0"))) { - /* don't ever elect loopback */ - return; + + /* grab a snapshot of everything we need */ + services_info = services_info_copy(session, service_changes); + service_order = service_order_get(services_info); + if (service_order != NULL) { + n_service_order = (int)CFArrayGetCount(service_order); + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: service_order %@ ", service_order); + } } - router = CFDictionaryGetValue(ipv6_dict, kSCPropNetIPv6Router); - if (router == NULL) { - /* don't care about services without a router */ - return; + + n = CFArrayGetCount(service_changes); + for (i = 0; i < n; i++) { + uint32_t changes; + CFStringRef serviceID; + + serviceID = CFArrayGetValueAtIndex(service_changes, i); + changes = service_changed(services_info, serviceID); + if ((changes & (1 << kEntityTypeServiceOptions)) != 0) { + /* if __Service__ (e.g. PrimaryRank) changed */ + global_ipv4_changed = TRUE; + global_ipv6_changed = TRUE; + } + else { + if ((changes & (1 << kEntityTypeIPv4)) != 0) { + global_ipv4_changed = TRUE; + dnsinfo_changed = TRUE; + proxies_changed = TRUE; + } + if ((changes & (1 << kEntityTypeIPv6)) != 0) { + global_ipv6_changed = TRUE; + dnsinfo_changed = TRUE; + proxies_changed = TRUE; + } + } + if ((changes & (1 << kEntityTypeDNS)) != 0) { + if (S_primary_dns != NULL && CFEqual(S_primary_dns, serviceID)) { + dns_changed = TRUE; + } + dnsinfo_changed = TRUE; + } + if ((changes & (1 << kEntityTypeProxies)) != 0) { + proxies_changed = TRUE; + } +#if !TARGET_OS_IPHONE + if ((changes & (1 << kEntityTypeSMB)) != 0) { + if (S_primary_smb != NULL && CFEqual(S_primary_smb, serviceID)) { + smb_changed = TRUE; + } + } +#endif + if ((changes & (1 << kEntityTypeTransientStatus)) != 0 + && (service_dict_get(serviceID, kSCEntNetIPv4) != NULL + || service_dict_get(serviceID, kSCEntNetIPv6) != NULL)) { + dnsinfo_changed = TRUE; + } } - info = (ElectionInfoRef)context; - bzero(&candidate, sizeof(candidate)); - candidate.serviceID = (CFStringRef)key; - candidate.if_name = if_name; - addrs = CFDictionaryGetValue(ipv6_dict, kSCPropNetIPv6Addresses); - (void)cfstring_to_ip6(CFArrayGetValueAtIndex(addrs, 0), - &candidate.addr.v6); - candidate.rank = get_service_rank(info->order, info->n_order, - candidate.serviceID); - service_options - = service_dict_get(candidate.serviceID, kSCEntNetService); - if (service_options != NULL) { - CFStringRef primaryRankStr = NULL; - primaryRankStr = CFDictionaryGetValue(service_options, - kSCPropNetServicePrimaryRank); - if (primaryRankStr != NULL) { - primary_rank = PrimaryRankGetRankAssertion(primaryRankStr); + /* ensure S_nwi_state can hold as many services as we have currently */ + n_services = (int)CFDictionaryGetCount(S_service_state_dict); + old_nwi_state = nwi_state_copy_priv(S_nwi_state); + S_nwi_state = nwi_state_new(S_nwi_state, n_services); + + if (global_ipv4_changed) { + if (S_ipv4_results != NULL) { + ElectionResultsRelease(S_ipv4_results); + } + S_ipv4_results + = ElectionResultsCopy(AF_INET, service_order, n_service_order); + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + ElectionResultsLog(LOG_DEBUG, S_ipv4_results, "IPv4"); } - candidate.ip_is_coupled - = CFDictionaryContainsKey(service_options, kIPIsCoupled); } - if (primary_rank != kRankAssertionNever) { - if (get_override_primary(ipv6_dict)) { - primary_rank = kRankAssertionFirst; + if (global_ipv6_changed) { + if (S_ipv6_results != NULL) { + ElectionResultsRelease(S_ipv6_results); } - else if (S_ppp_override_primary - && CFStringHasPrefix(if_name, CFSTR(PPP_PREFIX))) { - /* PPP override: make ppp* look the best */ - /* Hack: should use interface type, not interface name */ - primary_rank = kRankAssertionFirst; + S_ipv6_results + = ElectionResultsCopy(AF_INET6, service_order, n_service_order); + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + ElectionResultsLog(LOG_DEBUG, S_ipv6_results, "IPv6"); } } - candidate.rank = RankMake(candidate.rank, primary_rank); - rank_dict_set_service_rank(S_ipv6_service_rank_dict, - candidate.serviceID, candidate.rank); - candidate.signature = service_dict_get_signature(ipv6_dict); - ElectionResultsAddCandidate(info->results, &candidate); - return; -} - -static uint32_t -service_changed(CFDictionaryRef services_info, CFStringRef serviceID) -{ - uint32_t changed = 0; - int i; + if (global_ipv4_changed || global_ipv6_changed || dnsinfo_changed) { + CFStringRef new_primary; + RouteListUnion new_routelist; - /* update service options first (e.g. rank) */ - if (get_rank_changes(serviceID, - get_service_state_entity(services_info, serviceID, - NULL), - get_service_setup_entity(services_info, serviceID, - NULL), - services_info)) { - changed |= (1 << kEntityTypeServiceOptions); - } - /* update IPv4, IPv6, DNS, Proxies, SMB, ... */ - for (i = 0; i < ENTITY_TYPES_COUNT; i++) { - GetEntityChangesFuncRef func = entityChangeFunc[i]; - if ((*func)(serviceID, - get_service_state_entity(services_info, serviceID, - *entityTypeNames[i]), - get_service_setup_entity(services_info, serviceID, - *entityTypeNames[i]), - services_info)) { - changed |= (1 << i); + /* IPv4 */ + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: electing IPv4 primary"); } - } + new_routelist.ptr = NULL; + new_primary = ElectionResultsCopyPrimary(S_ipv4_results, + S_ipv6_results, + S_nwi_state, AF_INET, + &new_routelist.common, + services_info); + (void)set_new_primary(&S_primary_ipv4, new_primary, "IPv4"); + update_ipv4(S_primary_ipv4, new_routelist.v4, &keys); + my_CFRelease(&new_primary); - if (get_transient_service_changes(serviceID, services_info)) { - changed |= (1 << kEntityTypeVPNStatus); + /* IPv6 */ + if ((S_IPMonitor_debug & kDebugFlag1) != 0) { + my_log(LOG_DEBUG, + "IPMonitor: electing IPv6 primary"); + } + new_routelist.ptr = NULL; + new_primary = ElectionResultsCopyPrimary(S_ipv6_results, + S_ipv4_results, + S_nwi_state, AF_INET6, + &new_routelist.common, + services_info); + (void)set_new_primary(&S_primary_ipv6, new_primary, "IPv6"); + update_ipv6(S_primary_ipv6, new_routelist.v6, &keys); + my_CFRelease(&new_primary); } - return (changed); -} - -static CFArrayRef -service_order_get(CFDictionaryRef services_info) -{ - CFArrayRef order = NULL; - CFDictionaryRef ipv4_dict; - - ipv4_dict = my_CFDictionaryGetDictionary(services_info, - S_setup_global_ipv4); - if (ipv4_dict != NULL) { - CFNumberRef ppp_override; - int ppp_val = 0; + if (global_ipv4_changed || global_ipv6_changed) { + CFStringRef new_primary_dns = NULL; + CFStringRef new_primary_proxies = NULL; +#if !TARGET_OS_IPHONE + CFStringRef new_primary_smb = NULL; +#endif /* !TARGET_OS_IPHONE */ - order = CFDictionaryGetValue(ipv4_dict, kSCPropNetServiceOrder); - order = isA_CFArray(order); + if (S_primary_ipv4 != NULL && S_primary_ipv6 != NULL) { + /* decide between IPv4 and IPv6 */ + if (rank_service_entity(S_ipv4_service_rank_dict, + S_primary_ipv4, kSCEntNetDNS) + <= rank_service_entity(S_ipv6_service_rank_dict, + S_primary_ipv6, kSCEntNetDNS)) { + new_primary_dns = S_primary_ipv4; + } + else { + new_primary_dns = S_primary_ipv6; + } + if (rank_service_entity(S_ipv4_service_rank_dict, + S_primary_ipv4, kSCEntNetProxies) + <= rank_service_entity(S_ipv6_service_rank_dict, + S_primary_ipv6, kSCEntNetProxies)) { + new_primary_proxies = S_primary_ipv4; + } + else { + new_primary_proxies = S_primary_ipv6; + } +#if !TARGET_OS_IPHONE + if (rank_service_entity(S_ipv4_service_rank_dict, + S_primary_ipv4, kSCEntNetSMB) + <= rank_service_entity(S_ipv6_service_rank_dict, + S_primary_ipv6, kSCEntNetSMB)) { + new_primary_smb = S_primary_ipv4; + } + else { + new_primary_smb = S_primary_ipv6; + } +#endif /* !TARGET_OS_IPHONE */ - /* get ppp override primary */ - ppp_override = CFDictionaryGetValue(ipv4_dict, - kSCPropNetPPPOverridePrimary); - ppp_override = isA_CFNumber(ppp_override); - if (ppp_override != NULL) { - CFNumberGetValue(ppp_override, kCFNumberIntType, &ppp_val); } - S_ppp_override_primary = (ppp_val != 0) ? TRUE : FALSE; - } - else { - S_ppp_override_primary = FALSE; - } - return (order); -} - -static boolean_t -set_new_primary(CFStringRef * primary_p, CFStringRef new_primary, - const char * entity) -{ - boolean_t changed = FALSE; - CFStringRef primary = *primary_p; + else if (S_primary_ipv6 != NULL) { + new_primary_dns = S_primary_ipv6; + new_primary_proxies = S_primary_ipv6; +#if !TARGET_OS_IPHONE + new_primary_smb = S_primary_ipv6; +#endif /* !TARGET_OS_IPHONE */ + } + else if (S_primary_ipv4 != NULL) { + new_primary_dns = S_primary_ipv4; + new_primary_proxies = S_primary_ipv4; +#if !TARGET_OS_IPHONE + new_primary_smb = S_primary_ipv4; +#endif /* !TARGET_OS_IPHONE */ + } - if (new_primary != NULL) { - if (primary != NULL && CFEqual(new_primary, primary)) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ is still primary %s", - new_primary, entity); - } + if (set_new_primary(&S_primary_dns, new_primary_dns, "DNS")) { + dns_changed = TRUE; + dnsinfo_changed = TRUE; } - else { - my_CFRelease(primary_p); - *primary_p = CFRetain(new_primary); - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ is the new primary %s", - new_primary, entity); - } - changed = TRUE; + if (set_new_primary(&S_primary_proxies, new_primary_proxies, + "Proxies")) { + proxies_changed = TRUE; } - } - else if (primary != NULL) { - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: %@ is no longer primary %s", - primary, entity); +#if !TARGET_OS_IPHONE + if (set_new_primary(&S_primary_smb, new_primary_smb, "SMB")) { + smb_changed = TRUE; } - my_CFRelease(primary_p); - changed = TRUE; +#endif /* !TARGET_OS_IPHONE */ } - return (changed); -} -static Rank -rank_service_entity(CFDictionaryRef rank_dict, CFStringRef serviceID, - CFStringRef entity) -{ - if (service_dict_get(serviceID, entity) == NULL) { - return (RankMake(kRankIndexMask, kRankAssertionDefault)); + if (!proxies_changed && dnsinfo_changed + && ((G_supplemental_proxies_follow_dns != NULL) + && CFBooleanGetValue(G_supplemental_proxies_follow_dns))) { + proxies_changed = TRUE; } - return (rank_dict_get_service_rank(rank_dict, serviceID)); -} -static void -update_interface_rank(CFDictionaryRef services_info, CFStringRef ifname) -{ - CFStringRef if_rank_key; - CFDictionaryRef rank_dict; - - if_rank_key = if_rank_key_copy(ifname); - rank_dict = CFDictionaryGetValue(services_info, if_rank_key); - CFRelease(if_rank_key); - if_rank_set(ifname, rank_dict); - return; -} + changes_state = nwi_state_diff(old_nwi_state, S_nwi_state); -static void -append_serviceIDs_for_interface(CFMutableArrayRef services_changed, - CFStringRef ifname) -{ - int count; - int i; - void * * keys; -#define N_KEYS_VALUES_STATIC 10 - void * keys_values_buf[N_KEYS_VALUES_STATIC * 2]; - void * * values; + if (global_ipv4_changed || global_ipv6_changed + || dnsinfo_changed || reachability_changed) { + if (S_nwi_state != NULL) { + S_nwi_state->generation_count = mach_absolute_time(); + if (global_ipv4_changed || global_ipv6_changed + || reachability_changed) { + SCNetworkReachabilityFlags reach_flags_v4 = 0; + SCNetworkReachabilityFlags reach_flags_v6 = 0; - count = CFDictionaryGetCount(S_service_state_dict); - if (count <= N_KEYS_VALUES_STATIC) { - keys = keys_values_buf; - } else { - keys = (void * *)malloc(sizeof(*keys) * count * 2); - } - values = keys + count; - CFDictionaryGetKeysAndValues(S_service_state_dict, - (const void * *)keys, - (const void * *)values); + GetReachabilityFlagsFromTransientServices(services_info, + &reach_flags_v4, + &reach_flags_v6); - for (i = 0; i < count; i++) { - CFDictionaryRef ipv4 = NULL; - CFStringRef interface = NULL; - CFStringRef serviceID; - CFDictionaryRef service_dict; + _nwi_state_set_reachability_flags(S_nwi_state, reach_flags_v4, + reach_flags_v6); + } - serviceID = (CFStringRef)keys[i]; - service_dict = (CFDictionaryRef)values[i]; + /* Update the per-interface generation count */ + _nwi_state_update_interface_generations(old_nwi_state, S_nwi_state, + changes_state); + } - /* check if this is a ipv4 dictionary */ - ipv4 = CFDictionaryGetValue(service_dict, kSCEntNetIPv4); - if (ipv4 != NULL) { - interface = ipv4_dict_get_ifname(ipv4); - if (interface != NULL && CFEqual(interface, ifname)) { - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, - "Found ipv4 service %@ on interface %@.", - serviceID, ifname); - } + if (update_nwi(S_nwi_state)) { + changes |= NETWORK_CHANGE_NET; - my_CFArrayAppendUniqueValue(services_changed, serviceID); - } + /* + * the DNS configuration includes per-resolver configuration + * reachability flags that are based on the nwi state. Let's + * make sure that we check for changes + */ + dnsinfo_changed = TRUE; + } + } + if (dns_changed) { + if (update_dns(services_info, S_primary_dns, &keys)) { + changes |= NETWORK_CHANGE_DNS; + dnsinfo_changed = TRUE; + } else { + dns_changed = FALSE; + } + } + if (dnsinfo_changed) { + if (update_dnsinfo(services_info, S_primary_dns, + &keys, service_order)) { + changes |= NETWORK_CHANGE_DNS; } else { - CFDictionaryRef proto_dict; - - /* check if this is a ipv6 dictionary */ - proto_dict = CFDictionaryGetValue(service_dict, kSCEntNetIPv6); - if (proto_dict == NULL) { - continue; - } - interface = CFDictionaryGetValue(proto_dict, kSCPropInterfaceName); - if (interface != NULL && CFEqual(interface, ifname)) { - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, "Found ipv6 service %@ on interface %@.", - serviceID, ifname); - } - - my_CFArrayAppendUniqueValue(services_changed, serviceID); - } + dnsinfo_changed = FALSE; + } + } + if (proxies_changed) { + // if proxy change OR supplemental Proxies follow supplemental DNS + if (update_proxies(services_info, S_primary_proxies, + &keys, service_order)) { + changes |= NETWORK_CHANGE_PROXY; + } else { + proxies_changed = FALSE; + } + } +#if !TARGET_OS_IPHONE + if (smb_changed) { + if (update_smb(services_info, S_primary_smb, &keys)) { + changes |= NETWORK_CHANGE_SMB; + } else { + smb_changed = FALSE; } } +#endif /* !TARGET_OS_IPHONE */ + my_CFRelease(&service_changes); + my_CFRelease(&services_info); - if (keys != keys_values_buf) { - free(keys); + if (changes != 0) { + network_change_msg = + generate_log_changes(changes_state, + dns_changed, + dnsinfo_changed, + old_primary_dns, + proxies_changed, + old_primary_proxy, +#if !TARGET_OS_IPHONE + smb_changed, + old_primary_smb +#else // !TARGET_OS_IPHONE + FALSE, // smb_changed + NULL // old_primary_smb +#endif // !TARGET_OS_IPHONE + ); } -} -static __inline__ const char * -get_changed_str(CFStringRef serviceID, CFStringRef entity, CFDictionaryRef old_dict) -{ - CFDictionaryRef new_dict = NULL; + keyChangeListApplyToStore(&keys, session); + my_CFRelease(&old_primary_dns); + my_CFRelease(&old_primary_proxy); +#if !TARGET_OS_IPHONE + my_CFRelease(&old_primary_smb); +#endif // !TARGET_OS_IPHONE - if (serviceID != NULL) { - new_dict = service_dict_get(serviceID, entity); + if (changes != 0) { + dispatch_async(__network_change_queue(), ^{ + post_network_change(changes); + }); } - if (old_dict == NULL) { - if (new_dict != NULL) { - return "+"; - } + if ((network_change_msg != NULL) + && (CFStringGetLength(network_change_msg) != 0)) { + my_log(LOG_NOTICE, "network changed:%@", network_change_msg); + } else if (keyChangeListActive(&keys)) { + my_log(LOG_NOTICE, "network changed."); } else { - if (new_dict == NULL) { - return "-"; - } else if (!CFEqual(old_dict, new_dict)) { - return "!"; - } + my_log(LOG_DEBUG, "network event w/no changes"); } - return ""; -} - -static CF_RETURNS_RETAINED CFStringRef -generate_log_changes(nwi_state_t changes_state, - boolean_t dns_changed, - boolean_t dnsinfo_changed, - CFDictionaryRef old_primary_dns, - boolean_t proxy_changed, - CFDictionaryRef old_primary_proxy, - boolean_t smb_changed, - CFDictionaryRef old_primary_smb - ) -{ - int idx; - CFMutableStringRef log_output; - nwi_ifstate_t scan; - log_output = CFStringCreateMutable(NULL, 0); + my_CFRelease(&network_change_msg); if (changes_state != NULL) { - for (idx = 0; idx < sizeof(nwi_af_list)/sizeof(nwi_af_list[0]); idx++) { - CFMutableStringRef changes = NULL; - CFMutableStringRef primary_str = NULL; - - scan = nwi_state_get_first_ifstate(changes_state, nwi_af_list[idx]); - - while (scan != NULL) { - const char * changed_str; - - changed_str = nwi_ifstate_get_diff_str(scan); - if (changed_str != NULL) { - void * address; - const char * addr_str; - char ntopbuf[INET6_ADDRSTRLEN]; - - address = (void *)nwi_ifstate_get_address(scan); - addr_str = inet_ntop(scan->af, address, - ntopbuf, sizeof(ntopbuf)); + nwi_state_release(changes_state); + } + if (old_nwi_state != NULL) { + nwi_state_release(old_nwi_state); + } + keyChangeListFree(&keys); - if (primary_str == NULL) { - primary_str = CFStringCreateMutable(NULL, 0); - CFStringAppendFormat(primary_str, NULL, CFSTR("%s%s:%s"), - nwi_ifstate_get_ifname(scan), - changed_str, addr_str); - } else { - if (changes == NULL) { - changes = CFStringCreateMutable(NULL, 0); - } - CFStringAppendFormat(changes, NULL, CFSTR(", %s"), - nwi_ifstate_get_ifname(scan)); - if (strcmp(changed_str, "") != 0) { - CFStringAppendFormat(changes, NULL, CFSTR("%s:%s"), - changed_str, addr_str); - } - } - } - scan = nwi_ifstate_get_next(scan, scan->af); - } + /* release the name/index cache */ + my_if_freenameindex(); - if (primary_str != NULL) { - CFStringAppendFormat(log_output, NULL, CFSTR(" %s(%@"), - nwi_af_list[idx] == AF_INET ? "v4" : "v6", - primary_str); + return; +} - if (changes != NULL && CFStringGetLength(changes) != 0) { - CFStringAppendFormat(log_output, NULL, CFSTR("%@"), - changes); - } - CFStringAppendFormat(log_output, NULL, CFSTR(")")); +static void +IPMonitorNotify(SCDynamicStoreRef session, CFArrayRef changed_keys, + void * not_used) +{ + IPMonitorProcessChanges(session, changed_keys, NULL); + return; +} - my_CFRelease(&primary_str); - my_CFRelease(&changes); - } - } - } +static void +watch_proxies() +{ +#if !TARGET_OS_IPHONE + const _scprefs_observer_type type = scprefs_observer_type_mcx; +#else + const _scprefs_observer_type type = scprefs_observer_type_global; +#endif + static dispatch_queue_t proxy_cb_queue; - if (dns_changed || dnsinfo_changed) { - const char *str; + proxy_cb_queue = dispatch_queue_create("com.apple.SystemConfiguration.IPMonitor.proxy", NULL); + _scprefs_observer_watch(type, + "com.apple.SystemConfiguration.plist", + proxy_cb_queue, + ^{ + SCDynamicStoreNotifyValue(NULL, S_state_global_proxies); + notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); + my_log(LOG_DEBUG, "IPMonitor: Notifying:\n%@", + S_state_global_proxies); + }); + return; +} - str = get_changed_str(S_primary_dns, kSCEntNetDNS, old_primary_dns); - if ((strcmp(str, "") == 0) && dnsinfo_changed) { - str = "*"; // dnsinfo change w/no change to primary - } - CFStringAppendFormat(log_output, NULL, CFSTR(" DNS%s"), str); - } else if (S_primary_dns != NULL) { - CFStringAppendFormat(log_output, NULL, CFSTR(" DNS")); - } +#include "IPMonitorControlPrefs.h" - if (proxy_changed) { - const char *str; +__private_extern__ SCLoggerRef +my_log_get_logger() +{ + return (S_IPMonitor_logger); +} - str = get_changed_str(S_primary_proxies, kSCEntNetProxies, old_primary_proxy); - CFStringAppendFormat(log_output, NULL, CFSTR(" Proxy%s"), str); - } else if (S_primary_proxies != NULL) { - CFStringAppendFormat(log_output, NULL, CFSTR(" Proxy")); +static void +prefs_changed(__unused SCPreferencesRef prefs) +{ + if (S_bundle_logging_verbose || IPMonitorControlPrefsIsVerbose()) { + S_IPMonitor_debug = kDebugFlagDefault; + S_IPMonitor_verbose = TRUE; + SCLoggerSetFlags(S_IPMonitor_logger, kSCLoggerFlagsFile | kSCLoggerFlagsDefault); + my_log(LOG_DEBUG, "IPMonitor: Setting logging verbose mode on."); + } else { + my_log(LOG_DEBUG, "IPMonitor: Setting logging verbose mode off."); + S_IPMonitor_debug = 0; + S_IPMonitor_verbose = FALSE; + SCLoggerSetFlags(S_IPMonitor_logger, kSCLoggerFlagsDefault); } + return; +} -#if !TARGET_OS_IPHONE - if (smb_changed) { - const char *str; - - str = get_changed_str(S_primary_smb, kSCEntNetSMB, old_primary_smb); - CFStringAppendFormat(log_output, NULL, CFSTR(" SMB%s"), str); - } else if (S_primary_smb != NULL) { - CFStringAppendFormat(log_output, NULL, CFSTR(" SMB")); +#define LOGGER_ID CFSTR("com.apple.networking.IPMonitor") +static void +my_log_init() +{ + if (S_IPMonitor_logger != NULL) { + return; } -#endif // !TARGET_OS_IPHONE + S_IPMonitor_logger = SCLoggerCreate(LOGGER_ID); + return; - return log_output; } -#pragma mark - -#pragma mark Network changed notification -static dispatch_queue_t -__network_change_queue() +#if !TARGET_IPHONE_SIMULATOR +static int +flush_routes(int s) { - static dispatch_once_t once; - static dispatch_queue_t q; + char * buf = NULL; + int i; + char * lim; +#define N_MIB 6 + int mib[N_MIB]; + size_t needed; + char * next; + struct rt_msghdr * rtm; + struct sockaddr_in *sin; + + mib[0] = CTL_NET; + mib[1] = PF_ROUTE; + mib[2] = 0; + mib[3] = AF_INET; + mib[4] = NET_RT_FLAGS; + mib[5] = RTF_STATIC | RTF_DYNAMIC; + for (i = 0; i < 3; i++) { + if (sysctl(mib, N_MIB, NULL, &needed, NULL, 0) < 0) { + break; + } + if ((buf = malloc(needed)) == NULL) { + break; + } + if (sysctl(mib, N_MIB, buf, &needed, NULL, 0) >= 0) { + break; + } + free(buf); + buf = NULL; + } + if (buf == NULL) { + return (-1); + } + lim = buf + needed; + for (next = buf; next < lim; next += rtm->rtm_msglen) { + uint32_t addr; - dispatch_once(&once, ^{ - q = dispatch_queue_create("network change queue", NULL); - }); + /* ALIGN: assume kernel provides necessary alignment */ + rtm = (struct rt_msghdr *)(void *)next; + sin = (struct sockaddr_in *)(rtm + 1); - return q; + addr = ntohl(sin->sin_addr.s_addr); + if (IN_LOOPBACK(addr)) { + my_log(LOG_DEBUG, + "IPMonitor: flush_routes: ignoring loopback route"); + continue; + } + if (IN_LOCAL_GROUP(addr)) { + my_log(LOG_DEBUG, + "IPMonitor: flush_routes: ignoring multicast route"); + continue; + } + rtm->rtm_type = RTM_DELETE; + rtm->rtm_seq = ++rtm_seq; + if (write(s, rtm, rtm->rtm_msglen) < 0) { + my_log(LOG_DEBUG, + "IPMonitor: flush_routes: removing route for " + IP_FORMAT " failed, %s", + IP_LIST(&sin->sin_addr), + strerror(errno)); + } + else { + my_log(LOG_DEBUG, + "IPMonitor: flush_routes: removed route for " IP_FORMAT, + IP_LIST(&sin->sin_addr)); + } + } + free(buf); + return (0); } -// Note: must run on __network_change_queue() static void -post_network_change_when_ready() +flush_inet_routes(void) { - int status; + int s; - if (S_network_change_needed == 0) { - return; + s = open_routing_socket(); + if (s != -1) { + flush_routes(s); + close(s); } +} - if (!S_network_change_timeout && - (!S_dnsinfo_synced || !S_nwi_synced)) { - // if we [still] need to wait for the DNS configuration - // or network information changes to be ack'd +#else /* !TARGET_IPHONE_SIMULATOR */ - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "Defer \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s, %s)", - S_dnsinfo_synced ? "DNS" : "!DNS", - S_nwi_synced ? "nwi" : "!nwi"); - } - return; - } +static void +flush_inet_routes(void) +{ +} - // cancel any running timer - if (S_network_change_timer != NULL) { - dispatch_source_cancel(S_network_change_timer); - dispatch_release(S_network_change_timer); - S_network_change_timer = NULL; - S_network_change_timeout = FALSE; - } +#endif /* !TARGET_IPHONE_SIMULATOR */ - // set (and log?) the post time - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - struct timeval elapsed; - struct timeval end; - (void) gettimeofday(&end, NULL); - timersub(&end, &S_network_change_start, &elapsed); -#define QUERY_TIME__FMT "%d.%6.6d" -#define QUERY_TIME__DIV 1 +static void +ip_plugin_init() +{ + CFMutableArrayRef keys = NULL; + CFStringRef pattern; + CFMutableArrayRef patterns = NULL; + CFRunLoopSourceRef rls = NULL; - my_log(LOG_DEBUG, - "Post \"" _SC_NOTIFY_NETWORK_CHANGE "\" (%s: " QUERY_TIME__FMT ": 0x%x)", - S_network_change_timeout ? "timeout" : "delayed", - elapsed.tv_sec, - elapsed.tv_usec / QUERY_TIME__DIV, - S_network_change_needed); + if (S_is_network_boot() != 0) { + S_netboot = TRUE; } - - if ((S_network_change_needed & NETWORK_CHANGE_NET) != 0) { - status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_NWI); - if (status != NOTIFY_STATUS_OK) { - my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_NWI ") failed: error=%ld", status); - } + else { + /* flush routes */ + flush_inet_routes(); } - if ((S_network_change_needed & NETWORK_CHANGE_DNS) != 0) { - status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_DNS); - if (status != NOTIFY_STATUS_OK) { - my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_DNS ") failed: error=%ld", status); - } + if (S_is_scoped_routing_enabled() != 0) { + S_scopedroute = TRUE; } - if ((S_network_change_needed & NETWORK_CHANGE_PROXY) != 0) { - status = notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); - if (status != NOTIFY_STATUS_OK) { - my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE_PROXY ") failed: error=%ld", status); - } + if (S_is_scoped_v6_routing_enabled() != 0) { + S_scopedroute_v6 = TRUE; } - status = notify_post(_SC_NOTIFY_NETWORK_CHANGE); - if (status != NOTIFY_STATUS_OK) { + S_session = SCDynamicStoreCreate(NULL, CFSTR("IPMonitor"), + IPMonitorNotify, NULL); + if (S_session == NULL) { my_log(LOG_ERR, - "IPMonitor: notify_post(" _SC_NOTIFY_NETWORK_CHANGE ") failed: error=%ld", status); + "IPMonitor ip_plugin_init SCDynamicStoreCreate failed: %s", + SCErrorString(SCError())); + return; } + S_state_global_ipv4 + = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetIPv4); + S_state_global_ipv6 + = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetIPv6); + S_state_global_dns + = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetDNS); + S_state_global_proxies + = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetProxies); +#if !TARGET_OS_IPHONE + S_state_global_smb + = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainState, + kSCEntNetSMB); +#endif /* !TARGET_OS_IPHONE */ + S_setup_global_ipv4 + = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, + kSCDynamicStoreDomainSetup, + kSCEntNetIPv4); + S_state_service_prefix + = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, + kSCDynamicStoreDomainState, + CFSTR(""), + NULL); + S_setup_service_prefix + = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, + kSCDynamicStoreDomainSetup, + CFSTR(""), + NULL); + S_service_state_dict + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); - S_network_change_needed = 0; - return; -} - -#define TRAILING_EDGE_TIMEOUT_NSEC 5 * NSEC_PER_SEC // 5s - -// Note: must run on __network_change_queue() -static void -post_network_change(uint32_t change) -{ - if (S_network_change_needed == 0) { - // set the start time - (void) gettimeofday(&S_network_change_start, NULL); - } + S_ipv4_service_rank_dict + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); - // indicate that we need to post a change for ... - S_network_change_needed |= change; + S_ipv6_service_rank_dict + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); - // cancel any running timer - if (S_network_change_timer != NULL) { - dispatch_source_cancel(S_network_change_timer); - dispatch_release(S_network_change_timer); - S_network_change_timer = NULL; - S_network_change_timeout = FALSE; - } + keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - // if needed, start new timer - if (!S_dnsinfo_synced || !S_nwi_synced) { - S_network_change_timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, - 0, - 0, - __network_change_queue()); - dispatch_source_set_event_handler(S_network_change_timer, ^{ - S_network_change_timeout = TRUE; - post_network_change_when_ready(); - }); - dispatch_source_set_timer(S_network_change_timer, - dispatch_time(DISPATCH_TIME_NOW, - TRAILING_EDGE_TIMEOUT_NSEC), // start - 0, // interval - 10 * NSEC_PER_MSEC); // leeway - dispatch_resume(S_network_change_timer); - } + /* register for State: and Setup: per-service notifications */ + add_service_keys(kSCCompAnyRegex, keys, patterns); - post_network_change_when_ready(); + pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetPPP); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); - return; -} + pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetVPN); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); -#pragma mark - -#pragma mark Process network (SCDynamicStore) changes + pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetInterface); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); -static void -IPMonitorNotify(SCDynamicStoreRef session, CFArrayRef changed_keys, - void * not_used) -{ - CFIndex count; - uint32_t changes = 0; - nwi_state_t changes_state = NULL; - boolean_t dns_changed = FALSE; - boolean_t dnsinfo_changed = FALSE; - boolean_t global_ipv4_changed = FALSE; - boolean_t global_ipv6_changed = FALSE; - int i; - CFMutableArrayRef if_rank_changes = NULL; - keyChangeList keys; - CFIndex n; - CFStringRef network_change_msg = NULL; - int n_services; - int n_service_order = 0; - nwi_state_t old_nwi_state = NULL; - CFDictionaryRef old_primary_dns = NULL; - CFDictionaryRef old_primary_proxy = NULL; -#if !TARGET_OS_IPHONE - CFDictionaryRef old_primary_smb = NULL; -#endif // !TARGET_OS_IPHONE - boolean_t proxies_changed = FALSE; - boolean_t reachability_changed = FALSE; - CFArrayRef service_order; - CFMutableArrayRef service_changes = NULL; - CFDictionaryRef services_info = NULL; -#if !TARGET_OS_IPHONE - boolean_t smb_changed = FALSE; -#endif // !TARGET_OS_IPHONE + /* register for State: per-service PPP/VPN/IPSec status notifications */ + add_transient_status_keys(kSCCompAnyRegex, patterns); - count = CFArrayGetCount(changed_keys); - if (count == 0) { - return; - } + /* add notifier for ServiceOrder/PPPOverridePrimary changes for IPv4 */ + CFArrayAppendValue(keys, S_setup_global_ipv4); - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: changes %@ (%d)", changed_keys, count); - } + /* add notifier for multicast DNS configuration (Bonjour/.local) */ + S_multicast_resolvers = SCDynamicStoreKeyCreate(NULL, CFSTR("%@/%@/%@"), + kSCDynamicStoreDomainState, + kSCCompNetwork, + CFSTR(kDNSServiceCompMulticastDNS)); + CFArrayAppendValue(keys, S_multicast_resolvers); - if (S_primary_dns != NULL) { - old_primary_dns = service_dict_get(S_primary_dns, kSCEntNetDNS); - if (old_primary_dns != NULL) { - old_primary_dns = CFDictionaryCreateCopy(NULL, old_primary_dns); - } - } + /* add notifier for private DNS configuration (Back to My Mac) */ + S_private_resolvers = SCDynamicStoreKeyCreate(NULL, CFSTR("%@/%@/%@"), + kSCDynamicStoreDomainState, + kSCCompNetwork, + CFSTR(kDNSServiceCompPrivateDNS)); + CFArrayAppendValue(keys, S_private_resolvers); - if (S_primary_proxies != NULL) { - old_primary_proxy = service_dict_get(S_primary_proxies, kSCEntNetProxies); - if (old_primary_proxy != NULL) { - old_primary_proxy = CFDictionaryCreateCopy(NULL, old_primary_proxy); - } + if (!SCDynamicStoreSetNotificationKeys(S_session, keys, patterns)) { + my_log(LOG_ERR, + "IPMonitor ip_plugin_init " + "SCDynamicStoreSetNotificationKeys failed: %s", + SCErrorString(SCError())); + goto done; } -#if !TARGET_OS_IPHONE - if (S_primary_smb != NULL) { - old_primary_smb = service_dict_get(S_primary_smb, kSCEntNetSMB); - if (old_primary_smb != NULL) { - old_primary_smb = CFDictionaryCreateCopy(NULL, old_primary_smb); - } + rls = SCDynamicStoreCreateRunLoopSource(NULL, S_session, 0); + if (rls == NULL) { + my_log(LOG_ERR, + "IPMonitor ip_plugin_init " + "SCDynamicStoreCreateRunLoopSource failed: %s", + SCErrorString(SCError())); + goto done; } -#endif // !TARGET_OS_IPHONE - keyChangeListInit(&keys); - service_changes = CFArrayCreateMutable(NULL, 0, - &kCFTypeArrayCallBacks); + CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); + CFRelease(rls); - for (i = 0; i < count; i++) { - CFStringRef change = CFArrayGetValueAtIndex(changed_keys, i); - if (CFEqual(change, S_setup_global_ipv4)) { - global_ipv4_changed = TRUE; - global_ipv6_changed = TRUE; - } - else if (CFEqual(change, S_multicast_resolvers)) { - dnsinfo_changed = TRUE; - } - else if (CFEqual(change, S_private_resolvers)) { - dnsinfo_changed = TRUE; - } + /* initialize dns configuration */ + (void)dns_configuration_set(NULL, NULL, NULL, NULL, NULL); #if !TARGET_OS_IPHONE - else if (CFEqual(change, CFSTR(_PATH_RESOLVER_DIR))) { - dnsinfo_changed = TRUE; - } + empty_dns(); #endif /* !TARGET_OS_IPHONE */ - else if (CFStringHasPrefix(change, S_state_service_prefix)) { - int i; - CFStringRef serviceID; - - for (i = 0; i < sizeof(statusEntityNames)/sizeof(statusEntityNames[0]); i++) { - if (CFStringHasSuffix(change, *statusEntityNames[i])) { - dnsinfo_changed = TRUE; - break; - } - } - - serviceID = parse_component(change, S_state_service_prefix); - if (serviceID) { - my_CFArrayAppendUniqueValue(service_changes, serviceID); - CFRelease(serviceID); - } - } - else if (CFStringHasPrefix(change, S_setup_service_prefix)) { - int j; + (void)SCDynamicStoreRemoveValue(S_session, S_state_global_dns); - CFStringRef serviceID = parse_component(change, - S_setup_service_prefix); - if (serviceID) { - my_CFArrayAppendUniqueValue(service_changes, serviceID); - CFRelease(serviceID); - } +#if !TARGET_OS_IPHONE + /* initialize SMB configuration */ + (void)SCDynamicStoreRemoveValue(S_session, S_state_global_smb); +#endif /* !TARGET_OS_IPHONE */ - for (j = 0; j < sizeof(transientInterfaceEntityNames)/sizeof(transientInterfaceEntityNames[0]); j++) { - if (CFStringHasSuffix(change, *transientInterfaceEntityNames[j])) { - reachability_changed = TRUE; - break; - } - } + watch_proxies(); - if (CFStringHasSuffix(change, kSCEntNetInterface)) { - reachability_changed = TRUE; - } + done: + my_CFRelease(&keys); + my_CFRelease(&patterns); + return; +} +__private_extern__ +void +prime_IPMonitor() +{ + /* initialize multicast route */ + update_ipv4(NULL, NULL, NULL); + return; +} - } - else if (CFStringHasSuffix(change, kSCEntNetService)) { - CFStringRef ifname = my_CFStringCopyComponent(change, CFSTR("/"), 3); +static boolean_t +S_get_plist_boolean(CFDictionaryRef plist, CFStringRef key, + boolean_t def) +{ + CFBooleanRef b; + boolean_t ret = def; - if (ifname != NULL) { - if (if_rank_changes == NULL) { - if_rank_changes = CFArrayCreateMutable(NULL, 0, - &kCFTypeArrayCallBacks); - } - my_CFArrayAppendUniqueValue(if_rank_changes, ifname); - CFRelease(ifname); - } - } + b = isA_CFBoolean(CFDictionaryGetValue(plist, key)); + if (b != NULL) { + ret = CFBooleanGetValue(b); } + return (ret); +} - /* determine which serviceIDs are impacted by the interface rank changes */ - if (if_rank_changes != NULL) { - n = CFArrayGetCount(if_rank_changes); - for (i = 0; i < n; i++) { - CFStringRef ifname = CFArrayGetValueAtIndex(if_rank_changes, i); +#if !TARGET_IPHONE_SIMULATOR +#include "IPMonitorControlServer.h" - if (S_IPMonitor_debug & kDebugFlag1) { - my_log(LOG_DEBUG, "Interface rank changed %@", - ifname); - } - append_serviceIDs_for_interface(service_changes, ifname); - } - } +static void +InterfaceRankChanged(void * info) +{ + CFDictionaryRef assertions = NULL; + CFArrayRef changes; - /* grab a snapshot of everything we need */ - services_info = services_info_copy(session, service_changes, - if_rank_changes); - service_order = service_order_get(services_info); - if (service_order != NULL) { - n_service_order = CFArrayGetCount(service_order); - if ((S_IPMonitor_debug & kDebugFlag1) != 0) { - my_log(LOG_DEBUG, - "IPMonitor: service_order %@ ", service_order); - } + changes = IPMonitorControlServerCopyInterfaceRankInformation(&assertions); + if (S_if_rank_dict != NULL) { + CFRelease(S_if_rank_dict); } - - if (if_rank_changes != NULL) { - for (i = 0; i < n; i++) { - CFStringRef ifname = CFArrayGetValueAtIndex(if_rank_changes, i); - update_interface_rank(services_info, ifname); - } + S_if_rank_dict = assertions; + if (changes != NULL) { + IPMonitorProcessChanges(S_session, NULL, changes); + CFRelease(changes); } + return; +} - n = CFArrayGetCount(service_changes); - for (i = 0; i < n; i++) { - uint32_t changes; - CFStringRef serviceID; +static void +StartIPMonitorControlServer(void) +{ + CFRunLoopSourceContext context; + CFRunLoopSourceRef rls; - serviceID = CFArrayGetValueAtIndex(service_changes, i); - changes = service_changed(services_info, serviceID); - if ((changes & (1 << kEntityTypeServiceOptions)) != 0) { - /* if __Service__ (e.g. PrimaryRank) changed */ - global_ipv4_changed = TRUE; - global_ipv6_changed = TRUE; - } - else { - if ((changes & (1 << kEntityTypeIPv4)) != 0) { - global_ipv4_changed = TRUE; - dnsinfo_changed = TRUE; - proxies_changed = TRUE; - } - if ((changes & (1 << kEntityTypeIPv6)) != 0) { - global_ipv6_changed = TRUE; - dnsinfo_changed = TRUE; - proxies_changed = TRUE; - } - } - if ((changes & (1 << kEntityTypeDNS)) != 0) { - if (S_primary_dns != NULL && CFEqual(S_primary_dns, serviceID)) { - dns_changed = TRUE; - } - dnsinfo_changed = TRUE; - } - if ((changes & (1 << kEntityTypeProxies)) != 0) { - proxies_changed = TRUE; - } -#if !TARGET_OS_IPHONE - if ((changes & (1 << kEntityTypeSMB)) != 0) { - if (S_primary_smb != NULL && CFEqual(S_primary_smb, serviceID)) { - smb_changed = TRUE; - } - } -#endif + bzero(&context, sizeof(context)); + context.perform = InterfaceRankChanged; + rls = CFRunLoopSourceCreate(NULL, 0, &context); + if (IPMonitorControlServerStart(CFRunLoopGetCurrent(), rls, + &S_bundle_logging_verbose) == FALSE) { + my_log(LOG_ERR, "IPMonitorControlServerStart failed"); + } + else { + CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, + kCFRunLoopDefaultMode); } + CFRelease(rls); + return; +} - if ((changes & (1 <generation_count = mach_absolute_time(); - if (global_ipv4_changed || global_ipv6_changed || reachability_changed) { - SCNetworkReachabilityFlags reach_flags_v4 = 0; - SCNetworkReachabilityFlags reach_flags_v6 = 0; +#pragma mark - +#pragma mark Standalone test code - GetReachabilityFlagsFromTransientServices(services_info, - &reach_flags_v4, - &reach_flags_v6); - _nwi_state_set_reachability_flags(S_nwi_state, reach_flags_v4, reach_flags_v6); - } +#ifdef TEST_IPMONITOR - /* Update the per-interface generation count */ - _nwi_state_update_interface_generations(old_nwi_state, S_nwi_state, changes_state); - } +#include "dns-configuration.c" - if (update_nwi(S_nwi_state)) { - changes |= NETWORK_CHANGE_NET; +#if !TARGET_IPHONE_SIMULATOR +#include "set-hostname.c" +#endif /* !TARGET_IPHONE_SIMULATOR */ - /* - * the DNS configuration includes per-resolver configuration - * reachability flags that are based on the nwi state. Let's - * make sure that we check for changes - */ - dnsinfo_changed = TRUE; - } - } - if (dns_changed) { - if (update_dns(services_info, S_primary_dns, &keys)) { - changes |= NETWORK_CHANGE_DNS; - dnsinfo_changed = TRUE; - } else { - dns_changed = FALSE; - } - } - if (dnsinfo_changed) { - if (update_dnsinfo(services_info, S_primary_dns, &keys, service_order)) { - changes |= NETWORK_CHANGE_DNS; - } else { - dnsinfo_changed = FALSE; - } - } - if (proxies_changed) { - // if proxy change OR supplemental Proxies follow supplemental DNS - if (update_proxies(services_info, S_primary_proxies, &keys, service_order)) { - changes |= NETWORK_CHANGE_PROXY; - } else { - proxies_changed = FALSE; - } - } -#if !TARGET_OS_IPHONE - if (smb_changed) { - if (update_smb(services_info, S_primary_smb, &keys)) { - changes |= NETWORK_CHANGE_SMB; - } else { - smb_changed = FALSE; - } - } -#endif /* !TARGET_OS_IPHONE */ - my_CFRelease(&service_changes); - my_CFRelease(&services_info); - my_CFRelease(&if_rank_changes); +int +main(int argc, char **argv) +{ + _sc_log = FALSE; - if (changes != 0) { - network_change_msg = - generate_log_changes(changes_state, - dns_changed, - dnsinfo_changed, - old_primary_dns, - proxies_changed, - old_primary_proxy, -#if !TARGET_OS_IPHONE - smb_changed, - old_primary_smb -#else // !TARGET_OS_IPHONE - FALSE, // smb_changed - NULL // old_primary_smb -#endif // !TARGET_OS_IPHONE - ); + S_IPMonitor_debug = kDebugFlag1; + if (argc > 1) { + S_IPMonitor_debug = strtoul(argv[1], NULL, 0); } - keyChangeListApplyToStore(&keys, session); - my_CFRelease(&old_primary_dns); - my_CFRelease(&old_primary_proxy); -#if !TARGET_OS_IPHONE - my_CFRelease(&old_primary_smb); -#endif // !TARGET_OS_IPHONE + load_IPMonitor(CFBundleGetMainBundle(), FALSE); + prime_IPMonitor(); + S_IPMonitor_debug = kDebugFlag1; + CFRunLoopRun(); + /* not reached */ + exit(0); + return 0; +} +#endif /* TEST_IPMONITOR */ - if (changes != 0) { - dispatch_async(__network_change_queue(), ^{ - post_network_change(changes); - }); - } +#ifdef TEST_ROUTELIST +#include "dns-configuration.c" +#include "set-hostname.c" - if ((network_change_msg != NULL) && (CFStringGetLength(network_change_msg) != 0)) { - my_log(LOG_NOTICE, "network changed:%@", network_change_msg); - } else if (keyChangeListActive(&keys)) { - my_log(LOG_NOTICE, "network changed."); - } else { - my_log(LOG_DEBUG, "network event w/no changes"); - } +struct route { + const char * dest; + int prefix_length; + const char * gateway; + const char * ifname; +}; + +#endif + +#ifdef TEST_IPV4_ROUTELIST + +typedef struct { + const char * addr; + int prefix_length; + const char * dest; + const char * router; + const char * ifname; + Rank rank; + const CFStringRef * primary_rank; + struct route * additional_routes; + int additional_routes_count; + struct route * excluded_routes; + int excluded_routes_count; +} IPv4ServiceContents; + +typedef const IPv4ServiceContents * IPv4ServiceContentsRef; + +struct route loop_routelist[] = { + { "1.1.1.1", 32, "1.1.1.2", NULL }, + { "1.1.1.2", 32, "1.1.1.3", NULL }, + { "1.1.1.3", 32, "1.1.1.4", NULL }, + { "1.1.1.4", 32, "1.1.1.5", NULL }, + { "1.1.1.5", 32, "1.1.1.6", NULL }, + { "1.1.1.6", 32, "1.1.1.7", NULL }, + { "1.1.1.7", 32, "1.1.1.8", NULL }, + { "1.1.1.8", 32, "1.1.1.9", NULL }, + { "1.1.1.9", 32, "1.1.1.10", NULL }, + { "1.1.1.10", 32, "1.1.1.11", NULL }, + { "1.1.1.11", 32, "1.1.1.1", NULL }, +}; + +struct route vpn_routelist[] = { + { "10.1.3.0", 24, "17.153.46.24", NULL }, + { "10.1.4.0", 24, "17.153.46.24", NULL }, + { "10.1.5.0", 24, "17.153.46.24", NULL }, + { "10.1.6.0", 24, "17.153.46.24", NULL }, + { "10.1.7.0", 24, "17.153.46.24", NULL }, + { "10.16.0.0", 12, "17.153.46.24", NULL }, + { "10.45.0.0", 16, "17.153.46.24", NULL }, + { "10.53.0.0", 16, "17.153.46.24", NULL }, + { "10.70.0.0", 15, "17.153.46.24", NULL }, + { "10.74.0.0", 15, "17.153.46.24", NULL }, + { "10.90.0.0", 15, "17.153.46.24", NULL }, + { "10.91.0.0", 16, "17.153.46.24", NULL }, + { "10.100.0.0", 16, "17.153.46.24", NULL }, + { "10.113.0.0", 16, "17.153.46.24", NULL }, + { "10.128.0.0", 9, "17.153.46.24", NULL }, + { "17.0.0.0", 9, "17.153.46.24", NULL }, + { "17.34.0.0", 16, "17.153.46.24", NULL }, + { "17.112.156.53", 32, "17.153.46.24", NULL }, + { "17.128.0.0", 10, "17.153.46.24", NULL }, + { "17.149.0.121", 32, "17.153.46.24", NULL }, + { "17.149.7.200", 32, "17.153.46.24", NULL }, + { "17.153.46.24", 32, "17.153.46.24", NULL }, + { "17.192.0.0", 12, "17.153.46.24", NULL }, + { "17.208.0.0", 15, "17.153.46.24", NULL }, + { "17.211.0.0", 16, "17.153.46.24", NULL }, + { "17.212.0.0", 14, "17.153.46.24", NULL }, + { "17.216.0.0", 13, "17.153.46.24", NULL }, + { "17.224.0.0", 12, "17.153.46.24", NULL }, + { "17.240.0.0", 16, "17.153.46.24", NULL }, + { "17.241.0.0", 16, "17.153.46.24", NULL }, + { "17.248.0.0", 14, "17.153.46.24", NULL }, + { "17.251.104.200", 32, "17.153.46.24", NULL }, + { "17.252.0.0", 16, "17.153.46.24", NULL }, + { "17.253.0.0", 16, "17.153.46.24", NULL }, + { "17.254.0.0", 16, "17.153.46.24", NULL }, + { "17.255.0.0", 16, "17.153.46.24", NULL }, + { "151.193.141.0", 27, "17.153.46.24", NULL }, + { "172.16.2.0", 24, "17.153.46.24", NULL }, + { "192.35.50.0", 24, "17.153.46.24", NULL }, + { "204.179.20.0", 24, "17.153.46.24", NULL }, + { "206.112.116.0", 24, "17.153.46.24", NULL }, +}; + +struct route vpn_routelist_ext[] = { + { "17.151.63.82", 32, "10.0.0.1", "en0" }, + { "17.151.63.81", 32, "17.151.63.81", "en0" }, + { "17.151.63.80", 32, NULL, NULL }, + { "17.1.0.0", 16, NULL, NULL }, + { "17.2.0.0", 24, NULL, NULL }, + { "10.0.0.0", 24, NULL, NULL }, +}; + +/* + * addr prefix dest router ifname pri rank additional-routes+count excluded-routes+count + */ +const IPv4ServiceContents en0_10 = { + "10.0.0.10", 24, NULL, "10.0.0.1", "en0", 10, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en0_15 = { + "10.0.0.19", 24, NULL, "10.0.0.1", "en0", 15, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en0_30 = { + "10.0.0.11", 24, NULL, "10.0.0.1", "en0", 30, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en0_40 = { + "10.0.0.12", 24, NULL, "10.0.0.1", "en0", 40, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en0_50 = { + "10.0.0.13", 24, NULL, "10.0.0.1", "en0", 50, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en0_110 = { + "192.168.2.10", 24, NULL, "192.168.2.1", "en0", 110, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en0_1 = { + "17.202.40.191", 22, NULL, "17.202.20.1", "en0", 1, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en1_20 = { + "10.0.0.20", 24, NULL, "10.0.0.1", "en1", 20, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en1_2 = { + "17.202.42.24", 22, NULL, "17.202.20.1", "en1", 2, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en1_125 = { + "192.168.2.20", 24, NULL, "192.168.2.1", "en1", 125, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents fw0_25 = { + "192.168.2.30", 24, NULL, "192.168.2.1", "fw0", 25, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents fw0_21 = { + "192.168.3.30", 24, NULL, "192.168.3.1", "fw0", 21, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents ppp0_0_1 = { + "17.219.156.22", -1, "17.219.156.1", "17.219.156.1", "ppp0", 0, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents utun0 = { + "17.153.46.24", -1, "17.153.46.24", "17.153.46.24", "utun0", 20, NULL, vpn_routelist, countof(vpn_routelist), vpn_routelist_ext, countof(vpn_routelist_ext) +}; + +const IPv4ServiceContents en0_test6 = { + "17.202.42.113", 22, NULL, "17.202.40.1", "en0", 2, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en1_test6 = { + "17.202.42.111", 22, NULL, "17.202.40.1", "en1", 3, NULL, NULL, 0, NULL, 0 +}; + +const IPv4ServiceContents en2_test6 = { + "17.255.98.164", 20, NULL, "17.255.96.1", "en2", 1, NULL, NULL, 0, NULL, 0 +}; - my_CFRelease(&network_change_msg); +const IPv4ServiceContents en0_test7 = { + "17.202.42.113", 22, NULL, "17.202.40.1", "en0", 3, NULL, NULL, 0, NULL, 0 +}; - if (changes_state != NULL) { - nwi_state_release(changes_state); - } - if (old_nwi_state != NULL) { - nwi_state_release(old_nwi_state); - } - keyChangeListFree(&keys); - return; -} +const IPv4ServiceContents en1_test7 = { + "17.202.42.111", 22, NULL, "17.202.40.1", "en1", 2, NULL, NULL, 0, NULL, 0 +}; -static void -watch_proxies() -{ -#if !TARGET_OS_IPHONE - const _scprefs_observer_type type = scprefs_observer_type_mcx; -#else - const _scprefs_observer_type type = scprefs_observer_type_global; -#endif - static dispatch_queue_t proxy_cb_queue; +const IPv4ServiceContents en2_test7 = { + "17.255.98.164", 20, NULL, "17.255.96.1", "en2", 1, NULL, NULL, 0, NULL, 0 +}; - proxy_cb_queue = dispatch_queue_create("com.apple.SystemConfiguration.IPMonitor.proxy", NULL); - _scprefs_observer_watch(type, - "com.apple.SystemConfiguration.plist", - proxy_cb_queue, - ^{ - SCDynamicStoreNotifyValue(NULL, S_state_global_proxies); - notify_post(_SC_NOTIFY_NETWORK_CHANGE_PROXY); - my_log(LOG_DEBUG, "IPMonitor: Notifying:\n%@", - S_state_global_proxies); - }); - return; -} +const IPv4ServiceContents fw0_test6_and_7 = { + "169.254.11.33", 16, NULL, NULL, "fw0", 0x0ffffff, NULL, NULL, 0, NULL, 0 +}; -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) -#include "IPMonitorControlPrefs.h" +const IPv4ServiceContents en0_10_last = { + "10.0.0.10", 24, NULL, "10.0.0.1", "en0", 10, &kSCValNetServicePrimaryRankLast, NULL, 0, NULL, 0 +}; -__private_extern__ SCLoggerRef -my_log_get_logger() -{ - return (S_IPMonitor_logger); -} +const IPv4ServiceContents en0_10_never = { + "10.0.0.10", 24, NULL, "10.0.0.1", "en0", 10, &kSCValNetServicePrimaryRankNever, NULL, 0, NULL, 0 +}; -static void -prefs_changed(__unused SCPreferencesRef prefs) -{ - if (S_bundle_logging_verbose || IPMonitorControlPrefsIsVerbose()) { - S_IPMonitor_debug = kDebugFlagDefault; - S_IPMonitor_verbose = TRUE; - SCLoggerSetFlags(S_IPMonitor_logger, kSCLoggerFlagsFile | kSCLoggerFlagsDefault); - my_log(LOG_DEBUG, "IPMonitor: Setting logging verbose mode on."); - } else { - my_log(LOG_DEBUG, "IPMonitor: Setting logging verbose mode off."); - S_IPMonitor_debug = 0; - S_IPMonitor_verbose = FALSE; - SCLoggerSetFlags(S_IPMonitor_logger, kSCLoggerFlagsDefault); - } - return; -} +const IPv4ServiceContents en1_20_first = { + "10.0.0.20", 24, NULL, "10.0.0.1", "en1", 20, &kSCValNetServicePrimaryRankFirst, NULL, 0, NULL, 0 +}; -#define LOGGER_ID CFSTR("com.apple.networking.IPMonitor") -static void -my_log_init() -{ - if (S_IPMonitor_logger != NULL) { - return; - } - S_IPMonitor_logger = SCLoggerCreate(LOGGER_ID); - return; +const IPv4ServiceContents en1_20_never = { + "10.0.0.20", 24, NULL, "10.0.0.1", "en1", 20, &kSCValNetServicePrimaryRankNever, NULL, 0, NULL, 0 +}; -} +const IPv4ServiceContents en1_20_other_never = { + "192.168.2.50", 24, NULL, "192.168.2.1", "en1", 20, &kSCValNetServicePrimaryRankNever, NULL, 0, NULL, 0 +}; -#else // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) +const IPv4ServiceContents en0_linklocal = { + "169.254.22.44", 16, NULL, NULL, "en0", 0xfffff, NULL, NULL, 0, NULL, 0 +}; -static void -my_log_init() -{ - return; -} +const IPv4ServiceContents en0_route_loop = { + "192.168.130.16", 24, NULL, "192.168.130.1", "en0", 2, NULL, loop_routelist, countof(loop_routelist), NULL, 0 +}; -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) +typedef struct { + const char * name; + IPv4ServiceContentsRef test[]; +} IPv4RouteTest, * IPv4RouteTestRef; +static IPv4RouteTest test1 = { + "test1", + { + &en0_40, + &en0_15, + &fw0_25, + &en0_30, + &en1_20, + &en0_50, + &en0_10, + NULL + } +}; -static void -ip_plugin_init() -{ - CFMutableArrayRef keys = NULL; - CFStringRef pattern; - CFMutableArrayRef patterns = NULL; - CFRunLoopSourceRef rls = NULL; +static IPv4RouteTest test2 = { + "test2", + { + &en0_40, + &fw0_25, + &en0_30, + &en1_20, + &en0_50, + &en0_10, + NULL + } +}; - if (S_is_network_boot() != 0) { - S_netboot = TRUE; +static IPv4RouteTest test3 = { + "test3", + { + &en0_40, + &en1_20, + &en0_50, + &en0_10, + &en0_110, + &en1_125, + &fw0_25, + &fw0_21, + &en0_40, + &en0_30, + NULL } +}; -#ifdef RTF_IFSCOPE - if (S_is_scoped_routing_enabled() != 0) { - S_scopedroute = TRUE; +static IPv4RouteTest test4 = { + "test4", + { + &en0_1, + &en0_40, + &en0_30, + &en1_20, + &en1_2, + NULL } +}; - if (S_is_scoped_v6_routing_enabled() != 0) { - S_scopedroute_v6 = TRUE; +static IPv4RouteTest test5 = { + "test5", + { + &ppp0_0_1, + &en0_1, + &en0_40, + &en0_30, + &en1_20, + &en1_2, + NULL } -#endif /* RTF_IFSCOPE */ +}; - S_session = SCDynamicStoreCreate(NULL, CFSTR("IPMonitor"), - IPMonitorNotify, NULL); - if (S_session == NULL) { - my_log(LOG_ERR, - "IPMonitor ip_plugin_init SCDynamicStoreCreate failed: %s", - SCErrorString(SCError())); - return; +static IPv4RouteTest test6 = { + "test6", + { + &en0_test6, + &en1_test6, + &en2_test6, + &fw0_test6_and_7, + NULL } - S_state_global_ipv4 - = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetIPv4); - S_state_global_ipv6 - = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetIPv6); - S_state_global_dns - = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetDNS); - S_state_global_proxies - = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetProxies); -#if !TARGET_OS_IPHONE - S_state_global_smb - = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetSMB); -#endif /* !TARGET_OS_IPHONE */ - S_setup_global_ipv4 - = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCEntNetIPv4); - S_state_service_prefix - = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - CFSTR(""), - NULL); - S_setup_service_prefix - = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - CFSTR(""), - NULL); - S_service_state_dict - = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); +}; - S_ipv4_service_rank_dict - = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); +static IPv4RouteTest test7 = { + "test7", + { + &en0_test7, + &en1_test7, + &en2_test7, + &fw0_test6_and_7, + NULL + } +}; - S_ipv6_service_rank_dict - = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); +static IPv4RouteTest test8 = { + "test8", + { + &en0_10, + &en1_20, + NULL + } +}; - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); +static IPv4RouteTest test9 = { + "test9", + { + &en0_10, + &en1_20_first, + &fw0_25, + NULL + } +}; - /* register for State: and Setup: per-service notifications */ - add_service_keys(kSCCompAnyRegex, keys, patterns); +static IPv4RouteTest test10 = { + "test10", + { + &en0_10_last, + &en1_20, + &fw0_25, + NULL + } +}; - pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetPPP); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); +static IPv4RouteTest test11 = { + "test11", + { + &en0_10_never, + &en1_20, + &fw0_25, + NULL + } +}; - pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetVPN); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); +static IPv4RouteTest test12 = { + "test12", + { + &en0_10, + &en1_20, + NULL + } +}; - pattern = setup_service_key(kSCCompAnyRegex, kSCEntNetInterface); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); +static IPv4RouteTest test13 = { + "test13", + { + &en0_10, + &en1_20_never, + NULL + } +}; - /* register for State: per-service PPP/VPN/IPSec status notifications */ - add_status_keys(kSCCompAnyRegex, patterns); +static IPv4RouteTest test14 = { + "test14", + { + &en1_20_never, + NULL + } +}; - /* register for interface rank notifications */ - pattern = if_rank_key_copy(kSCCompAnyRegex); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); +static IPv4RouteTest test15 = { + "test15", + { + &en0_linklocal, + NULL + } +}; - /* add notifier for ServiceOrder/PPPOverridePrimary changes for IPv4 */ - CFArrayAppendValue(keys, S_setup_global_ipv4); +static IPv4RouteTest test16 = { + "test16", + { + &en0_10, + &utun0, + NULL + } +}; - /* add notifier for multicast DNS configuration (Bonjour/.local) */ - S_multicast_resolvers = SCDynamicStoreKeyCreate(NULL, CFSTR("%@/%@/%@"), - kSCDynamicStoreDomainState, - kSCCompNetwork, - CFSTR(kDNSServiceCompMulticastDNS)); - CFArrayAppendValue(keys, S_multicast_resolvers); +static IPv4RouteTest test17 = { + "test17", + { + &en0_10, + &en1_20_other_never, + NULL + } +}; - /* add notifier for private DNS configuration (Back to My Mac) */ - S_private_resolvers = SCDynamicStoreKeyCreate(NULL, CFSTR("%@/%@/%@"), - kSCDynamicStoreDomainState, - kSCCompNetwork, - CFSTR(kDNSServiceCompPrivateDNS)); - CFArrayAppendValue(keys, S_private_resolvers); +static IPv4RouteTest test18 = { + "test18", + { + &en0_route_loop, + NULL + } +}; - if (!SCDynamicStoreSetNotificationKeys(S_session, keys, patterns)) { - my_log(LOG_ERR, - "IPMonitor ip_plugin_init " - "SCDynamicStoreSetNotificationKeys failed: %s", - SCErrorString(SCError())); - goto done; +static IPv4RouteTestRef ipv4_tests[] = { + &test1, + &test2, + &test3, + &test4, + &test5, + &test6, + &test7, + &test8, + &test9, + &test10, + &test11, + &test12, + &test13, + &test14, + &test15, + &test16, + &test17, + &test18, + NULL +}; + +static boolean_t +ipv4_prefix_length_is_valid(int prefix_length) +{ + if (prefix_length < 0 || prefix_length > IPV4_ROUTE_ALL_BITS_SET) { + return (FALSE); } + return (TRUE); +} - rls = SCDynamicStoreCreateRunLoopSource(NULL, S_session, 0); - if (rls == NULL) { - my_log(LOG_ERR, - "IPMonitor ip_plugin_init " - "SCDynamicStoreCreateRunLoopSource failed: %s", - SCErrorString(SCError())); - goto done; +static void +dict_add_string(CFMutableDictionaryRef dict, CFStringRef prop_name, + const char * str) +{ + CFStringRef prop_val; + + if (str == NULL) { + return; } + prop_val = CFStringCreateWithCString(NULL, + str, + kCFStringEncodingASCII); + CFDictionarySetValue(dict, prop_name, prop_val); + CFRelease(prop_val); + return; +} - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - - /* initialize dns configuration */ - (void)dns_configuration_set(NULL, NULL, NULL, NULL, NULL); -#if !TARGET_OS_IPHONE - empty_dns(); -#endif /* !TARGET_OS_IPHONE */ - (void)SCDynamicStoreRemoveValue(S_session, S_state_global_dns); +static void +dict_add_string_as_array(CFMutableDictionaryRef dict, CFStringRef prop_name, + const char * str) +{ + CFArrayRef array; + CFStringRef prop_val; -#if !TARGET_OS_IPHONE - /* initialize SMB configuration */ - (void)SCDynamicStoreRemoveValue(S_session, S_state_global_smb); -#endif /* !TARGET_OS_IPHONE */ + if (str == NULL) { + return; + } + prop_val = CFStringCreateWithCString(NULL, + str, + kCFStringEncodingASCII); + array = CFArrayCreate(NULL, + (const void **)&prop_val, 1, + &kCFTypeArrayCallBacks); + CFRelease(prop_val); + CFDictionarySetValue(dict, prop_name, array); + CFRelease(array); + return; +} - if_rank_dict_init(); - watch_proxies(); +static void +dict_add_ip(CFMutableDictionaryRef dict, CFStringRef prop_name, + struct in_addr ip) +{ + CFStringRef str; - done: - my_CFRelease(&keys); - my_CFRelease(&patterns); + str = my_CFStringCreateWithInAddr(ip); + CFDictionarySetValue(dict, prop_name, str); + CFRelease(str); return; } -__private_extern__ -void -prime_IPMonitor() +static void +dict_add_ip_as_array(CFMutableDictionaryRef dict, CFStringRef prop_name, + struct in_addr ip) { - /* initialize multicast route */ - update_ipv4(NULL, NULL, NULL); + CFArrayRef array; + CFStringRef str; + + str = my_CFStringCreateWithInAddr(ip); + array = CFArrayCreate(NULL, + (const void **)&str, 1, + &kCFTypeArrayCallBacks); + CFRelease(str); + CFDictionarySetValue(dict, prop_name, array); + CFRelease(array); return; } -static boolean_t -S_get_plist_boolean(CFDictionaryRef plist, CFStringRef key, - boolean_t def) +static void +dict_insert_routes(CFMutableDictionaryRef dict, CFStringRef prop_name, + struct route * routes, int routes_count) { - CFBooleanRef b; - boolean_t ret = def; + int i; + CFMutableArrayRef route_list; + struct route * scan; - b = isA_CFBoolean(CFDictionaryGetValue(plist, key)); - if (b != NULL) { - ret = CFBooleanGetValue(b); + if (routes == NULL || routes_count == 0) { + return; } - return (ret); + route_list = CFArrayCreateMutable(NULL, routes_count, + &kCFTypeArrayCallBacks); + for (i = 0, scan = routes; i < routes_count; i++, scan++) { + struct in_addr mask; + CFMutableDictionaryRef route_dict; + + route_dict + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + dict_add_string(route_dict, kSCPropNetIPv4RouteDestinationAddress, + scan->dest); + if (ipv4_prefix_length_is_valid(scan->prefix_length)) { + mask.s_addr = htonl(prefix_to_mask32(scan->prefix_length)); + dict_add_ip(route_dict, kSCPropNetIPv4RouteSubnetMask, mask); + } + dict_add_string(route_dict, kSCPropNetIPv4RouteGatewayAddress, + scan->gateway); + dict_add_string(route_dict, kSCPropNetIPv4RouteInterfaceName, + scan->ifname); + CFArrayAppendValue(route_list, route_dict); + CFRelease(route_dict); + } + CFDictionarySetValue(dict, prop_name, route_list); + CFRelease(route_list); + return; } -__private_extern__ -void -load_IPMonitor(CFBundleRef bundle, Boolean bundleVerbose) +static CFDictionaryRef +make_IPv4_dict(IPv4ServiceContentsRef t) { - CFDictionaryRef info_dict; + CFMutableDictionaryRef dict; - info_dict = CFBundleGetInfoDictionary(bundle); + dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + dict_add_string_as_array(dict, kSCPropNetIPv4Addresses, t->addr); + if (ipv4_prefix_length_is_valid(t->prefix_length)) { + struct in_addr mask; - if (info_dict != NULL) { - S_append_state - = S_get_plist_boolean(info_dict, - CFSTR("AppendStateArrayToSetupArray"), - FALSE); - } - if (bundleVerbose) { - S_IPMonitor_debug = kDebugFlagDefault; - S_bundle_logging_verbose = bundleVerbose; - S_IPMonitor_verbose = TRUE; + mask.s_addr = htonl(prefix_to_mask32(t->prefix_length)); + dict_add_ip_as_array(dict, kSCPropNetIPv4SubnetMasks, mask); } + dict_add_string_as_array(dict, kSCPropNetIPv4DestAddresses, t->dest); + dict_add_string(dict, kSCPropNetIPv4Router, t->router); + dict_add_string(dict, kSCPropInterfaceName, t->ifname); + dict_add_string(dict, kSCPropConfirmedInterfaceName, t->ifname); + dict_insert_routes(dict, kSCPropNetIPv4AdditionalRoutes, + t->additional_routes, t->additional_routes_count); + dict_insert_routes(dict, kSCPropNetIPv4ExcludedRoutes, + t->excluded_routes, t->excluded_routes_count); + return (dict); +} - my_log_init(); - -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) - /* register to receive changes to verbose and read the initial setting */ - IPMonitorControlPrefsInit(CFRunLoopGetCurrent(), prefs_changed); - prefs_changed(NULL); - -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) +typedef enum { + kDirectionForwards = 0, + kDirectionBackwards = 1 +} Direction; - load_DNSConfiguration(bundle, // bundle - S_IPMonitor_logger, // SCLogger - &S_IPMonitor_verbose, // bundleVerbose - ^(Boolean inSync) { // syncHandler - dispatch_async(__network_change_queue(), ^{ - S_dnsinfo_synced = inSync; +typedef enum { + kLogRouteDisabled = 0, + kLogRouteEnabled = 1 +} LogRoute; - if (inSync && - ((S_network_change_needed & NETWORK_CHANGE_DNS) == 0)) { - // all of the mDNSResponder ack's should result - // in a [new] network change being posted - post_network_change(NETWORK_CHANGE_DNS); - } else { - post_network_change_when_ready(); - } - }); - }); +static IPv4RouteListRef +make_IPv4RouteList_for_test(IPv4RouteListRef list, + IPv4ServiceContentsRef test, + LogRoute log_it) +{ + CFDictionaryRef dict; + IPv4RouteListRef r; + Rank rank; + Rank rank_assertion = kRankAssertionDefault; + CFNumberRef rank_assertion_cf = NULL; + Boolean rank_assertion_is_set = FALSE; + IPv4RouteListRef ret = NULL; + IPV4_ROUTES_BUF_DECL(routes); - load_NetworkInformation(bundle, // bundle - S_IPMonitor_logger, // SCLogger - &S_IPMonitor_verbose, // bundleVerbose - ^(Boolean inSync) { // syncHandler - dispatch_async(__network_change_queue(), ^{ - S_nwi_synced = inSync; - post_network_change_when_ready(); - }); - }); + dict = make_IPv4_dict(test); + if (dict == NULL) { + fprintf(stderr, "make_IPv4_dict failed\n"); + exit(1); + } + if (test->primary_rank != NULL) { + rank_assertion + = PrimaryRankGetRankAssertion(*test->primary_rank, + &rank_assertion_is_set); + if (rank_assertion_is_set) { + rank_assertion_cf + = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank_assertion); + } + } + r = IPv4RouteListCreateWithDictionary(routes, dict, + rank_assertion_cf); + my_CFRelease(&rank_assertion_cf); + if (r == NULL) { + fprintf(stderr, "IPv4RouteListCreateWithDictionary failed\n"); + exit(1); + } - dns_configuration_init(bundle); + if (rank_assertion == kRankAssertionScoped) { + rank_assertion = kRankAssertionNever; + } + rank = RankMake(test->rank, rank_assertion); + if (log_it == kLogRouteEnabled + && (S_IPMonitor_debug & kDebugFlag4) != 0) { + CFStringRef descr; - proxy_configuration_init(bundle); + descr = IPv4RouteListCopyDescription(r); + SCLog(TRUE, LOG_NOTICE, CFSTR("Adding %@"), descr); + CFRelease(descr); + } + ret = IPv4RouteListAddRouteList(list, 1, r, rank); + if (r != routes) { + free(r); + } + CFRelease(dict); + return (ret); +} - ip_plugin_init(); +static IPv4RouteListRef +make_IPv4RouteList(IPv4ServiceContentsRef * test, Direction direction, + LogRoute log_it) +{ + IPv4RouteListRef ret = NULL; + IPv4ServiceContentsRef * scan; -#if !TARGET_OS_IPHONE - if (S_session != NULL) { - dns_configuration_monitor(S_session, IPMonitorNotify); + switch (direction) { + case kDirectionBackwards: + for (scan = test; *scan != NULL; scan++) { + /* find the end of the list */ + } + for (scan--; scan >= test; scan--) { + ret = make_IPv4RouteList_for_test(ret, *scan, log_it); + } + break; + default: + case kDirectionForwards: + for (scan = test; *scan != NULL; scan++) { + ret = make_IPv4RouteList_for_test(ret, *scan, log_it); + } + break; } -#endif /* !TARGET_OS_IPHONE */ + IPv4RouteListFinalize(ret); + return (ret); +} -#if !TARGET_IPHONE_SIMULATOR - load_hostname((S_IPMonitor_debug & kDebugFlag1) != 0); -#endif /* !TARGET_IPHONE_SIMULATOR */ +#define EMPHASIS_CHARS "=================" -#if !TARGET_OS_IPHONE - load_smb_configuration((S_IPMonitor_debug & kDebugFlag1) != 0); -#endif /* !TARGET_OS_IPHONE */ +/* + * Function: routelist_build_test + * Purpose: + * Runs through the given set of routes first in the forward direction, + * then again backwards. We should end up with exactly the same set of + * routes at the end. + */ +static boolean_t +routelist_build_test(IPv4RouteTestRef test) +{ + CFStringRef descr; + boolean_t ret = FALSE; + IPv4RouteListRef routes1; + IPv4RouteListRef routes2; - return; + printf("\n" EMPHASIS_CHARS "> RouteList Build '%s' <" + EMPHASIS_CHARS "\n", + test->name); + + routes1 = make_IPv4RouteList(test->test, kDirectionForwards, + kLogRouteEnabled); + if ((S_IPMonitor_debug & kDebugFlag4) != 0) { + if (routes1 != NULL) { + descr = IPv4RouteListCopyDescription(routes1); + SCPrint(TRUE, stdout, CFSTR("Routes are %@\n"), descr); + CFRelease(descr); + } + } + routes2 = make_IPv4RouteList(test->test, kDirectionBackwards, + kLogRouteEnabled); + if ((S_IPMonitor_debug & kDebugFlag4) != 0) { + if (routes2 != NULL) { + descr = IPv4RouteListCopyDescription(routes2); + SCPrint(TRUE, stdout, CFSTR("Routes are %@\n"), descr); + CFRelease(descr); + } + } + if ((routes1 != NULL && routes2 == NULL) + || (routes1 == NULL && routes2 != NULL)) { + fprintf(stderr, "routes1 is %sNULL but routes2 is %sNULL\n", + (routes1 != NULL) ? "not " : "", + (routes2 != NULL) ? "not " : ""); + } + else if (routes1 != NULL && routes2 != NULL) { + /* check if they are different */ + if (routes1->count != routes2->count) { + fprintf(stderr, "routes1 count %d != routes 2 count %d\n", + routes1->count, routes2->count); + } + else if (bcmp(routes1, routes2, + IPv4RouteListComputeSize(routes1->count)) != 0) { + fprintf(stderr, "routes1 and routes2 are different\n"); + } + else { + printf("routes1 and routes2 are the same\n"); + ret = TRUE; + } + } + if (routes1 != NULL) { + free(routes1); + } + if (routes2 != NULL) { + free(routes2); + } + printf(EMPHASIS_CHARS "> RouteList Build '%s': %s <" + EMPHASIS_CHARS "\n", + test->name, ret ? "PASSED" : "FAILED"); + return (ret); } +static void +apply_test(IPv4RouteTestRef old_test, IPv4RouteTestRef new_test) +{ + IPv4RouteListRef new_routes; + IPv4RouteListRef old_routes; -#pragma mark - -#pragma mark Standalone test code + printf("\n" EMPHASIS_CHARS "> Apply '%s', '%s' Begin <" + EMPHASIS_CHARS "\n", + old_test->name, new_test->name); + old_routes = make_IPv4RouteList(old_test->test, kDirectionForwards, + kLogRouteDisabled); + new_routes = make_IPv4RouteList(new_test->test, kDirectionForwards, + kLogRouteDisabled); + if (old_routes == NULL) { + printf("No Old Routes\n"); + } + else { + printf("Old routes ('%s') = ", old_test->name); + IPv4RouteListPrint(old_routes); + } -#ifdef TEST_IPMONITOR + /* apply the old routes */ + IPv4RouteListApply(NULL, old_routes, -1); -#include "dns-configuration.c" + if (new_routes == NULL) { + printf("No New Routes\n"); + } + else { + printf("New Routes ('%s') = ", new_test->name); + IPv4RouteListPrint(new_routes); + } -#if !TARGET_IPHONE_SIMULATOR -#include "set-hostname.c" -#endif /* !TARGET_IPHONE_SIMULATOR */ + /* apply the new routes */ + IPv4RouteListApply(old_routes, new_routes, -1); + + if (old_routes != NULL) { + free(old_routes); + } + if (new_routes != NULL) { + free(new_routes); + } + printf(EMPHASIS_CHARS "> Apply '%s', '%s' End <" + EMPHASIS_CHARS "\n", + old_test->name, new_test->name); + return; +} int main(int argc, char **argv) { - _sc_log = FALSE; + IPv4RouteTestRef * test; - S_IPMonitor_debug = kDebugFlag1; + _sc_log = FALSE; + _sc_verbose = (argc > 1) ? TRUE : FALSE; + S_IPMonitor_debug = kDebugFlag1 | kDebugFlag2 | kDebugFlag4; if (argc > 1) { S_IPMonitor_debug = strtoul(argv[1], NULL, 0); } + S_scopedroute = (argc < 3); + for (test = ipv4_tests; *test != NULL; test++) { + if (routelist_build_test(*test) == FALSE) { + fprintf(stderr, "%s failed\n", (*test)->name); + exit(1); + } + } + for (test = ipv4_tests; *test != NULL; test++) { + IPv4RouteTestRef * test2; - load_IPMonitor(CFBundleGetMainBundle(), FALSE); - prime_IPMonitor(); - S_IPMonitor_debug = kDebugFlag1; - CFRunLoopRun(); - /* not reached */ + for (test2 = test + 1; *test2 != NULL; test2++) { + apply_test(*test, *test2); + apply_test(*test2, *test); + } + } + + { + char cmd[128]; + + printf("\nChecking for leaks\n"); + sprintf(cmd, "leaks %d 2>&1", getpid()); + fflush(stdout); + (void)system(cmd); + } exit(0); - return 0; + return (0); } -#endif /* TEST_IPMONITOR */ - -#ifdef TEST_IPV4_ROUTELIST -#include "dns-configuration.c" +#endif /* TEST_IPV4_ROUTELIST */ -#if !TARGET_IPHONE_SIMULATOR -#include "set-hostname.c" -#endif /* !TARGET_IPHONE_SIMULATOR */ +#ifdef TEST_IPV6_ROUTELIST -struct ipv4_service_contents { +typedef struct { const char * addr; - const char * mask; + int prefix_length; const char * dest; +} IPv6Address; + +typedef const IPv6Address * IPv6AddressRef; + +typedef struct { + IPv6AddressRef addr; + int addr_count; const char * router; const char * ifname; Rank rank; - const CFStringRef *primaryRank; + const CFStringRef * primary_rank; + struct route * additional_routes; + int additional_routes_count; + struct route * excluded_routes; + int excluded_routes_count; +} IPv6ServiceContents; + +typedef const IPv6ServiceContents * IPv6ServiceContentsRef; + +struct route loop_routelist[] = { + { "2620:149:4:f01:225:ff:fecc:89a1", 128, + "2620:149:4:f01:225:ff:fecc:89a2", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a2", 128, + "2620:149:4:f01:225:ff:fecc:89a3", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a3", 128, + "2620:149:4:f01:225:ff:fecc:89a4", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a4", 128, + "2620:149:4:f01:225:ff:fecc:89a5", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a5", 128, + "2620:149:4:f01:225:ff:fecc:89a6", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a6", 128, + "2620:149:4:f01:225:ff:fecc:89a7", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a7", 128, + "2620:149:4:f01:225:ff:fecc:89a8", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a8", 128, + "2620:149:4:f01:225:ff:fecc:89a9", NULL }, + { "2620:149:4:f01:225:ff:fecc:89a9", 128, + "2620:149:4:f01:225:ff:fecc:89aa", NULL }, + { "2620:149:4:f01:225:ff:fecc:89aa", 128, + "2620:149:4:f01:225:ff:fecc:89ab", NULL }, + { "2620:149:4:f01:225:ff:fecc:89ab", 128, + "2620:149:4:f01:225:ff:fecc:89a1", NULL }, }; -/* - * addr mask dest router ifname pri primaryRank - */ -struct ipv4_service_contents en0_10 = { - "10.0.0.10", "255.255.255.0", NULL, "10.0.0.1", "en0", 10, NULL +struct route vpn_routelist[] = { + { "2010:470:1f05:3cb::", 64, + "fe80::2d0:bcff:fe3d:8c00", NULL }, + { "2010:222:3fa5:acb::", 48, + "fe80::2d0:bcff:fe3d:8c00", NULL }, + { "2010:222:3fa5:1234::", 40, + "fe80::2d0:bcff:fe3d:8c00", NULL }, + { "2010:222:3fa5:5678::", 40, + NULL, NULL }, }; -struct ipv4_service_contents en0_15 = { - "10.0.0.19", "255.255.255.0", NULL, "10.0.0.1", "en0", 15, NULL +struct route vpn_routelist_ext[] = { + { "2020:299:a:e02:825:1ed:fecc:abab", 128, NULL, NULL }, }; -struct ipv4_service_contents en0_30 = { - "10.0.0.11", "255.255.255.0", NULL, "10.0.0.1", "en0", 30, NULL +struct route en1_routelist_ext[] = { + { "2020:299:abcd:ef12::", 64, NULL, NULL }, }; -struct ipv4_service_contents en0_40 = { - "10.0.0.12", "255.255.255.0", NULL, "10.0.0.1", "en0", 40, NULL -}; -struct ipv4_service_contents en0_50 = { - "10.0.0.13", "255.255.255.0", NULL, "10.0.0.1", "en0", 50, NULL +static const IPv6Address en0_addr1[] = { + { "2001:470:1f05:3cb:cabc:c8ff:fe96:9601", 64, NULL }, + { "2001:470:1f05:3cb:5c95:58b1:b956:6101", 64, NULL } }; -struct ipv4_service_contents en0_110 = { - "192.168.2.10", "255.255.255.0", NULL, "192.168.2.1", "en0", 110, NULL +static const IPv6Address en0_addr2[] = { + { "2001:470:1f05:3cb:cabc:c8ff:fe96:9602", 64, NULL }, + { "2001:470:1f05:3cb:5c95:58b1:b956:6102", 64, NULL } }; -struct ipv4_service_contents en0_1 = { - "17.202.40.191", "255.255.252.0", NULL, "17.202.20.1", "en0", 1, NULL +static const IPv6Address en0_addr3[] = { + { "2001:470:1f05:3cb:cabc:c8ff:fe96:9603", 64, NULL }, + { "2001:470:1f05:3cb:5c95:58b1:b956:6103", 64, NULL } }; -struct ipv4_service_contents en1_20 = { - "10.0.0.20", "255.255.255.0", NULL, "10.0.0.1", "en1", 20, NULL +static const IPv6Address en0_addr4[] = { + { "2001:470:1f05:3cb:cabc:c8ff:fe96:9604", 64, NULL }, + { "2001:470:1f05:3cb:5c95:58b1:b956:6104", 64, NULL } }; -struct ipv4_service_contents en1_2 = { - "17.202.42.24", "255.255.252.0", NULL, "17.202.20.1", "en1", 2, NULL +static const IPv6Address en0_addr5[] = { + { "2001:470:1f05:3cb:cabc:c8ff:fe96:9605", 64, NULL }, + { "2001:470:1f05:3cb:5c95:58b1:b956:6105", 64, NULL } }; -struct ipv4_service_contents en1_125 = { - "192.168.2.20", "255.255.255.0", NULL, "192.168.2.1", "en1", 125, NULL +static const IPv6Address en0_addr6[] = { + { "2020:299:abcd:ef12:1:2:3:4", 64, NULL }, }; -struct ipv4_service_contents fw0_25 = { - "192.168.2.30", "255.255.255.0", NULL, "192.168.2.1", "fw0", 25, NULL +static const IPv6Address en0_lladdr[] = { + { "fe80::cabc:c8ff:fe96:96af", 64, NULL } }; -struct ipv4_service_contents fw0_21 = { - "192.168.3.30", "255.255.255.0", NULL, "192.168.3.1", "fw0", 21, NULL +static const IPv6Address en1_addr[] = { + { "2001:470:1f05:3cb:cabc:c8ff:fed9:125a", 64, NULL }, + { "2001:470:1f05:3cb:2d5e:4ec3:304:5b9c", 64, NULL } }; -struct ipv4_service_contents ppp0_0_1 = { - "17.219.156.22", NULL, "17.219.156.1", "17.219.156.1", "ppp0", 0, NULL +static const IPv6Address utun0_addr[] = { + { "2620:149:4:f01:225:ff:fecc:89aa", 64, NULL }, }; -struct ipv4_service_contents en0_test6 = { - "17.202.42.113", "255.255.252.0", NULL, "17.202.40.1", "en0", 2, NULL -}; -struct ipv4_service_contents en1_test6 = { - "17.202.42.111", "255.255.252.0", NULL, "17.202.40.1", "en1", 3, NULL -}; -struct ipv4_service_contents en2_test6 = { - "17.255.98.164", "255.255.240.0", NULL, "17.255.96.1", "en2", 1, NULL +static const IPv6Address fw0_addr1[] = { + { "2011:470:1f05:3cb:cabc:c8ff:fe96:ab01", 64, NULL }, + { "2011:470:1f05:3cb:5c95:58b1:b956:ab01", 64, NULL } }; -struct ipv4_service_contents en0_test7 = { - "17.202.42.113", "255.255.252.0", NULL, "17.202.40.1", "en0", 3, NULL -}; -struct ipv4_service_contents en1_test7 = { - "17.202.42.111", "255.255.252.0", NULL, "17.202.40.1", "en1", 2, NULL -}; -struct ipv4_service_contents en2_test7 = { - "17.255.98.164", "255.255.240.0", NULL, "17.255.96.1", "en2", 1, NULL -}; -struct ipv4_service_contents fw0_test6_and_7 = { - "169.254.11.33", "255.255.0.0", NULL, NULL, "fw0", 0x0ffffff, NULL -}; +/* + * address+address-count + * router ifname pri rank additional-routes+count excluded-routes+count + */ -struct ipv4_service_contents en0_10_last = { - "10.0.0.10", "255.255.255.0", NULL, "10.0.0.1", "en0", 10, &kSCValNetServicePrimaryRankLast +static const IPv6ServiceContents en0_10 = { + en0_addr1, countof(en0_addr1), + "fe80::21f:f3ff:fe43:1abf", "en0", 10, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents en0_10_never = { - "10.0.0.10", "255.255.255.0", NULL, "10.0.0.1", "en0", 10, &kSCValNetServicePrimaryRankNever +static const IPv6ServiceContents en0_15 = { + en0_addr2, countof(en0_addr2), + "fe80::21f:f3ff:fe43:1abf", "en0", 15, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents en1_20_first = { - "10.0.0.20", "255.255.255.0", NULL, "10.0.0.1", "en1", 20, &kSCValNetServicePrimaryRankFirst +static const IPv6ServiceContents en0_30 = { + en0_addr3, countof(en0_addr3), + "fe80::21f:f3ff:fe43:1abf", "en0", 30, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents en1_20_never = { - "10.0.0.20", "255.255.255.0", NULL, "10.0.0.1", "en1", 20, &kSCValNetServicePrimaryRankNever +static const IPv6ServiceContents en0_40 = { + en0_addr4, countof(en0_addr4), + "fe80::21f:f3ff:fe43:1abf", "en0", 40, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents en0_linklocal = { - "169.254.22.44", "255.255.0.0", NULL, NULL, "en0", 0xfffff, NULL +static const IPv6ServiceContents en0_50 = { + en0_addr5, countof(en0_addr5), + "fe80::21f:f3ff:fe43:1abf", "en0", 50, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents * test1[] = { - &en0_40, - &en0_15, - &fw0_25, - &en0_30, - &en1_20, - &en0_50, - &en0_10, - NULL +static const IPv6ServiceContents en0_10_a = { + en0_addr6, countof(en0_addr6), + "fe80::21f:f3ff:fe43:1abf", "en0", 10, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents * test2[] = { - &en0_40, - &fw0_25, - &en0_30, - &en1_20, - &en0_50, - &en0_10, - NULL +static const IPv6ServiceContents fw0_25 = { + fw0_addr1, countof(fw0_addr1), + "fe80::21f:f3ff:fe43:1abf", "fw0", 25, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents * test3[] = { - &en0_40, - &en1_20, - &en0_50, - &en0_10, - &en0_110, - &en1_125, - &fw0_25, - &fw0_21, - &en0_40, - &en0_30, - NULL +static const IPv6ServiceContents en1_20 = { + en1_addr, countof(en1_addr), + "fe80::21f:f3ff:fe43:1abf", "en1", 20, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents * test4[] = { - &en0_1, - &en0_40, - &en0_30, - &en1_20, - &en1_2, - NULL +static const IPv6ServiceContents en1_10_ext = { + en1_addr, countof(en1_addr), + "fe80::21f:f3ff:fe43:1abf", "en1", 10, NULL, NULL, 0, + en1_routelist_ext, countof(en1_routelist_ext) }; -struct ipv4_service_contents * test5[] = { - &ppp0_0_1, - &en0_1, - &en0_40, - &en0_30, - &en1_20, - &en1_2, - NULL +static const IPv6ServiceContents en0_0_lladdr = { + en0_lladdr, countof(en0_lladdr), + "fe80::21f:f3ff:fe43:1abf", "en0", 20, NULL, NULL, 0, NULL, 0 }; -struct ipv4_service_contents * test6[] = { - &en0_test6, - &en1_test6, - &en2_test6, - &fw0_test6_and_7, - NULL +static const IPv6ServiceContents en0_loop = { + en0_addr1, countof(en0_addr1), + "fe80::21f:f3ff:fe43:1abf", "en0", 10, NULL, + loop_routelist, countof(loop_routelist), NULL, 0 }; -struct ipv4_service_contents * test7[] = { - &en0_test7, - &en1_test7, - &en2_test7, - &fw0_test6_and_7, - NULL +static const IPv6ServiceContents utun0 = { + utun0_addr, countof(utun0_addr), + "fe80::2d0:bcff:fe3d:8c00", "utun0", 40, NULL, + vpn_routelist, countof(vpn_routelist), + vpn_routelist_ext, countof(vpn_routelist_ext), }; -struct ipv4_service_contents * test8[] = { - &en0_10, - &en1_20, - NULL -}; +typedef struct { + const char * name; + IPv6ServiceContentsRef test[]; +} IPv6RouteTest, * IPv6RouteTestRef; -struct ipv4_service_contents * test9[] = { - &en0_10, - &en1_20_first, - &fw0_25, - NULL +static IPv6RouteTest test1 = { + "test1", + { + &en0_40, + &en0_15, + &fw0_25, + &en0_30, + &en1_20, + &en0_50, + &en0_10, + NULL + } }; -struct ipv4_service_contents * test10[] = { - &en0_10_last, - &en1_20, - &fw0_25, - NULL +static IPv6RouteTest test2 = { + "test2", + { + &en0_40, + &fw0_25, + &en0_30, + &en1_20, + &en0_50, + &en0_10, + NULL + } }; -struct ipv4_service_contents * test11[] = { - &en0_10_never, - &en1_20, - &fw0_25, - NULL +static IPv6RouteTest test3 = { + "test3", + { + &en0_10_a, + &en1_10_ext, + NULL + } }; -struct ipv4_service_contents * test12[] = { - &en0_10, - &en1_20, - NULL +static IPv6RouteTest test4 = { + "test4", + { + &en0_loop, + &en1_20, + NULL + } }; -struct ipv4_service_contents * test13[] = { - &en0_10, - &en1_20_never, - NULL +static IPv6RouteTest test5 = { + "test5", + { + &en0_10, + &utun0, + &en0_0_lladdr, + &en1_20, + NULL + } }; -struct ipv4_service_contents * test14[] = { - &en1_20_never, - NULL -}; -struct ipv4_service_contents * test15[] = { - &en0_linklocal, +static IPv6RouteTestRef ipv6_tests[] = { + &test1, + &test2, + &test3, + &test4, + &test5, NULL }; + static void dict_add_string(CFMutableDictionaryRef dict, CFStringRef prop_name, const char * str) @@ -6784,189 +9412,273 @@ dict_add_string(CFMutableDictionaryRef dict, CFStringRef prop_name, } static void -dict_add_string_as_array(CFMutableDictionaryRef dict, CFStringRef prop_name, - const char * str) +dict_add_int(CFMutableDictionaryRef dict, CFStringRef prop_name, + int int_val) { - CFArrayRef array; - CFStringRef prop_val; + CFNumberRef num; - if (str == NULL) { + num = CFNumberCreate(NULL, kCFNumberIntType, &int_val); + CFDictionarySetValue(dict, prop_name, num); + CFRelease(num); + return; +} + +static void +dict_insert_v6_routes(CFMutableDictionaryRef dict, CFStringRef prop_name, + struct route * routes, int routes_count) +{ + int i; + CFMutableArrayRef route_list; + struct route * scan; + + if (routes == NULL || routes_count == 0) { return; } - prop_val = CFStringCreateWithCString(NULL, - str, - kCFStringEncodingASCII); - array = CFArrayCreate(NULL, - (const void **)&prop_val, 1, - &kCFTypeArrayCallBacks); - CFRelease(prop_val); - CFDictionarySetValue(dict, prop_name, array); - CFRelease(array); + route_list = CFArrayCreateMutable(NULL, routes_count, + &kCFTypeArrayCallBacks); + for (i = 0, scan = routes; i < routes_count; i++, scan++) { + CFMutableDictionaryRef route_dict; + + route_dict = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + dict_add_string(route_dict, kSCPropNetIPv6RouteDestinationAddress, + scan->dest); + dict_add_int(route_dict, kSCPropNetIPv6PrefixLength, + scan->prefix_length); + dict_add_string(route_dict, kSCPropNetIPv6RouteGatewayAddress, + scan->gateway); + dict_add_string(route_dict, kSCPropNetIPv6RouteInterfaceName, + scan->ifname); + CFArrayAppendValue(route_list, route_dict); + CFRelease(route_dict); + } + CFDictionarySetValue(dict, prop_name, route_list); + CFRelease(route_list); + return; +} + +static void +array_add_string(CFMutableArrayRef array, const char * c_str) +{ + CFStringRef str; + + str = CFStringCreateWithCString(NULL, + c_str, + kCFStringEncodingUTF8); + CFArrayAppendValue(array, str); + CFRelease(str); + return; +} + +static void +array_add_int(CFMutableArrayRef array, int int_val) +{ + CFNumberRef num; + + num = CFNumberCreate(NULL, kCFNumberIntType, &int_val); + CFArrayAppendValue(array, num); + CFRelease(num); + return; +} + +static void +dict_add_ipv6_addressing(CFMutableDictionaryRef dict, + IPv6AddressRef list, int list_count) +{ + CFMutableArrayRef addr = NULL; + CFMutableArrayRef dest = NULL; + int i; + CFMutableArrayRef prefix = NULL; + IPv6AddressRef scan; + + if (list == NULL || list_count == 0) { + return; + } + for (i = 0, scan = list; i < list_count; i++, scan++) { + if (scan->addr != NULL) { + if (addr == NULL) { + addr = CFArrayCreateMutable(NULL, list_count, + &kCFTypeArrayCallBacks); + } + array_add_string(addr, scan->addr); + } + if (scan->prefix_length >= 0) { + if (prefix == NULL) { + prefix = CFArrayCreateMutable(NULL, list_count, + &kCFTypeArrayCallBacks); + } + array_add_int(prefix, scan->prefix_length); + } + if (scan->dest != NULL) { + if (dest == NULL) { + dest = CFArrayCreateMutable(NULL, list_count, + &kCFTypeArrayCallBacks); + } + array_add_string(dest, scan->dest); + } + } + if (addr != NULL) { + CFDictionarySetValue(dict, kSCPropNetIPv6Addresses, addr); + CFRelease(addr); + } + if (dest != NULL) { + CFDictionarySetValue(dict, kSCPropNetIPv6DestAddresses, dest); + CFRelease(dest); + } + if (prefix != NULL) { + CFDictionarySetValue(dict, kSCPropNetIPv6PrefixLength, prefix); + CFRelease(prefix); + } return; } static CFDictionaryRef -make_IPv4_dict(struct ipv4_service_contents * t) +make_IPv6_dict(IPv6ServiceContentsRef t) { CFMutableDictionaryRef dict; dict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - dict_add_string_as_array(dict, kSCPropNetIPv4Addresses, t->addr); - dict_add_string_as_array(dict, kSCPropNetIPv4SubnetMasks, t->mask); - dict_add_string_as_array(dict, kSCPropNetIPv4DestAddresses, t->dest); - dict_add_string(dict, kSCPropNetIPv4Router, t->router); + dict_add_ipv6_addressing(dict, t->addr, t->addr_count); + dict_add_string(dict, kSCPropNetIPv6Router, t->router); dict_add_string(dict, kSCPropInterfaceName, t->ifname); + dict_insert_v6_routes(dict, kSCPropNetIPv6AdditionalRoutes, + t->additional_routes, t->additional_routes_count); + dict_insert_v6_routes(dict, kSCPropNetIPv6ExcludedRoutes, + t->excluded_routes, t->excluded_routes_count); return (dict); } -static IPv4RouteListRef -make_IPv4RouteList(struct ipv4_service_contents * * this_test) -{ - IPv4RouteListRef r; - IPv4RouteListRef routes; - char routes_buf[IPv4RouteListComputeSize(R_STATIC)]; - IPv4RouteListRef ret = NULL; - struct ipv4_service_contents * * scan_test; +typedef enum { + kDirectionForwards = 0, + kDirectionBackwards = 1 +} Direction; - for (scan_test = this_test; *scan_test != NULL; scan_test++) { - CFDictionaryRef dict; +typedef enum { + kLogRouteDisabled = 0, + kLogRouteEnabled = 1 +} LogRoute; - dict = make_IPv4_dict(*scan_test); - if (dict == NULL) { - fprintf(stderr, "make_IPv4_dict failed\n"); - exit(1); - } - routes = (IPv4RouteListRef)routes_buf; - routes->size = R_STATIC; - routes->count = 0; - r = IPv4RouteListCreateWithDictionary(routes, dict, - (*scan_test)->primaryRank ? *(*scan_test)->primaryRank : NULL); - if (r == NULL) { - fprintf(stderr, "IPv4RouteListCreateWithDictionary failed\n"); - exit(1); +static IPv6RouteListRef +make_IPv6RouteList_for_test(IPv6RouteListRef list, + IPv6ServiceContentsRef test, + LogRoute log_it) +{ + CFDictionaryRef dict; + IPv6RouteListRef r; + Rank rank; + Rank rank_assertion = kRankAssertionDefault; + CFNumberRef rank_assertion_cf = NULL; + Boolean rank_assertion_is_set = FALSE; + IPv6RouteListRef ret = NULL; + IPV6_ROUTES_BUF_DECL(routes); + + dict = make_IPv6_dict(test); + if (dict == NULL) { + fprintf(stderr, "make_IPv6_dict failed\n"); + exit(1); + } + if (test->primary_rank != NULL) { + rank_assertion + = PrimaryRankGetRankAssertion(*test->primary_rank, + &rank_assertion_is_set); + if (rank_assertion_is_set) { + rank_assertion_cf + = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank_assertion); } + } + r = IPv6RouteListCreateWithDictionary(routes, dict, + rank_assertion_cf); + my_CFRelease(&rank_assertion_cf); + if (r == NULL) { + fprintf(stderr, "IPv6RouteListCreateWithDictionary failed\n"); + exit(1); + } - (*scan_test)->rank = RankMake((*scan_test)->rank, kRankAssertionDefault); + if (rank_assertion == kRankAssertionScoped) { + rank_assertion = kRankAssertionNever; + } + rank = RankMake(test->rank, rank_assertion); + if (log_it == kLogRouteEnabled + && (S_IPMonitor_debug & kDebugFlag4) != 0) { + CFStringRef descr; - if ((*scan_test)->primaryRank != NULL) { - (*scan_test)->rank = RankMake((*scan_test)->rank, - PrimaryRankGetRankAssertion(*(*scan_test)->primaryRank)); - } + descr = IPv6RouteListCopyDescription(r); + SCLog(TRUE, LOG_NOTICE, CFSTR("Adding %@"), descr); + CFRelease(descr); + } + ret = IPv6RouteListAddRouteList(list, 1, r, rank); + if (r != routes) { + free(r); + } + CFRelease(dict); + return (ret); +} - if ((*scan_test)->router == NULL) { - (*scan_test)->rank = RankMake((*scan_test)->rank, - PrimaryRankGetRankAssertion(kSCValNetServicePrimaryRankLast)); - } +static IPv6RouteListRef +make_IPv6RouteList(IPv6ServiceContentsRef * test, Direction direction, + LogRoute log_it) +{ + IPv6RouteListRef ret = NULL; + IPv6ServiceContentsRef * scan; - ret = IPv4RouteListAddRouteList(ret, 1, r, (*scan_test)->rank); - if (r != routes) { - free(r); + switch (direction) { + case kDirectionBackwards: + for (scan = test; *scan != NULL; scan++) { + /* find the end of the list */ } - CFRelease(dict); + for (scan--; scan >= test; scan--) { + ret = make_IPv6RouteList_for_test(ret, *scan, log_it); + } + break; + default: + case kDirectionForwards: + for (scan = test; *scan != NULL; scan++) { + ret = make_IPv6RouteList_for_test(ret, *scan, log_it); + } + break; } + IPv6RouteListFinalize(ret); return (ret); } +#define EMPHASIS_CHARS "=================" + /* - * Function: run_test + * Function: routelist_build_test * Purpose: * Runs through the given set of routes first in the forward direction, * then again backwards. We should end up with exactly the same set of * routes at the end. */ static boolean_t -run_test(const char * name, struct ipv4_service_contents * * this_test) +routelist_build_test(IPv6RouteTestRef test) { CFStringRef descr; boolean_t ret = FALSE; - IPv4RouteListRef r; - IPv4RouteListRef routes; - char routes_buf[IPv4RouteListComputeSize(R_STATIC)]; - IPv4RouteListRef routes1 = NULL, routes2 = NULL; - struct ipv4_service_contents * * scan_test; - - printf("\nStarting test %s\n", name); - for (scan_test = this_test; *scan_test != NULL; scan_test++) { - CFDictionaryRef dict; - - dict = make_IPv4_dict(*scan_test); - if (dict == NULL) { - fprintf(stderr, "make_IPv4_dict failed\n"); - exit(1); - } - routes = (IPv4RouteListRef)routes_buf; - routes->size = R_STATIC; - routes->count = 0; - r = IPv4RouteListCreateWithDictionary(routes, dict, - (*scan_test)->primaryRank ? *(*scan_test)->primaryRank : NULL); - if (r == NULL) { - fprintf(stderr, "IPv4RouteListCreateWithDictionary failed\n"); - exit(1); - } - if ((S_IPMonitor_debug & kDebugFlag4) != 0) { - descr = IPv4RouteListCopyDescription(r); - SCPrint(TRUE, stdout, CFSTR("test: Adding %@\n"), descr); - CFRelease(descr); - } - - (*scan_test)->rank = RankMake((*scan_test)->rank, kRankAssertionDefault); + IPv6RouteListRef routes1; + IPv6RouteListRef routes2; - if ((*scan_test)->primaryRank != NULL) { - (*scan_test)->rank = RankMake((*scan_test)->rank, - PrimaryRankGetRankAssertion(*(*scan_test)->primaryRank)); - } + printf("\n" EMPHASIS_CHARS "> RouteList Build '%s' <" + EMPHASIS_CHARS "\n", + test->name); - routes1 = IPv4RouteListAddRouteList(routes1, 1, r, (*scan_test)->rank); - if (r != routes) { - free(r); - } - CFRelease(dict); - } + routes1 = make_IPv6RouteList(test->test, kDirectionForwards, + kLogRouteEnabled); if ((S_IPMonitor_debug & kDebugFlag4) != 0) { if (routes1 != NULL) { - descr = IPv4RouteListCopyDescription(routes1); + descr = IPv6RouteListCopyDescription(routes1); SCPrint(TRUE, stdout, CFSTR("Routes are %@\n"), descr); CFRelease(descr); } } - for (scan_test--; scan_test >= this_test; scan_test--) { - CFDictionaryRef dict; - - dict = make_IPv4_dict(*scan_test); - if (dict == NULL) { - fprintf(stderr, "make_IPv4_dict failed\n"); - exit(1); - } - routes = (IPv4RouteListRef)routes_buf; - routes->size = R_STATIC; - routes->count = 0; - r = IPv4RouteListCreateWithDictionary(routes, dict, - (*scan_test)->primaryRank ? *(*scan_test)->primaryRank : NULL); - if (r == NULL) { - fprintf(stderr, "IPv4RouteListCreateWithDictionary failed\n"); - exit(1); - } - if ((S_IPMonitor_debug & kDebugFlag4) != 0) { - descr = IPv4RouteListCopyDescription(r); - SCPrint(TRUE, stdout, CFSTR("test: Adding %@\n"), descr); - CFRelease(descr); - } - if ((*scan_test)->primaryRank != NULL) { - (*scan_test)->rank = RankMake((*scan_test)->rank, - PrimaryRankGetRankAssertion(*(*scan_test)->primaryRank)); - } - - routes2 = IPv4RouteListAddRouteList(routes2, 1, r, (*scan_test)->rank); - if (r != routes) { - free(r); - } - CFRelease(dict); - } + routes2 = make_IPv6RouteList(test->test, kDirectionBackwards, + kLogRouteEnabled); if ((S_IPMonitor_debug & kDebugFlag4) != 0) { if (routes2 != NULL) { - descr = IPv4RouteListCopyDescription(routes2); + descr = IPv6RouteListCopyDescription(routes2); SCPrint(TRUE, stdout, CFSTR("Routes are %@\n"), descr); CFRelease(descr); } @@ -6984,7 +9696,7 @@ run_test(const char * name, struct ipv4_service_contents * * this_test) routes1->count, routes2->count); } else if (bcmp(routes1, routes2, - IPv4RouteListComputeSize(routes1->count)) != 0) { + IPv6RouteListComputeSize(routes1->count)) != 0) { fprintf(stderr, "routes1 and routes2 are different\n"); } else { @@ -6998,166 +9710,96 @@ run_test(const char * name, struct ipv4_service_contents * * this_test) if (routes2 != NULL) { free(routes2); } + printf(EMPHASIS_CHARS "> RouteList Build '%s': %s <" + EMPHASIS_CHARS "\n", + test->name, ret ? "PASSED" : "FAILED"); return (ret); } -typedef struct compare_context { - IPv4RouteListRef old; - IPv4RouteListRef new; -} compare_context_t; - -static void -compare_callback(IPv4RouteListApplyCommand cmd, IPv4RouteRef route, void * arg) -{ - compare_context_t * context = (compare_context_t *)arg; - - switch (cmd) { - case kIPv4RouteListAddRouteCommand: - printf("Add new[%ld] = ", route - context->new->list); - IPv4RoutePrint(route); - break; - case kIPv4RouteListRemoveRouteCommand: - printf("Remove old[%ld] = ", route - context->old->list); - IPv4RoutePrint(route); - break; - default: - break; - } - return; -} - static void -compare_tests(struct ipv4_service_contents * * old_test, - struct ipv4_service_contents * * new_test) +apply_test(IPv6RouteTestRef old_test, IPv6RouteTestRef new_test) { - IPv4RouteListRef new_routes; - IPv4RouteListRef old_routes; - compare_context_t context; + IPv6RouteListRef new_routes; + IPv6RouteListRef old_routes; - old_routes = make_IPv4RouteList(old_test); - new_routes = make_IPv4RouteList(new_test); + printf("\n" EMPHASIS_CHARS "> Apply '%s', '%s' Begin <" + EMPHASIS_CHARS "\n", + old_test->name, new_test->name); + old_routes = make_IPv6RouteList(old_test->test, kDirectionForwards, + kLogRouteDisabled); + new_routes = make_IPv6RouteList(new_test->test, kDirectionForwards, + kLogRouteDisabled); if (old_routes == NULL) { printf("No Old Routes\n"); } else { - printf("Old Routes = "); - IPv4RouteListPrint(old_routes); + printf("Old routes ('%s') = ", old_test->name); + IPv6RouteListPrint(old_routes); } + + /* apply the old routes */ + IPv6RouteListApply(NULL, old_routes, -1); if (new_routes == NULL) { printf("No New Routes\n"); } else { - printf("New Routes = "); - IPv4RouteListPrint(new_routes); + printf("New Routes ('%s') = ", new_test->name); + IPv6RouteListPrint(new_routes); } - context.old = old_routes; - context.new = new_routes; - IPv4RouteListApply(old_routes, new_routes, compare_callback, &context); + + /* apply the new routes */ + IPv6RouteListApply(old_routes, new_routes, -1); if (old_routes != NULL) { free(old_routes); } if (new_routes != NULL) { free(new_routes); } - + printf(EMPHASIS_CHARS "> Apply '%s', '%s' End <" + EMPHASIS_CHARS "\n", + old_test->name, new_test->name); return; } int main(int argc, char **argv) { + IPv6RouteTestRef * test; + _sc_log = FALSE; _sc_verbose = (argc > 1) ? TRUE : FALSE; - S_IPMonitor_debug = kDebugFlag1 | kDebugFlag2 | kDebugFlag4; if (argc > 1) { S_IPMonitor_debug = strtoul(argv[1], NULL, 0); } - - if (run_test("test1", test1) == FALSE) { - fprintf(stderr, "test1 failed\n"); - exit(1); - } - if (run_test("test2", test2) == FALSE) { - fprintf(stderr, "test2 failed\n"); - exit(1); - } - if (run_test("test3", test4) == FALSE) { - fprintf(stderr, "test3 failed\n"); - exit(1); - } - if (run_test("test4", test4) == FALSE) { - fprintf(stderr, "test4 failed\n"); - exit(1); - } - if (run_test("test5", test5) == FALSE) { - fprintf(stderr, "test5 failed\n"); - exit(1); - } - if (run_test("test15", test15) == FALSE) { - fprintf(stderr, "test15 failed\n"); - exit(1); + S_scopedroute_v6 = (argc < 3); + for (test = ipv6_tests; *test != NULL; test++) { + if (routelist_build_test(*test) == FALSE) { + fprintf(stderr, "%s failed\n", (*test)->name); + exit(1); + } } + for (test = ipv6_tests; *test != NULL; test++) { + IPv6RouteTestRef * test2; + for (test2 = test + 1; *test2 != NULL; test2++) { + apply_test(*test, *test2); + apply_test(*test2, *test); + } + } - printf("\nCompare 1 to 2:\n"); - compare_tests(test1, test2); - - printf("\nCompare 2 to 1:\n"); - compare_tests(test2, test1); - - printf("\nCompare 1 to 1:\n"); - compare_tests(test1, test1); - - printf("\nCompare 1 to 3:\n"); - compare_tests(test1, test3); - - printf("\nCompare 3 to 1:\n"); - compare_tests(test3, test1); - - printf("\nCompare 2 to 3:\n"); - compare_tests(test2, test3); - - printf("\nCompare 3 to 2:\n"); - compare_tests(test3, test2); - - printf("\nCompare 3 to 4:\n"); - compare_tests(test3, test4); - - printf("\nCompare 5 to 4:\n"); - compare_tests(test5, test4); - - printf("\nCompare 6 to 7:\n"); - compare_tests(test6, test7); - - printf("\nCompare 7 to 6:\n"); - compare_tests(test7, test6); - - printf("\nCompare 8 to 9:\n"); - compare_tests(test8, test9); - - printf("\nCompare 8 to 10:\n"); - compare_tests(test8, test10); - - printf("\nCompare 8 to 11:\n"); - compare_tests(test8, test11); - - printf("\nCompare 12 to 13:\n"); - compare_tests(test12, test13); - - printf("\nCompare 13 to 14:\n"); - compare_tests(test13, test14); - - printf("\nChecking for leaks\n"); - char cmd[128]; - sprintf(cmd, "leaks %d 2>&1", getpid()); - fflush(stdout); - (void)system(cmd); + { + char cmd[128]; + printf("\nChecking for leaks\n"); + sprintf(cmd, "leaks %d 2>&1", getpid()); + fflush(stdout); + (void)system(cmd); + } exit(0); return (0); } -#endif /* TEST_IPV4_ROUTELIST */ +#endif /* TEST_IPV6_ROUTELIST */ diff --git a/Plugins/IPMonitor/ip_plugin.h b/Plugins/IPMonitor/ip_plugin.h index ab52f1f..8657994 100644 --- a/Plugins/IPMonitor/ip_plugin.h +++ b/Plugins/IPMonitor/ip_plugin.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All Rights Reserved. + * Copyright (c) 2012-2014 Apple Inc. All Rights Reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,24 +29,33 @@ #ifndef _IP_PLUGIN_H #define _IP_PLUGIN_H +#include #include +#include + +#ifdef TEST_IPV4_ROUTELIST +#define TEST_ROUTELIST +#endif + +#ifdef TEST_IPV6_ROUTELIST +#define TEST_ROUTELIST +#endif + +#ifndef countof +#define countof(array) (sizeof(array) / sizeof((array)[0])) +#endif #define kIsNULL CFSTR("IsNULL") /* CFBoolean */ -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) +#ifdef TEST_ROUTELIST +#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) + +#else /* TEST_ROUTELIST */ #define my_log(__level, fmt, ...) SCLoggerLog(my_log_get_logger(), __level, CFSTR(fmt), ## __VA_ARGS__) SCLoggerRef my_log_get_logger(); -/* - * IPv4 Service Dict keys: IPv4DictRoutes, IPv4DictService - * - * The IPv4 service dictionary contains two sub-dictionaries: - * Routes IPv4RouteList - * Service dictionary containing kSCEntNetIPv4 keys - */ -#define kIPv4DictRoutes CFSTR("Routes") -#define kIPv4DictService CFSTR("Service") +#endif /* TEST_ROUTELIST */ boolean_t cfstring_to_ip(CFStringRef str, struct in_addr * ip_p); @@ -54,10 +63,19 @@ cfstring_to_ip(CFStringRef str, struct in_addr * ip_p); boolean_t cfstring_to_ip6(CFStringRef str, struct in6_addr * ip6_p); -#else // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) +unsigned int +my_if_nametoindex(const char * ifname); + +const char * +my_if_indextoname(unsigned int idx, char if_name[IFNAMSIZ]); + +boolean_t +service_contains_protocol(CFDictionaryRef service, int af); -#define my_log(__level, fmt, ...) SCLog(TRUE, __level, CFSTR(fmt), ## __VA_ARGS__) +CFDictionaryRef +ipv4_dict_create(CFDictionaryRef state_dict); -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) +CFDictionaryRef +ipv6_dict_create(CFDictionaryRef state_dict); #endif // _IP_PLUGIN_H diff --git a/Plugins/IPMonitor/proxy-configuration.c b/Plugins/IPMonitor/proxy-configuration.c index f8ac69c..006028d 100644 --- a/Plugins/IPMonitor/proxy-configuration.c +++ b/Plugins/IPMonitor/proxy-configuration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -37,6 +37,7 @@ #include #include #include +#include "ip_plugin.h" #define DEFAULT_MATCH_ORDER 200000 /* match order for the "default" proxy configuration */ @@ -215,7 +216,7 @@ add_supplemental_proxies(CFMutableArrayRef proxies, CFDictionaryRef services, CF defaultOrder = DEFAULT_MATCH_ORDER - (DEFAULT_MATCH_ORDER / 2) - + ((DEFAULT_MATCH_ORDER / 1000) * i); + + ((DEFAULT_MATCH_ORDER / 1000) * (uint32_t)i); if ((n_order > 0) && !CFArrayContainsValue(service_order, CFRangeMake(0, n_order), keys[i])) { // push out services not specified in service order @@ -412,7 +413,7 @@ copy_app_layer_vpn_proxies(CFDictionaryRef services, CFArrayRef order, CFDiction CFRelease(vpn_key); if (!isA_CFDictionary(vpn) || !CFDictionaryContainsKey(vpn, kSCPropNetVPNAppRules)) { - // if not app-layer vpn + // if not App Layer vpn continue; } @@ -486,7 +487,7 @@ copy_scoped_proxies(CFDictionaryRef services, CFArrayRef order) if_name, sizeof(if_name), kCFStringEncodingASCII) == NULL) || - ((if_nametoindex(if_name)) == 0)) { + ((my_if_nametoindex(if_name)) == 0)) { // if interface index not available continue; } diff --git a/Plugins/IPMonitor/test_ipv4_routelist_filter.sh b/Plugins/IPMonitor/routelist_output_filter.sh similarity index 100% rename from Plugins/IPMonitor/test_ipv4_routelist_filter.sh rename to Plugins/IPMonitor/routelist_output_filter.sh diff --git a/Plugins/IPMonitor/set-hostname.c b/Plugins/IPMonitor/set-hostname.c index b9ff913..5003bd1 100644 --- a/Plugins/IPMonitor/set-hostname.c +++ b/Plugins/IPMonitor/set-hostname.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2012 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #include @@ -40,14 +40,18 @@ #include #include + +#ifdef MAIN +#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) +#else // MAIN #include "ip_plugin.h" +#endif // MAIN static SCDynamicStoreRef store = NULL; static CFRunLoopSourceRef rls = NULL; -static Boolean dnsActive = FALSE; -static CFMachPortRef dnsPort = NULL; -static struct timeval dnsQueryStart; +static struct timeval ptrQueryStart; +static SCNetworkReachabilityRef ptrTarget = NULL; static Boolean _verbose = FALSE; @@ -79,7 +83,7 @@ set_hostname(CFStringRef hostname) old_name[sizeof(old_name)-1] = '\0'; new_name[sizeof(new_name)-1] = '\0'; if (strcmp(old_name, new_name) != 0) { - if (sethostname(new_name, strlen(new_name)) == 0) { + if (sethostname(new_name, (int)strlen(new_name)) == 0) { uint32_t status; my_log(LOG_NOTICE, @@ -89,12 +93,12 @@ set_hostname(CFStringRef hostname) status = notify_post(HOSTNAME_NOTIFY_KEY); if (status != NOTIFY_STATUS_OK) { my_log(LOG_ERR, - "notify_post(" HOSTNAME_NOTIFY_KEY ") failed: error=%lu", + "notify_post(" HOSTNAME_NOTIFY_KEY ") failed: error=%u", status); } } else { my_log(LOG_ERR, - "sethostname(%s, %d) failed: %s", + "sethostname(%s, %ld) failed: %s", new_name, strlen(new_name), strerror(errno)); @@ -106,116 +110,6 @@ set_hostname(CFStringRef hostname) } -#define HOSTCONFIG "/etc/hostconfig" -#define HOSTNAME_KEY "HOSTNAME=" -#define AUTOMATIC "-AUTOMATIC-" - -#define HOSTNAME_KEY_LEN (sizeof(HOSTNAME_KEY) - 1) - -static CFStringRef -copy_static_name() -{ - FILE * f; - char buf[256]; - CFStringRef name = NULL; - - f = fopen(HOSTCONFIG, "r"); - if (f == NULL) { - return NULL; - } - - while (fgets(buf, sizeof(buf), f) != NULL) { - char * bp; - int n; - char * np; - Boolean str_escape; - Boolean str_quote; - - n = strlen(buf); - if (buf[n-1] == '\n') { - /* the entire line fit in the buffer, remove the newline */ - buf[n-1] = '\0'; - } else { - /* eat the remainder of the line */ - do { - n = fgetc(f); - } while ((n != '\n') && (n != EOF)); - } - - // skip leading white space - bp = &buf[0]; - while (isspace(*bp)) { - bp++; - } - - // find "HOSTNAME=" key - if (strncmp(bp, HOSTNAME_KEY, HOSTNAME_KEY_LEN) != 0) { - continue; // if not - } - - // get the hostname string - bp += HOSTNAME_KEY_LEN; - str_escape = FALSE; - str_quote = FALSE; - - np = &buf[0]; - while (*bp != '\0') { - char ch = *bp; - - switch (ch) { - case '\\' : - if (!str_escape) { - str_escape = TRUE; - bp++; - continue; - } - break; - case '"' : - if (!str_escape) { - str_quote = !str_quote; - bp++; - continue; - } - break; - default : - break; - } - - if (str_escape) { - str_escape = FALSE; - } else if (!str_quote && (isspace(ch) || (ch == '#'))) { - break; - } - - *np++ = ch; - bp++; - } - - *np = '\0'; - - if (name != NULL) { - CFRelease(name); - name = NULL; - } - - if (str_quote) { - // the shell won't parse this file so neither will we - break; - } - - if (strcmp(buf, AUTOMATIC) == 0) { - // skip "-AUTOMATIC-" - continue; - } - - name = CFStringCreateWithCString(NULL, buf, kCFStringEncodingUTF8); - } - - (void) fclose(f); - return name; -} - - static CFStringRef copy_prefs_hostname(SCDynamicStoreRef store) { @@ -310,55 +204,62 @@ copy_primary_ip(SCDynamicStoreRef store, CFStringRef serviceID) return address; } + static void -reverseDNSComplete(int32_t status, char *host, char *serv, void *context) +ptr_query_stop() { - struct timeval dnsQueryComplete; - struct timeval dnsQueryElapsed; - CFStringRef hostname; - SCDynamicStoreRef store = (SCDynamicStoreRef)context; + if (ptrTarget == NULL) { + return; + } + + SCNetworkReachabilitySetCallback(ptrTarget, NULL, NULL); + SCNetworkReachabilityUnscheduleFromRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + CFRelease(ptrTarget); + ptrTarget = NULL; - (void) gettimeofday(&dnsQueryComplete, NULL); - timersub(&dnsQueryComplete, &dnsQueryStart, &dnsQueryElapsed); + return; +} + + +static void +ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) +{ + CFStringRef hostname = NULL; + struct timeval ptrQueryComplete; + struct timeval ptrQueryElapsed; + + (void) gettimeofday(&ptrQueryComplete, NULL); + timersub(&ptrQueryComplete, &ptrQueryStart, &ptrQueryElapsed); if (_verbose) { - my_log(LOG_INFO, "async DNS complete%s (query time = %d.%3.3d)", - ((status == 0) && (host != NULL)) ? "" : ", host not found", - dnsQueryElapsed.tv_sec, - dnsQueryElapsed.tv_usec / 1000); + my_log(LOG_DEBUG, "ptr query complete%s (query time = %ld.%3.3d)", + (flags & kSCNetworkReachabilityFlagsReachable) ? "" : ", host not found", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); } // use reverse DNS name, if available - switch (status) { - case 0 : - /* - * if [reverse] DNS query was successful - */ - if (host != NULL) { - hostname = CFStringCreateWithCString(NULL, host, kCFStringEncodingUTF8); - if (hostname != NULL) { - my_log(LOG_INFO, "hostname (reverse DNS query) = %@", hostname); - set_hostname(hostname); - CFRelease(hostname); - goto done; - } + if (flags & kSCNetworkReachabilityFlagsReachable) { + int error_num; + CFArrayRef hosts; + + /* + * if [reverse] DNS query was successful + */ + hosts = SCNetworkReachabilityCopyResolvedAddress(target, &error_num); + if (hosts != NULL) { + if (CFArrayGetCount(hosts) > 0) { + + hostname = CFArrayGetValueAtIndex(hosts, 0); + my_log(LOG_DEBUG, "hostname (reverse DNS query) = %@", hostname); + set_hostname(hostname); + } + CFRelease(hosts); + + if (hostname != NULL) { + goto done; } - break; - - case EAI_NONAME : -#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) - case EAI_NODATA: -#endif - /* - * if no name available - */ - break; - - default : - /* - * Hmmmm... - */ - my_log(LOG_ERR, "getnameinfo() failed: %s", gai_strerror(status)); + } } // get local (multicast DNS) name, if available @@ -367,7 +268,7 @@ reverseDNSComplete(int32_t status, char *host, char *serv, void *context) if (hostname != NULL) { CFMutableStringRef localName; - my_log(LOG_INFO, "hostname (multicast DNS) = %@", hostname); + my_log(LOG_DEBUG, "hostname (multicast DNS) = %@", hostname); localName = CFStringCreateMutableCopy(NULL, 0, hostname); assert(localName != NULL); CFStringAppend(localName, CFSTR(".local")); @@ -383,142 +284,56 @@ reverseDNSComplete(int32_t status, char *host, char *serv, void *context) done : - if (host != NULL) free(host); - if (serv != NULL) free(serv); - dnsActive = FALSE; - return; -} - - -static CFStringRef -replyMPCopyDescription(const void *info) -{ - SCDynamicStoreRef store = (SCDynamicStoreRef)info; - - return CFStringCreateWithFormat(NULL, - NULL, - CFSTR(" {store = %p}"), - store); -} - - -static void -getnameinfo_async_handleCFReply(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - mach_port_t mp = MACH_PORT_NULL; - int32_t status; - - if (port != dnsPort) { - // we've received a callback on the async DNS port but since the - // associated CFMachPort doesn't match than the request must have - // already been cancelled. - my_log(LOG_ERR, "getnameinfo_async_handleCFReply(): port != dnsPort"); - return; - } + ptr_query_stop(); - mp = CFMachPortGetPort(port); - CFMachPortInvalidate(dnsPort); - CFRelease(dnsPort); - dnsPort = NULL; - __MACH_PORT_DEBUG(mp != MACH_PORT_NULL, "*** set-hostname (after unscheduling)", mp); - - status = getnameinfo_async_handle_reply(msg); - __MACH_PORT_DEBUG(mp != MACH_PORT_NULL, "*** set-hostname (after getnameinfo_async_handle_reply)", mp); - if ((status == 0) && dnsActive && (mp != MACH_PORT_NULL)) { - CFMachPortContext context = { 0 - , (void *)store - , CFRetain - , CFRelease - , replyMPCopyDescription - }; - CFRunLoopSourceRef rls; - - // if request has been re-queued - dnsPort = _SC_CFMachPortCreateWithPort("IPMonitor/set-hostname/re-queue", - mp, - getnameinfo_async_handleCFReply, - &context); - rls = CFMachPortCreateRunLoopSource(NULL, dnsPort, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - __MACH_PORT_DEBUG(mp != MACH_PORT_NULL, "*** set-hostname (after rescheduling)", mp); - } +#ifdef MAIN + CFRunLoopStop(CFRunLoopGetCurrent()); +#endif // MAIN return; } -static void -start_dns_query(SCDynamicStoreRef store, CFStringRef address) +static Boolean +ptr_query_start(CFStringRef address) { union { - struct sockaddr sa; - struct sockaddr_in sin; - struct sockaddr_in6 sin6; + struct sockaddr sa; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; } addr; char buf[64]; - SCNetworkReachabilityFlags flags; - Boolean haveDNS; - Boolean ok; + CFDataRef data; + CFMutableDictionaryRef options; if (_SC_cfstring_to_cstring(address, buf, sizeof(buf), kCFStringEncodingASCII) == NULL) { - my_log(LOG_ERR, "could not convert [primary] address"); - return; + my_log(LOG_ERR, "could not convert [primary] address string"); + return FALSE; } if (_SC_string_to_sockaddr(buf, AF_UNSPEC, (void *)&addr, sizeof(addr)) == NULL) { - /* if not an IP[v6] address */ - my_log(LOG_ERR, "could not parse [primary] address"); - return; - } - - ok = _SC_checkResolverReachabilityByAddress(&store, &flags, &haveDNS, &addr.sa); - if (ok) { - if (!(flags & kSCNetworkReachabilityFlagsReachable) || - (flags & kSCNetworkReachabilityFlagsConnectionRequired)) { - // if not reachable *OR* connection required - ok = FALSE; - } + my_log(LOG_ERR, "could not convert [primary] address"); + return FALSE; } - if (ok) { - CFMachPortContext context = { 0 - , (void *)store - , CFRetain - , CFRelease - , replyMPCopyDescription - }; - int32_t error; - mach_port_t mp; - CFRunLoopSourceRef rls; - - (void) gettimeofday(&dnsQueryStart, NULL); - - error = getnameinfo_async_start(&mp, - &addr.sa, - addr.sa.sa_len, - NI_NAMEREQD, // flags - reverseDNSComplete, - NULL); - if (error != 0) { - goto done; - } - __MACH_PORT_DEBUG(TRUE, "*** set-hostname (after getnameinfo_async_start)", mp); - - dnsActive = TRUE; - dnsPort = _SC_CFMachPortCreateWithPort("IPMonitor/set-hostname", - mp, - getnameinfo_async_handleCFReply, - &context); - rls = CFMachPortCreateRunLoopSource(NULL, dnsPort, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - __MACH_PORT_DEBUG(TRUE, "*** set-hostname (after scheduling)", mp); + options = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + data = CFDataCreate(NULL, (const UInt8 *)&addr.sa, addr.sa.sa_len); + CFDictionarySetValue(options, kSCNetworkReachabilityOptionPTRAddress, data); + CFRelease(data); + ptrTarget = SCNetworkReachabilityCreateWithOptions(NULL, options); + CFRelease(options); + if (ptrTarget == NULL) { + my_log(LOG_ERR, "could not resolve [primary] address"); + return FALSE; } - done : + (void) SCNetworkReachabilitySetCallback(ptrTarget, ptr_query_callback, NULL); + (void) SCNetworkReachabilityScheduleWithRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); - return; + return TRUE; } @@ -531,31 +346,15 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) // if active, cancel any in-progress attempt to resolve the primary IP address - if (dnsPort != NULL) { - mach_port_t mp = CFMachPortGetPort(dnsPort); - - /* cancel the outstanding DNS query */ - CFMachPortInvalidate(dnsPort); - CFRelease(dnsPort); - dnsPort = NULL; - - getnameinfo_async_cancel(mp); - } - - // get static hostname, if available - - hostname = copy_static_name(); - if (hostname != NULL) { - my_log(LOG_INFO, "hostname (static) = %@", hostname); - set_hostname(hostname); - goto done; + if (ptrTarget != NULL) { + ptr_query_stop(); } // get [prefs] hostname, if available hostname = copy_prefs_hostname(store); if (hostname != NULL) { - my_log(LOG_INFO, "hostname (prefs) = %@", hostname); + my_log(LOG_DEBUG, "hostname (prefs) = %@", hostname); set_hostname(hostname); goto done; } @@ -571,7 +370,7 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) hostname = copy_dhcp_hostname(serviceID); if (hostname != NULL) { - my_log(LOG_INFO, "hostname (DHCP) = %@", hostname); + my_log(LOG_DEBUG, "hostname (DHCP) = %@", hostname); set_hostname(hostname); goto done; } @@ -580,9 +379,14 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) address = copy_primary_ip(store, serviceID); if (address != NULL) { + Boolean ok; + // start reverse DNS query using primary IP address - (void) start_dns_query(store, address); - goto done; + ok = ptr_query_start(address); + if (ok) { + // if query started + goto done; + } } mDNS : @@ -593,7 +397,7 @@ update_hostname(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) if (hostname != NULL) { CFMutableStringRef localName; - my_log(LOG_INFO, "hostname (multicast DNS) = %@", hostname); + my_log(LOG_DEBUG, "hostname (multicast DNS) = %@", hostname); localName = CFStringCreateMutableCopy(NULL, 0, hostname); assert(localName != NULL); CFStringAppend(localName, CFSTR(".local")); @@ -715,6 +519,7 @@ main(int argc, char **argv) _sc_log = FALSE; if ((argc > 1) && (strcmp(argv[1], "-d") == 0)) { _sc_verbose = TRUE; + _verbose = TRUE; argv++; argc--; } @@ -732,17 +537,18 @@ main(int argc, char **argv) exit(1); } - // get static hostname - hostname = copy_static_name(); + // get [prefs] hostname, if available + hostname = copy_prefs_hostname(store); if (hostname != NULL) { - SCPrint(TRUE, stdout, CFSTR("hostname (static) = %@\n"), hostname); + SCPrint(TRUE, stdout, CFSTR("hostname (prefs) = %@\n"), hostname); CFRelease(hostname); } - // get [prefs] hostname, if available - hostname = copy_prefs_hostname(store); + // get local (multicast DNS) name, if available + + hostname = SCDynamicStoreCopyLocalHostName(store); if (hostname != NULL) { - SCPrint(TRUE, stdout, CFSTR("hostname (prefs) = %@\n"), hostname); + SCPrint(TRUE, stdout, CFSTR("hostname (multicast DNS) = %@\n"), hostname); CFRelease(hostname); } @@ -752,7 +558,6 @@ main(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR("primary service ID = %@\n"), serviceID); } else { SCPrint(TRUE, stdout, CFSTR("No primary service\n")); - goto mDNS; } if ((argc == (2+1)) && (argv[1][0] == 's')) { @@ -761,49 +566,33 @@ main(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR("alternate service ID = %@\n"), serviceID); } - // get DHCP provided name - hostname = copy_dhcp_name(store, serviceID); - if (hostname != NULL) { - SCPrint(TRUE, stdout, CFSTR("hostname (DHCP) = %@\n"), hostname); - CFRelease(hostname); - } - - // get primary IP address - address = copy_primary_ip(store, serviceID); - if (address != NULL) { - SCPrint(TRUE, stdout, CFSTR("primary address = %@\n"), address); - - if ((argc == (2+1)) && (argv[1][0] == 'a')) { - if (address != NULL) CFRelease(address); - address = CFStringCreateWithCString(NULL, argv[2], kCFStringEncodingUTF8); - SCPrint(TRUE, stdout, CFSTR("alternate primary address = %@\n"), address); + if (serviceID != NULL) { + // get DHCP provided name + hostname = copy_dhcp_hostname(serviceID); + if (hostname != NULL) { + SCPrint(TRUE, stdout, CFSTR("hostname (DHCP) = %@\n"), hostname); + CFRelease(hostname); } - // start reverse DNS query using primary IP address - start_dns_query(store, address); - CFRelease(address); - } - - CFRelease(serviceID); - - mDNS : + // get primary IP address + address = copy_primary_ip(store, serviceID); + if (address != NULL) { + SCPrint(TRUE, stdout, CFSTR("primary address = %@\n"), address); - // get local (multicast DNS) name, if available + if ((argc == (2+1)) && (argv[1][0] == 'a')) { + if (address != NULL) CFRelease(address); + address = CFStringCreateWithCString(NULL, argv[2], kCFStringEncodingUTF8); + SCPrint(TRUE, stdout, CFSTR("alternate primary address = %@\n"), address); + } - hostname = SCDynamicStoreCopyLocalHostName(store); - if (hostname != NULL) { - CFMutableStringRef localName; + // start reverse DNS query using primary IP address + (void) ptr_query_start(address); + CFRelease(address); + } - SCPrint(TRUE, stdout, CFSTR("hostname (multicast DNS) = %@\n"), hostname); - localName = CFStringCreateMutableCopy(NULL, 0, hostname); - CFStringAppend(localName, CFSTR(".local")); - CFRelease(localName); + CFRelease(serviceID); } - if (hostname != NULL) CFRelease(hostname); - - update_hostname(store, NULL, NULL); - CFRelease(store); CFRunLoopRun(); diff --git a/Plugins/IPMonitor/smb-configuration.c b/Plugins/IPMonitor/smb-configuration.c index 01027ee..f93a629 100644 --- a/Plugins/IPMonitor/smb-configuration.c +++ b/Plugins/IPMonitor/smb-configuration.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2006-2012 Apple Inc. All rights reserved. + * Copyright (c) 2006-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -51,7 +51,11 @@ #include #include // for SCLog(), SCPrint() +#ifdef MAIN +#define my_log(__level, fmt, ...) SCPrint(TRUE, stdout, CFSTR(fmt "\n"), ## __VA_ARGS__) +#else // MAIN #include "ip_plugin.h" +#endif // MAIN #define HW_MODEL_LEN 64 // Note: must be >= NETBIOS_NAME_LEN (below) @@ -63,32 +67,14 @@ static SCDynamicStoreRef store = NULL; static CFRunLoopSourceRef rls = NULL; -static Boolean dnsActive = FALSE; -static CFMachPortRef dnsPort = NULL; -static struct timeval dnsQueryStart; +static struct timeval ptrQueryStart; +static SCNetworkReachabilityRef ptrTarget = NULL; static CFRunLoopTimerRef timer = NULL; static Boolean _verbose = FALSE; -static Boolean -isMacOSXServer() -{ - static enum { Unknown, Client, Server } isServer = Unknown; - - if (isServer == Unknown) { - int ret; - struct stat statbuf; - - ret = stat("/System/Library/CoreServices/ServerVersion.plist", &statbuf); - isServer = (ret == 0) ? Server : Client; - } - - return (isServer == Server) ? TRUE : FALSE; -} - - static CFAbsoluteTime boottime(void) { @@ -116,42 +102,28 @@ boottime(void) static CFStringRef copy_default_name(void) { - char *cp; - char hwModel[HW_MODEL_LEN]; - int mib[] = { CTL_HW, HW_MODEL }; - size_t n = sizeof(hwModel); - int ret; + CFStringRef model; + size_t n; CFMutableStringRef str; // get HW model name - bzero(&hwModel, sizeof(hwModel)); - ret = sysctl(mib, sizeof(mib) / sizeof(mib[0]), &hwModel, &n, NULL, 0); - if (ret != 0) { - my_log(LOG_ERR, "sysctl() CTL_HW/HW_MODEL failed: %s", strerror(errno)); + model = _SC_hw_model(TRUE); + if (model == NULL) { return NULL; } - // truncate name - hwModel[NETBIOS_NAME_LEN - 1] = '\0'; - - // trim everything after (and including) a comma - cp = index(hwModel, ','); - if (cp != NULL) { - *cp = '\0'; - } - - // trim any trailing digits - n = strlen(hwModel); - while (n > 0) { - if (!isdigit(hwModel[n - 1])) { - break; - } - hwModel[--n] = '\0'; - } - // start off with the [trunated] HW model str = CFStringCreateMutable(NULL, 0); - CFStringAppendFormat(str, NULL, CFSTR("%s"), hwModel); + CFStringAppend(str, model); + + // truncate as needed + n = CFStringGetLength(str); + if (n > (NETBIOS_NAME_LEN - 1)) { + CFStringReplace(str, + CFRangeMake(NETBIOS_NAME_LEN, n - (NETBIOS_NAME_LEN - 1)), + CFSTR("")); + n = NETBIOS_NAME_LEN - 1; + } // // if there is room for at least one byte (two hex characters) @@ -159,7 +131,7 @@ copy_default_name(void) // // NETBIOS_NAME_LEN max length // -1 the last byte is reserved - // -3 "-XX" + // -3 "-XX" // if (n < (NETBIOS_NAME_LEN - 1 - 3)) { SCNetworkInterfaceRef interface; @@ -294,48 +266,46 @@ smb_set_configuration(SCDynamicStoreRef store, CFDictionaryRef dict) goto done; } - if (!isMacOSXServer()) { - // Server description - str = SCDynamicStoreCopyComputerName(store, &macEncoding); - update_pref(prefs, CFSTR(kSMBPrefServerDescription), str, &changed); - - // DOS code page - if (str != NULL) { - if (macEncoding == kCFStringEncodingMacRoman) { - CFStringRef key; - CFDictionaryRef dict; - - // get region - key = SCDynamicStoreKeyCreateComputerName(NULL); - dict = SCDynamicStoreCopyValue(store, key); - CFRelease(key); - if (dict != NULL) { - if (isA_CFDictionary(dict)) { - CFNumberRef num; - SInt32 val; - - num = CFDictionaryGetValue(dict, kSCPropSystemComputerNameRegion); - if (isA_CFNumber(num) && - CFNumberGetValue(num, kCFNumberSInt32Type, &val)) { - macRegion = (uint32_t)val; - } - } + // Server description + str = SCDynamicStoreCopyComputerName(store, &macEncoding); + update_pref(prefs, CFSTR(kSMBPrefServerDescription), str, &changed); - CFRelease(dict); + // DOS code page + if (str != NULL) { + if (macEncoding == kCFStringEncodingMacRoman) { + CFStringRef key; + CFDictionaryRef dict; + + // get region + key = SCDynamicStoreKeyCreateComputerName(NULL); + dict = SCDynamicStoreCopyValue(store, key); + CFRelease(key); + if (dict != NULL) { + if (isA_CFDictionary(dict)) { + CFNumberRef num; + SInt32 val; + + num = CFDictionaryGetValue(dict, kSCPropSystemComputerNameRegion); + if (isA_CFNumber(num) && + CFNumberGetValue(num, kCFNumberSInt32Type, &val)) { + macRegion = (uint32_t)val; + } } - } - CFRelease(str); - } else { - // Important: must have root acccess (eUID==0) to access the config file! - __CFStringGetInstallationEncodingAndRegion((uint32_t *)&macEncoding, &macRegion); + CFRelease(dict); + } } - _SC_dos_encoding_and_codepage(macEncoding, macRegion, &dosEncoding, &dosCodepage); - str = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), (unsigned int)dosCodepage); - assert(str != NULL); - update_pref(prefs, CFSTR(kSMBPrefDOSCodePage), str, &changed); + CFRelease(str); + } else { + // Important: must have root acccess (eUID==0) to access the config file! + __CFStringGetInstallationEncodingAndRegion((uint32_t *)&macEncoding, &macRegion); } + _SC_dos_encoding_and_codepage(macEncoding, macRegion, &dosEncoding, &dosCodepage); + str = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), (unsigned int)dosCodepage); + assert(str != NULL); + update_pref(prefs, CFSTR(kSMBPrefDOSCodePage), str, &changed); + CFRelease(str); // NetBIOS name str = CFDictionaryGetValue(dict, kSCPropNetSMBNetBIOSName); @@ -474,22 +444,37 @@ copy_primary_ip(SCDynamicStoreRef store, CFStringRef serviceID) static void -reverseDNSComplete(int32_t status, char *host, char *serv, void *context) +ptr_query_stop() +{ + if (ptrTarget == NULL) { + return; + } + + SCNetworkReachabilitySetCallback(ptrTarget, NULL, NULL); + SCNetworkReachabilityUnscheduleFromRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + CFRelease(ptrTarget); + ptrTarget = NULL; + + return; +} + + +static void +ptr_query_callback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) { CFDictionaryRef dict; - struct timeval dnsQueryComplete; - struct timeval dnsQueryElapsed; CFStringRef name; - SCDynamicStoreRef store = (SCDynamicStoreRef)context; + CFMutableDictionaryRef newDict; + struct timeval ptrQueryComplete; + struct timeval ptrQueryElapsed; - (void) gettimeofday(&dnsQueryComplete, NULL); - timersub(&dnsQueryComplete, &dnsQueryStart, &dnsQueryElapsed); + (void) gettimeofday(&ptrQueryComplete, NULL); + timersub(&ptrQueryComplete, &ptrQueryStart, &ptrQueryElapsed); if (_verbose) { - my_log(LOG_INFO, - "async DNS complete%s (query time = %d.%3.3d)", - ((status == 0) && (host != NULL)) ? "" : ", host not found", - dnsQueryElapsed.tv_sec, - dnsQueryElapsed.tv_usec / 1000); + my_log(LOG_DEBUG, "ptr query complete%s (query time = %ld.%3.3d)", + (flags & kSCNetworkReachabilityFlagsReachable) ? "" : ", host not found", + ptrQueryElapsed.tv_sec, + ptrQueryElapsed.tv_usec / 1000); } // get network configuration @@ -498,72 +483,57 @@ reverseDNSComplete(int32_t status, char *host, char *serv, void *context) // use NetBIOS name from network configuration (if available) name = CFDictionaryGetValue(dict, kSCPropNetSMBNetBIOSName); if ((name != NULL) && _SC_CFStringIsValidNetBIOSName(name)) { - my_log(LOG_INFO, "NetBIOS name (network configuration) = %@", name); - goto set; + my_log(LOG_DEBUG, "NetBIOS name (network configuration) = %@", name); + goto setDict; } // use reverse DNS name, if available - switch (status) { - case 0 : - /* - * if [reverse] DNS query was successful - */ - if (host != NULL) { - char *dot; - - dot = strchr(host, '.'); - name = CFStringCreateWithBytes(NULL, - (UInt8 *)host, - (dot != NULL) ? dot - host : strlen(host), - kCFStringEncodingUTF8, - FALSE); - if (name != NULL) { - if (_SC_CFStringIsValidNetBIOSName(name)) { - CFMutableDictionaryRef newDict; - - my_log(LOG_INFO, "NetBIOS name (reverse DNS query) = %@", name); - newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); - CFRelease(dict); - dict = newDict; - CFRelease(name); - goto set; - } - CFRelease(name); + name = NULL; + if (flags & kSCNetworkReachabilityFlagsReachable) { + int error_num; + CFArrayRef hosts; + + /* + * if [reverse] DNS query was successful + */ + hosts = SCNetworkReachabilityCopyResolvedAddress(target, &error_num); + if (hosts != NULL) { + if (CFArrayGetCount(hosts) > 0) { + CFIndex ptrLen; + CFMutableStringRef ptrName; + CFRange range; + + name = CFArrayGetValueAtIndex(hosts, 0); + ptrName = CFStringCreateMutableCopy(NULL, 0, name); + ptrLen = CFStringGetLength(ptrName); + if (CFStringFindWithOptions(ptrName, + CFSTR("."), + CFRangeMake(0, ptrLen), + 0, + &range)) { + CFStringDelete(ptrName, + CFRangeMake(range.location, ptrLen - range.location)); } + name = ptrName; } - break; - - case EAI_NONAME : -#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) - case EAI_NODATA: -#endif - /* - * if no name available - */ - break; - - default : - /* - * Hmmmm... - */ - my_log(LOG_ERR,"getnameinfo() failed: %s", gai_strerror(status)); + CFRelease(hosts); + } + } + if (name != NULL) { + if (_SC_CFStringIsValidNetBIOSName(name)) { + my_log(LOG_DEBUG, "NetBIOS name (reverse DNS query) = %@", name); + goto setName; + } + CFRelease(name); } // try local (multicast DNS) name, if available name = SCDynamicStoreCopyLocalHostName(store); if (name != NULL) { if (_SC_CFStringIsValidNetBIOSName(name)) { - CFMutableDictionaryRef newDict; - - my_log(LOG_INFO, "NetBIOS name (multicast DNS) = %@", name); - newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); - CFRelease(dict); - dict = newDict; - CFRelease(name); - goto set; + my_log(LOG_DEBUG, "NetBIOS name (multicast DNS) = %@", name); + goto setName; } CFRelease(name); } @@ -571,154 +541,76 @@ reverseDNSComplete(int32_t status, char *host, char *serv, void *context) // use "default" name name = copy_default_name(); if (name != NULL) { - CFMutableDictionaryRef newDict; - - my_log(LOG_INFO, "NetBIOS name (default) = %@", name); - newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); - CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); - CFRelease(dict); - dict = newDict; - CFRelease(name); + my_log(LOG_DEBUG, "NetBIOS name (default) = %@", name); + goto setName; } - set : - - // update SMB configuration - smb_set_configuration(store, dict); - - if (host != NULL) free(host); - if (dict != NULL) CFRelease(dict); - if (serv != NULL) free(serv); - dnsActive = FALSE; - return; -} + goto setDict; + setName : -static CFStringRef -replyMPCopyDescription(const void *info) -{ - SCDynamicStoreRef store = (SCDynamicStoreRef)info; + newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); + CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); + CFRelease(dict); + dict = newDict; + CFRelease(name); - return CFStringCreateWithFormat(NULL, - NULL, - CFSTR(" {store = %p}"), - store); -} + setDict : + // update SMB configuration + smb_set_configuration(store, dict); + CFRelease(dict); -static void -getnameinfo_async_handleCFReply(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - mach_port_t mp = MACH_PORT_NULL; - int32_t status; - - if (port != dnsPort) { - // we've received a callback on the async DNS port but since the - // associated CFMachPort doesn't match than the request must have - // already been cancelled. - my_log(LOG_ERR, "getnameinfo_async_handleCFReply(): port != dnsPort"); - return; - } + ptr_query_stop(); - mp = CFMachPortGetPort(port); - CFMachPortInvalidate(dnsPort); - CFRelease(dnsPort); - dnsPort = NULL; - - status = getnameinfo_async_handle_reply(msg); - if ((status == 0) && dnsActive && (mp != MACH_PORT_NULL)) { - CFMachPortContext context = { 0 - , (void *)store - , CFRetain - , CFRelease - , replyMPCopyDescription - }; - CFRunLoopSourceRef rls; - - // if request has been re-queued - dnsPort = _SC_CFMachPortCreateWithPort("IPMonitor/smb-configuration/re-queue", - mp, - getnameinfo_async_handleCFReply, - &context); - rls = CFMachPortCreateRunLoopSource(NULL, dnsPort, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - } +#ifdef MAIN + CFRunLoopStop(CFRunLoopGetCurrent()); +#endif // MAIN return; } static Boolean -start_dns_query(SCDynamicStoreRef store, CFStringRef address) +ptr_query_start(CFStringRef address) { union { - struct sockaddr sa; - struct sockaddr_in sin; - struct sockaddr_in6 sin6; + struct sockaddr sa; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; } addr; char buf[64]; - SCNetworkReachabilityFlags flags; - Boolean haveDNS; - Boolean ok = FALSE; + CFDataRef data; + CFMutableDictionaryRef options; if (_SC_cfstring_to_cstring(address, buf, sizeof(buf), kCFStringEncodingASCII) == NULL) { - my_log(LOG_ERR, "could not convert [primary] address"); + my_log(LOG_ERR, "could not convert [primary] address string"); return FALSE; } if (_SC_string_to_sockaddr(buf, AF_UNSPEC, (void *)&addr, sizeof(addr)) == NULL) { - /* if not an IP[v6] address */ - my_log(LOG_ERR, "could not parse [primary] address"); + my_log(LOG_ERR, "could not convert [primary] address"); return FALSE; } - ok = _SC_checkResolverReachabilityByAddress(&store, &flags, &haveDNS, &addr.sa); - if (ok) { - if (!(flags & kSCNetworkReachabilityFlagsReachable) || - (flags & kSCNetworkReachabilityFlagsConnectionRequired)) { - // if not reachable *OR* connection required - ok = FALSE; - } - } - - if (ok) { - CFMachPortContext context = { 0 - , (void *)store - , CFRetain - , CFRelease - , replyMPCopyDescription - }; - int32_t error; - mach_port_t mp; - CFRunLoopSourceRef rls; - - (void) gettimeofday(&dnsQueryStart, NULL); - - error = getnameinfo_async_start(&mp, - &addr.sa, - addr.sa.sa_len, - NI_NAMEREQD, // flags - reverseDNSComplete, - (void *)store); - if (error != 0) { - ok = FALSE; - goto done; - } - - dnsActive = TRUE; - dnsPort = _SC_CFMachPortCreateWithPort("IPMonitor/smb-configuration", - mp, - getnameinfo_async_handleCFReply, - &context); - rls = CFMachPortCreateRunLoopSource(NULL, dnsPort, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); + options = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + data = CFDataCreate(NULL, (const UInt8 *)&addr.sa, addr.sa.sa_len); + CFDictionarySetValue(options, kSCNetworkReachabilityOptionPTRAddress, data); + CFRelease(data); + ptrTarget = SCNetworkReachabilityCreateWithOptions(NULL, options); + CFRelease(options); + if (ptrTarget == NULL) { + my_log(LOG_ERR, "could not resolve [primary] address"); + return FALSE; } - done : + (void) SCNetworkReachabilitySetCallback(ptrTarget, ptr_query_callback, NULL); + (void) SCNetworkReachabilityScheduleWithRunLoop(ptrTarget, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); - return ok; + return TRUE; } @@ -737,7 +629,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) // use NetBIOS name from network configuration (if available) name = CFDictionaryGetValue(dict, kSCPropNetSMBNetBIOSName); if ((name != NULL) && _SC_CFStringIsValidNetBIOSName(name)) { - my_log(LOG_INFO, "NetBIOS name (network configuration) = %@", name); + my_log(LOG_DEBUG, "NetBIOS name (network configuration) = %@", name); goto set; } @@ -754,7 +646,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) Boolean ok; // start reverse DNS query using primary IP address - ok = start_dns_query(store, address); + ok = ptr_query_start(address); if (ok) { // if query started goto done; @@ -770,7 +662,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) if (_SC_CFStringIsValidNetBIOSName(name)) { CFMutableDictionaryRef newDict; - my_log(LOG_INFO, "NetBIOS name (multicast DNS) = %@", name); + my_log(LOG_DEBUG, "NetBIOS name (multicast DNS) = %@", name); newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); CFRelease(dict); @@ -786,7 +678,7 @@ smb_update_configuration(__unused CFRunLoopTimerRef _timer, void *info) if (name != NULL) { CFMutableDictionaryRef newDict; - my_log(LOG_INFO, "NetBIOS name (default) = %@", name); + my_log(LOG_DEBUG, "NetBIOS name (default) = %@", name); newDict = CFDictionaryCreateMutableCopy(NULL, 0, dict); CFDictionarySetValue(newDict, kSCPropNetSMBNetBIOSName, name); CFRelease(dict); @@ -823,15 +715,9 @@ configuration_changed(SCDynamicStoreRef store, CFArrayRef changedKeys, void *inf CFAbsoluteTime time_now ; // if active, cancel any in-progress attempt to resolve the primary IP address - if (dnsPort != NULL) { - mach_port_t mp = CFMachPortGetPort(dnsPort); - /* cancel the outstanding DNS query */ - CFMachPortInvalidate(dnsPort); - CFRelease(dnsPort); - dnsPort = NULL; - - getnameinfo_async_cancel(mp); + if (ptrTarget != NULL) { + ptr_query_stop(); } // if active, cancel any queued configuration change @@ -960,6 +846,7 @@ main(int argc, char **argv) _sc_log = FALSE; if ((argc > 1) && (strcmp(argv[1], "-d") == 0)) { _sc_verbose = TRUE; + _verbose = TRUE; argv++; argc--; } @@ -1007,7 +894,7 @@ main(int argc, char **argv) } // start reverse DNS query using primary IP address - (void) start_dns_query(store, address); + (void) ptr_query_start(address); CFRelease(address); } diff --git a/Plugins/IPMonitor/test_ipv4_routelist_reference.txt b/Plugins/IPMonitor/test_ipv4_routelist_reference.txt index aaadc62..5735e65 100644 --- a/Plugins/IPMonitor/test_ipv4_routelist_reference.txt +++ b/Plugins/IPMonitor/test_ipv4_routelist_reference.txt @@ -1,723 +1,18806 @@ -Starting test test1 -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +=================> RouteList Build 'test1' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.19 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.19 Ifp en0 Ifa 10.0.0.19 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.19 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.19 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.19 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.13 Ifp en0 Ifa 10.0.0.13 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.13 Ifp en0 Ifa 10.0.0.13 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.19 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.19 Ifp en0 Ifa 10.0.0.19 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.19 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.19 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.19 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } routes1 and routes2 are the same +=================> RouteList Build 'test1': PASSED <================= -Starting test test2 -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +=================> RouteList Build 'test2' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.13 Ifp en0 Ifa 10.0.0.13 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.13 Ifp en0 Ifa 10.0.0.13 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 - 1. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } routes1 and routes2 are the same +=================> RouteList Build 'test2': PASSED <================= -Starting test test3 -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 +=================> RouteList Build 'test3' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en0 Ifa 192.168.2.10 + 1. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 + 2. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 } -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.20 + 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 + 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 + 1. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 + 2. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 + 1. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 + 2. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.20 + 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 + 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en0 Ifa 192.168.2.10 + 1. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 + 2. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.13 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.13 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.13 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +routes1 and routes2 are the same +=================> RouteList Build 'test3': PASSED <================= + +=================> RouteList Build 'test4' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test4': PASSED <================= + +=================> RouteList Build 'test5' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 + 2. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.12 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.12 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 2. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +routes1 and routes2 are the same +=================> RouteList Build 'test5': PASSED <================= + +=================> RouteList Build 'test6' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Adding = { + 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Adding = { + 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +routes1 and routes2 are the same +=================> RouteList Build 'test6': PASSED <================= + +=================> RouteList Build 'test7' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Adding = { + 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Adding = { + 0. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 2. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 + 1. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 2. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 + 1. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 2. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Routes are = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +routes1 and routes2 are the same +=================> RouteList Build 'test7': PASSED <================= + +=================> RouteList Build 'test8' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test8': PASSED <================= + +=================> RouteList Build 'test9' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +routes1 and routes2 are the same +=================> RouteList Build 'test9': PASSED <================= + +=================> RouteList Build 'test10' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +routes1 and routes2 are the same +=================> RouteList Build 'test10': PASSED <================= + +=================> RouteList Build 'test11' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 + 1. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 2. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 } routes1 and routes2 are the same +=================> RouteList Build 'test11': PASSED <================= -Starting test test4 -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 +=================> RouteList Build 'test12' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 +routes1 and routes2 are the same +=================> RouteList Build 'test12': PASSED <================= + +=================> RouteList Build 'test13' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 } Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] } routes1 and routes2 are the same +=================> RouteList Build 'test13': PASSED <================= -Starting test test5 -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 -} -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 6. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.11 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.12 - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.12 Ifp en0 Ifa 10.0.0.12 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 -} -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 -} -Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 6. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> RouteList Build 'test14' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] } routes1 and routes2 are the same +=================> RouteList Build 'test14': PASSED <================= -Starting test test15 -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.22.44 Ifp en0 Ifa 169.254.22.44 [direct] [never] [SCOPED] +=================> RouteList Build 'test15' <================= +Adding = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 [last] } Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.22.44 Ifp en0 Ifa 169.254.22.44 [direct] [SCOPED] + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 } -test: Adding = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.22.44 Ifp en0 Ifa 169.254.22.44 [direct] [never] [SCOPED] +Adding = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 [last] } Routes are = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.22.44 Ifp en0 Ifa 169.254.22.44 [direct] [SCOPED] + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +routes1 and routes2 are the same +=================> RouteList Build 'test15': PASSED <================= + +=================> RouteList Build 'test16' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Adding = { + 0. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 + 1. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 2. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 3. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 4. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +21. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +22. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +28. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +29. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +30. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.151.63.82/32 Ifp en0 !Ifp utun0 +43. Net 17.151.63.81/32 Ifp en0 !Ifp utun0 +44. Net 17.151.63.80/32 !Ifp utun0 +45. Net 17.1.0.0/16 !Ifp utun0 +46. Net 17.2.0.0/24 !Ifp utun0 +47. Net 10.0.0.0/24 !Ifp utun0 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Adding = { + 0. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 + 1. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 2. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 3. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 4. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +21. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +22. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +28. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +29. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +30. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.151.63.82/32 Ifp en0 !Ifp utun0 +43. Net 17.151.63.81/32 Ifp en0 !Ifp utun0 +44. Net 17.151.63.80/32 !Ifp utun0 +45. Net 17.1.0.0/16 !Ifp utun0 +46. Net 17.2.0.0/24 !Ifp utun0 +47. Net 10.0.0.0/24 !Ifp utun0 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +routes1 and routes2 are the same +=================> RouteList Build 'test16': PASSED <================= + +=================> RouteList Build 'test17' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 1. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 2. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Adding = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 2. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +routes1 and routes2 are the same +=================> RouteList Build 'test17': PASSED <================= + +=================> RouteList Build 'test18' <================= +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 + 2. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +12. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +13. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Adding = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 + 2. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +12. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +13. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +} +Routes are = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 } routes1 and routes2 are the same +=================> RouteList Build 'test18': PASSED <================= + +=================> Apply 'test1', 'test2' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test1', 'test2' End <================= + +=================> Apply 'test2', 'test1' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test2', 'test1' End <================= + +=================> Apply 'test1', 'test3' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test1', 'test3' End <================= + +=================> Apply 'test3', 'test1' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +=================> Apply 'test3', 'test1' End <================= + +=================> Apply 'test1', 'test4' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test1', 'test4' End <================= + +=================> Apply 'test4', 'test1' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test4', 'test1' End <================= + +=================> Apply 'test1', 'test5' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test1', 'test5' End <================= + +=================> Apply 'test5', 'test1' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test5', 'test1' End <================= + +=================> Apply 'test1', 'test6' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test1', 'test6' End <================= + +=================> Apply 'test6', 'test1' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test6', 'test1' End <================= + +=================> Apply 'test1', 'test7' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test1', 'test7' End <================= + +=================> Apply 'test7', 'test1' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test7', 'test1' End <================= + +=================> Apply 'test1', 'test8' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test1', 'test8' End <================= + +=================> Apply 'test8', 'test1' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test8', 'test1' End <================= + +=================> Apply 'test1', 'test9' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +=================> Apply 'test1', 'test9' End <================= + +=================> Apply 'test9', 'test1' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test9', 'test1' End <================= + +=================> Apply 'test1', 'test10' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +=================> Apply 'test1', 'test10' End <================= + +=================> Apply 'test10', 'test1' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test10', 'test1' End <================= + +=================> Apply 'test1', 'test11' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +=================> Apply 'test1', 'test11' End <================= + +=================> Apply 'test11', 'test1' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test11', 'test1' End <================= + +=================> Apply 'test1', 'test12' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test1', 'test12' End <================= + +=================> Apply 'test12', 'test1' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test12', 'test1' End <================= + +=================> Apply 'test1', 'test13' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test1', 'test13' End <================= + +=================> Apply 'test13', 'test1' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test13', 'test1' End <================= + +=================> Apply 'test1', 'test14' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test1', 'test14' End <================= + +=================> Apply 'test14', 'test1' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test14', 'test1' End <================= + +=================> Apply 'test1', 'test15' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test1', 'test15' End <================= + +=================> Apply 'test15', 'test1' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test15', 'test1' End <================= + +=================> Apply 'test1', 'test16' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test1', 'test16' End <================= + +=================> Apply 'test16', 'test1' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test16', 'test1' End <================= + +=================> Apply 'test1', 'test17' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test1', 'test17' End <================= + +=================> Apply 'test17', 'test1' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test17', 'test1' End <================= + +=================> Apply 'test1', 'test18' Begin <================= +Old routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test1', 'test18' End <================= + +=================> Apply 'test18', 'test1' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test1') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test18', 'test1' End <================= + +=================> Apply 'test2', 'test3' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test2', 'test3' End <================= + +=================> Apply 'test3', 'test2' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +=================> Apply 'test3', 'test2' End <================= + +=================> Apply 'test2', 'test4' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test2', 'test4' End <================= + +=================> Apply 'test4', 'test2' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test4', 'test2' End <================= + +=================> Apply 'test2', 'test5' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test2', 'test5' End <================= -Compare 1 to 2: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} - -Compare 2 to 1: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} - -Compare 1 to 1: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} - -Compare 1 to 3: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - 6. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] - 7. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] - 8. Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -} -Remove old[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] -Add new[6] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] -Add new[7] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] -Add new[8] = Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 - -Compare 3 to 1: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - 6. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] - 7. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] - 8. Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] -Remove old[6] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] -Remove old[7] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] -Remove old[8] = Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - -Compare 2 to 3: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - 6. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] - 7. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] - 8. Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -} -Remove old[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] -Add new[6] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] -Add new[7] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] -Add new[8] = Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 - -Compare 3 to 2: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - 6. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] - 7. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] - 8. Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] -Remove old[6] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] -Remove old[7] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] -Remove old[8] = Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - -Compare 3 to 4: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - 6. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] - 7. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] - 8. Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] -} -Remove old[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 -Remove old[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Remove old[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] -Remove old[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 -Remove old[4] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Remove old[5] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -Remove old[6] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.10 Ifp en0 Ifa 192.168.2.10 [SCOPED] -Remove old[7] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.20 Ifp en1 Ifa 192.168.2.20 [SCOPED] -Remove old[8] = Dest 192.168.3.0 Mask 255.255.255.0 Gate 192.168.3.30 Ifp fw0 Ifa 192.168.3.30 -Add new[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] -Add new[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] -Add new[2] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 -Add new[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] -Add new[4] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 -Add new[5] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] - -Compare 5 to 4: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 6. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [non-local] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.11 Ifp en0 Ifa 10.0.0.11 [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.40.191 Ifp en0 Ifa 17.202.40.191 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.24 Ifp en1 Ifa 17.202.42.24 [SCOPED] -} -Remove old[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 -Remove old[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] [SCOPED] -Add new[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [non-local] - -Compare 6 to 7: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.11.33 Ifp fw0 Ifa 169.254.11.33 [direct] [last] [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Dest 17.255.96.0 Mask 255.255.240.0 Gate 17.255.98.164 Ifp en2 Ifa 17.255.98.164 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.11.33 Ifp fw0 Ifa 169.254.11.33 [direct] [last] [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Dest 17.255.96.0 Mask 255.255.240.0 Gate 17.255.98.164 Ifp en2 Ifa 17.255.98.164 -} -Remove old[4] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 -Remove old[5] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 [SCOPED] -Add new[4] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 -Add new[5] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 [SCOPED] - -Compare 7 to 6: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 3. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.11.33 Ifp fw0 Ifa 169.254.11.33 [direct] [last] [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 6. Dest 17.255.96.0 Mask 255.255.240.0 Gate 17.255.98.164 Ifp en2 Ifa 17.255.98.164 -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 3. Dest 0.0.0.0 Mask 0.0.0.0 Gate 169.254.11.33 Ifp fw0 Ifa 169.254.11.33 [direct] [last] [SCOPED] - 4. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 - 5. Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 [SCOPED] - 6. Dest 17.255.96.0 Mask 255.255.240.0 Gate 17.255.98.164 Ifp en2 Ifa 17.255.98.164 -} -Remove old[4] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 -Remove old[5] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 [SCOPED] -Add new[4] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.113 Ifp en0 Ifa 17.202.42.113 -Add new[5] = Dest 17.202.40.0 Mask 255.255.252.0 Gate 17.202.42.111 Ifp en1 Ifa 17.202.42.111 [SCOPED] - -Compare 8 to 9: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [first] - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 -Remove old[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Remove old[2] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 -Remove old[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] -Add new[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] -Add new[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [first] -Add new[4] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 [SCOPED] -Add new[5] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - -Compare 8 to 10: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 -Remove old[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Remove old[2] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 -Remove old[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 -Add new[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] -Add new[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 -Add new[4] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] -Add new[5] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - -Compare 8 to 11: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] - 2. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 - 4. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] - 5. Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 -} -Remove old[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 -Remove old[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Remove old[2] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 -Remove old[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -Add new[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 -Add new[1] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] -Add new[2] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] -Add new[3] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 -Add new[4] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] -Add new[5] = Dest 192.168.2.0 Mask 255.255.255.0 Gate 192.168.2.30 Ifp fw0 Ifa 192.168.2.30 - -Compare 12 to 13: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [SCOPED] -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] -} - -Compare 13 to 14: -Old Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 - 1. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 2. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 - 3. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] -} -New Routes = = { - 0. Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] - 1. Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.20 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] -} -Remove old[0] = Dest 0.0.0.0 Mask 0.0.0.0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 -Remove old[2] = Dest 10.0.0.0 Mask 255.255.255.0 Gate 10.0.0.10 Ifp en0 Ifa 10.0.0.10 +=================> Apply 'test5', 'test2' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test5', 'test2' End <================= + +=================> Apply 'test2', 'test6' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test2', 'test6' End <================= + +=================> Apply 'test6', 'test2' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test6', 'test2' End <================= + +=================> Apply 'test2', 'test7' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test2', 'test7' End <================= + +=================> Apply 'test7', 'test2' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test7', 'test2' End <================= + +=================> Apply 'test2', 'test8' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test2', 'test8' End <================= + +=================> Apply 'test8', 'test2' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test8', 'test2' End <================= + +=================> Apply 'test2', 'test9' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +=================> Apply 'test2', 'test9' End <================= + +=================> Apply 'test9', 'test2' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test9', 'test2' End <================= + +=================> Apply 'test2', 'test10' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +=================> Apply 'test2', 'test10' End <================= + +=================> Apply 'test10', 'test2' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test10', 'test2' End <================= + +=================> Apply 'test2', 'test11' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +=================> Apply 'test2', 'test11' End <================= + +=================> Apply 'test11', 'test2' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test11', 'test2' End <================= + +=================> Apply 'test2', 'test12' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test2', 'test12' End <================= + +=================> Apply 'test12', 'test2' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test12', 'test2' End <================= + +=================> Apply 'test2', 'test13' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test2', 'test13' End <================= + +=================> Apply 'test13', 'test2' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test13', 'test2' End <================= + +=================> Apply 'test2', 'test14' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test2', 'test14' End <================= + +=================> Apply 'test14', 'test2' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test14', 'test2' End <================= + +=================> Apply 'test2', 'test15' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test2', 'test15' End <================= + +=================> Apply 'test15', 'test2' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test15', 'test2' End <================= + +=================> Apply 'test2', 'test16' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test2', 'test16' End <================= + +=================> Apply 'test16', 'test2' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test16', 'test2' End <================= + +=================> Apply 'test2', 'test17' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test2', 'test17' End <================= + +=================> Apply 'test17', 'test2' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test17', 'test2' End <================= + +=================> Apply 'test2', 'test18' Begin <================= +Old routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test2', 'test18' End <================= + +=================> Apply 'test18', 'test2' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test2') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test18', 'test2' End <================= + +=================> Apply 'test3', 'test4' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test3', 'test4' End <================= + +=================> Apply 'test4', 'test3' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test4', 'test3' End <================= + +=================> Apply 'test3', 'test5' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test3', 'test5' End <================= + +=================> Apply 'test5', 'test3' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test5', 'test3' End <================= + +=================> Apply 'test3', 'test6' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test3', 'test6' End <================= + +=================> Apply 'test6', 'test3' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test6', 'test3' End <================= + +=================> Apply 'test3', 'test7' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test3', 'test7' End <================= + +=================> Apply 'test7', 'test3' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test7', 'test3' End <================= + +=================> Apply 'test3', 'test8' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test3', 'test8' End <================= + +=================> Apply 'test8', 'test3' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test8', 'test3' End <================= + +=================> Apply 'test3', 'test9' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +=================> Apply 'test3', 'test9' End <================= + +=================> Apply 'test9', 'test3' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test9', 'test3' End <================= + +=================> Apply 'test3', 'test10' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +=================> Apply 'test3', 'test10' End <================= + +=================> Apply 'test10', 'test3' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test10', 'test3' End <================= + +=================> Apply 'test3', 'test11' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +=================> Apply 'test3', 'test11' End <================= + +=================> Apply 'test11', 'test3' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test11', 'test3' End <================= + +=================> Apply 'test3', 'test12' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test3', 'test12' End <================= + +=================> Apply 'test12', 'test3' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test12', 'test3' End <================= + +=================> Apply 'test3', 'test13' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test3', 'test13' End <================= + +=================> Apply 'test13', 'test3' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test13', 'test3' End <================= + +=================> Apply 'test3', 'test14' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test3', 'test14' End <================= + +=================> Apply 'test14', 'test3' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test14', 'test3' End <================= + +=================> Apply 'test3', 'test15' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test3', 'test15' End <================= + +=================> Apply 'test15', 'test3' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test15', 'test3' End <================= + +=================> Apply 'test3', 'test16' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test3', 'test16' End <================= + +=================> Apply 'test16', 'test3' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test16', 'test3' End <================= + +=================> Apply 'test3', 'test17' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test3', 'test17' End <================= + +=================> Apply 'test17', 'test3' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test17', 'test3' End <================= + +=================> Apply 'test3', 'test18' Begin <================= +Old routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Remove old[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Remove old[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Remove old[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +Remove old[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test3', 'test18' End <================= + +=================> Apply 'test18', 'test3' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test3') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 6. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] + 9. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +10. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +11. Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +12. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +13. Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +14. Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[6]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[14]: Net 192.168.3.1/32 Ifp fw0 Ifa 192.168.3.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.3.1 Ifp fw0 Ifa 192.168.3.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Add new[8]: Net 192.168.2.0/24 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[9]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[10]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 192.168.2.1/32 Ifp en0 Ifa 192.168.2.10 [SCOPED] +Add new[12]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.20 [SCOPED] +Add new[13]: Net 192.168.3.0/24 Ifp fw0 Ifa 192.168.3.30 +=================> Apply 'test18', 'test3' End <================= + +=================> Apply 'test4', 'test5' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +=================> Apply 'test4', 'test5' End <================= + +=================> Apply 'test5', 'test4' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +=================> Apply 'test5', 'test4' End <================= + +=================> Apply 'test4', 'test6' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test4', 'test6' End <================= + +=================> Apply 'test6', 'test4' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test6', 'test4' End <================= + +=================> Apply 'test4', 'test7' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test4', 'test7' End <================= + +=================> Apply 'test7', 'test4' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test7', 'test4' End <================= + +=================> Apply 'test4', 'test8' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test4', 'test8' End <================= + +=================> Apply 'test8', 'test4' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test8', 'test4' End <================= + +=================> Apply 'test4', 'test9' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test4', 'test9' End <================= + +=================> Apply 'test9', 'test4' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test9', 'test4' End <================= + +=================> Apply 'test4', 'test10' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test4', 'test10' End <================= + +=================> Apply 'test10', 'test4' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test10', 'test4' End <================= + +=================> Apply 'test4', 'test11' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test4', 'test11' End <================= + +=================> Apply 'test11', 'test4' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test11', 'test4' End <================= + +=================> Apply 'test4', 'test12' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test4', 'test12' End <================= + +=================> Apply 'test12', 'test4' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test12', 'test4' End <================= + +=================> Apply 'test4', 'test13' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test4', 'test13' End <================= + +=================> Apply 'test13', 'test4' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test13', 'test4' End <================= + +=================> Apply 'test4', 'test14' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +=================> Apply 'test4', 'test14' End <================= + +=================> Apply 'test14', 'test4' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test14', 'test4' End <================= + +=================> Apply 'test4', 'test15' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test4', 'test15' End <================= + +=================> Apply 'test15', 'test4' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test15', 'test4' End <================= + +=================> Apply 'test4', 'test16' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test4', 'test16' End <================= + +=================> Apply 'test16', 'test4' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test16', 'test4' End <================= + +=================> Apply 'test4', 'test17' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test4', 'test17' End <================= + +=================> Apply 'test17', 'test4' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test17', 'test4' End <================= + +=================> Apply 'test4', 'test18' Begin <================= +Old routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test4', 'test18' End <================= + +=================> Apply 'test18', 'test4' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test4') = = { + 0. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 3. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 5. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 6. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 7. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 8. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 + 9. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[6]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[0]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 +Add new[7]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[3]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[4]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[5]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[8]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[9]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test18', 'test4' End <================= + +=================> Apply 'test5', 'test6' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test5', 'test6' End <================= + +=================> Apply 'test6', 'test5' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test6', 'test5' End <================= + +=================> Apply 'test5', 'test7' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test5', 'test7' End <================= + +=================> Apply 'test7', 'test5' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test7', 'test5' End <================= + +=================> Apply 'test5', 'test8' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test5', 'test8' End <================= + +=================> Apply 'test8', 'test5' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test8', 'test5' End <================= + +=================> Apply 'test5', 'test9' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test5', 'test9' End <================= + +=================> Apply 'test9', 'test5' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test9', 'test5' End <================= + +=================> Apply 'test5', 'test10' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test5', 'test10' End <================= + +=================> Apply 'test10', 'test5' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test10', 'test5' End <================= + +=================> Apply 'test5', 'test11' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test5', 'test11' End <================= + +=================> Apply 'test11', 'test5' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test11', 'test5' End <================= + +=================> Apply 'test5', 'test12' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test5', 'test12' End <================= + +=================> Apply 'test12', 'test5' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test12', 'test5' End <================= + +=================> Apply 'test5', 'test13' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test5', 'test13' End <================= + +=================> Apply 'test13', 'test5' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test13', 'test5' End <================= + +=================> Apply 'test5', 'test14' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +=================> Apply 'test5', 'test14' End <================= + +=================> Apply 'test14', 'test5' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test14', 'test5' End <================= + +=================> Apply 'test5', 'test15' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test5', 'test15' End <================= + +=================> Apply 'test15', 'test5' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test15', 'test5' End <================= + +=================> Apply 'test5', 'test16' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test5', 'test16' End <================= + +=================> Apply 'test16', 'test5' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test16', 'test5' End <================= + +=================> Apply 'test5', 'test17' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test5', 'test17' End <================= + +=================> Apply 'test17', 'test5' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test17', 'test5' End <================= + +=================> Apply 'test5', 'test18' Begin <================= +Old routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Remove old[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Remove old[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Remove old[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Remove old[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test5', 'test18' End <================= + +=================> Apply 'test18', 'test5' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test5') = = { + 0. Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 + 1. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] + 7. Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 + 8. Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] + 9. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +10. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +11. Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[11]: Net 17.219.156.1/32 Ifp ppp0 Ifa 17.219.156.22 +Add new[0]: Net 0.0.0.0/0 Gate 17.219.156.1 Ifp ppp0 Ifa 17.219.156.22 +Add new[7]: Net 17.202.20.1/32 Ifp en0 Ifa 17.202.40.191 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en0 Ifa 17.202.40.191 [SCOPED] +Add new[8]: Net 17.202.20.1/32 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.20.1 Ifp en1 Ifa 17.202.42.24 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.11 [SCOPED] +Add new[9]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.40.191 +Add new[10]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.24 [SCOPED] +=================> Apply 'test18', 'test5' End <================= + +=================> Apply 'test6', 'test7' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +=================> Apply 'test6', 'test7' End <================= + +=================> Apply 'test7', 'test6' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +=================> Apply 'test7', 'test6' End <================= + +=================> Apply 'test6', 'test8' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test6', 'test8' End <================= + +=================> Apply 'test8', 'test6' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test8', 'test6' End <================= + +=================> Apply 'test6', 'test9' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test6', 'test9' End <================= + +=================> Apply 'test9', 'test6' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test9', 'test6' End <================= + +=================> Apply 'test6', 'test10' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test6', 'test10' End <================= + +=================> Apply 'test10', 'test6' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test10', 'test6' End <================= + +=================> Apply 'test6', 'test11' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test6', 'test11' End <================= + +=================> Apply 'test11', 'test6' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test11', 'test6' End <================= + +=================> Apply 'test6', 'test12' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test6', 'test12' End <================= + +=================> Apply 'test12', 'test6' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test12', 'test6' End <================= + +=================> Apply 'test6', 'test13' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test6', 'test13' End <================= + +=================> Apply 'test13', 'test6' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test13', 'test6' End <================= + +=================> Apply 'test6', 'test14' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test6', 'test14' End <================= + +=================> Apply 'test14', 'test6' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test14', 'test6' End <================= + +=================> Apply 'test6', 'test15' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test6', 'test15' End <================= + +=================> Apply 'test15', 'test6' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test15', 'test6' End <================= + +=================> Apply 'test6', 'test16' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test6', 'test16' End <================= + +=================> Apply 'test16', 'test6' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test16', 'test6' End <================= + +=================> Apply 'test6', 'test17' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test6', 'test17' End <================= + +=================> Apply 'test17', 'test6' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test17', 'test6' End <================= + +=================> Apply 'test6', 'test18' Begin <================= +Old routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Remove old[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Remove old[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test6', 'test18' End <================= + +=================> Apply 'test18', 'test6' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test6') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 + 5. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 + 7. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 +Add new[5]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test18', 'test6' End <================= + +=================> Apply 'test7', 'test8' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test7', 'test8' End <================= + +=================> Apply 'test8', 'test7' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test8', 'test7' End <================= + +=================> Apply 'test7', 'test9' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test7', 'test9' End <================= + +=================> Apply 'test9', 'test7' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test9', 'test7' End <================= + +=================> Apply 'test7', 'test10' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test7', 'test10' End <================= + +=================> Apply 'test10', 'test7' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test10', 'test7' End <================= + +=================> Apply 'test7', 'test11' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test7', 'test11' End <================= + +=================> Apply 'test11', 'test7' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test11', 'test7' End <================= + +=================> Apply 'test7', 'test12' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test7', 'test12' End <================= + +=================> Apply 'test12', 'test7' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test12', 'test7' End <================= + +=================> Apply 'test7', 'test13' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test7', 'test13' End <================= + +=================> Apply 'test13', 'test7' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test13', 'test7' End <================= + +=================> Apply 'test7', 'test14' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test7', 'test14' End <================= + +=================> Apply 'test14', 'test7' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test14', 'test7' End <================= + +=================> Apply 'test7', 'test15' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test7', 'test15' End <================= + +=================> Apply 'test15', 'test7' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test15', 'test7' End <================= + +=================> Apply 'test7', 'test16' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test7', 'test16' End <================= + +=================> Apply 'test16', 'test7' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test16', 'test7' End <================= + +=================> Apply 'test7', 'test17' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test7', 'test17' End <================= + +=================> Apply 'test17', 'test7' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test17', 'test7' End <================= + +=================> Apply 'test7', 'test18' Begin <================= +Old routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Remove old[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Remove old[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Remove old[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Remove old[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Remove old[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +Remove old[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test7', 'test18' End <================= + +=================> Apply 'test18', 'test7' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test7') = = { + 0. Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 + 1. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] + 2. Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 3. Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] + 4. Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 + 5. Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 6. Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 + 7. Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] + 8. Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 + 9. Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[9]: Net 17.255.96.1/32 Ifp en2 Ifa 17.255.98.164 +Add new[0]: Net 0.0.0.0/0 Gate 17.255.96.1 Ifp en2 Ifa 17.255.98.164 +Add new[6]: Net 17.202.40.1/32 Ifp en1 Ifa 17.202.42.111 +Add new[1]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en1 Ifa 17.202.42.111 [SCOPED] +Add new[7]: Net 17.202.40.1/32 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 17.202.40.1 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[3]: Net 0.0.0.0/0 Ifp fw0 Ifa 169.254.11.33 [SCOPED] +Add new[4]: Net 17.202.40.0/22 Ifp en1 Ifa 17.202.42.111 +Add new[5]: Net 17.202.40.0/22 Ifp en0 Ifa 17.202.42.113 [SCOPED] +Add new[8]: Net 17.255.96.0/20 Ifp en2 Ifa 17.255.98.164 +=================> Apply 'test18', 'test7' End <================= + +=================> Apply 'test8', 'test9' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test8', 'test9' End <================= + +=================> Apply 'test9', 'test8' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test9', 'test8' End <================= + +=================> Apply 'test8', 'test10' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test8', 'test10' End <================= + +=================> Apply 'test10', 'test8' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test10', 'test8' End <================= + +=================> Apply 'test8', 'test11' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test8', 'test11' End <================= + +=================> Apply 'test11', 'test8' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test11', 'test8' End <================= + +=================> Apply 'test8', 'test12' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +=================> Apply 'test8', 'test12' End <================= + +=================> Apply 'test12', 'test8' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +=================> Apply 'test12', 'test8' End <================= + +=================> Apply 'test8', 'test13' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +=================> Apply 'test8', 'test13' End <================= + +=================> Apply 'test13', 'test8' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +=================> Apply 'test13', 'test8' End <================= + +=================> Apply 'test8', 'test14' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test8', 'test14' End <================= + +=================> Apply 'test14', 'test8' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test14', 'test8' End <================= + +=================> Apply 'test8', 'test15' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test8', 'test15' End <================= + +=================> Apply 'test15', 'test8' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test15', 'test8' End <================= + +=================> Apply 'test8', 'test16' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test8', 'test16' End <================= + +=================> Apply 'test16', 'test8' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test16', 'test8' End <================= + +=================> Apply 'test8', 'test17' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test8', 'test17' End <================= + +=================> Apply 'test17', 'test8' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test17', 'test8' End <================= + +=================> Apply 'test8', 'test18' Begin <================= +Old routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test8', 'test18' End <================= + +=================> Apply 'test18', 'test8' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test8') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test18', 'test8' End <================= + +=================> Apply 'test9', 'test10' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test9', 'test10' End <================= + +=================> Apply 'test10', 'test9' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test10', 'test9' End <================= + +=================> Apply 'test9', 'test11' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test9', 'test11' End <================= + +=================> Apply 'test11', 'test9' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test11', 'test9' End <================= + +=================> Apply 'test9', 'test12' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test9', 'test12' End <================= + +=================> Apply 'test12', 'test9' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test12', 'test9' End <================= + +=================> Apply 'test9', 'test13' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test9', 'test13' End <================= + +=================> Apply 'test13', 'test9' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test13', 'test9' End <================= + +=================> Apply 'test9', 'test14' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +=================> Apply 'test9', 'test14' End <================= + +=================> Apply 'test14', 'test9' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test14', 'test9' End <================= + +=================> Apply 'test9', 'test15' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test9', 'test15' End <================= + +=================> Apply 'test15', 'test9' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test15', 'test9' End <================= + +=================> Apply 'test9', 'test16' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test9', 'test16' End <================= + +=================> Apply 'test16', 'test9' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test16', 'test9' End <================= + +=================> Apply 'test9', 'test17' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test9', 'test17' End <================= + +=================> Apply 'test17', 'test9' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test17', 'test9' End <================= + +=================> Apply 'test9', 'test18' Begin <================= +Old routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test9', 'test18' End <================= + +=================> Apply 'test18', 'test9' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test9') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 2. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [first] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [first] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[2]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [first] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test18', 'test9' End <================= + +=================> Apply 'test10', 'test11' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test10', 'test11' End <================= + +=================> Apply 'test11', 'test10' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +=================> Apply 'test11', 'test10' End <================= + +=================> Apply 'test10', 'test12' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test10', 'test12' End <================= + +=================> Apply 'test12', 'test10' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test12', 'test10' End <================= + +=================> Apply 'test10', 'test13' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test10', 'test13' End <================= + +=================> Apply 'test13', 'test10' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test13', 'test10' End <================= + +=================> Apply 'test10', 'test14' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +=================> Apply 'test10', 'test14' End <================= + +=================> Apply 'test14', 'test10' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test14', 'test10' End <================= + +=================> Apply 'test10', 'test15' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test10', 'test15' End <================= + +=================> Apply 'test15', 'test10' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test15', 'test10' End <================= + +=================> Apply 'test10', 'test16' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test10', 'test16' End <================= + +=================> Apply 'test16', 'test10' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test16', 'test10' End <================= + +=================> Apply 'test10', 'test17' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test10', 'test17' End <================= + +=================> Apply 'test17', 'test10' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test17', 'test10' End <================= + +=================> Apply 'test10', 'test18' Begin <================= +Old routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test10', 'test18' End <================= + +=================> Apply 'test18', 'test10' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test10') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test18', 'test10' End <================= + +=================> Apply 'test11', 'test12' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test11', 'test12' End <================= + +=================> Apply 'test12', 'test11' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test12', 'test11' End <================= + +=================> Apply 'test11', 'test13' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test11', 'test13' End <================= + +=================> Apply 'test13', 'test11' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test13', 'test11' End <================= + +=================> Apply 'test11', 'test14' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +=================> Apply 'test11', 'test14' End <================= + +=================> Apply 'test14', 'test11' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test14', 'test11' End <================= + +=================> Apply 'test11', 'test15' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test11', 'test15' End <================= + +=================> Apply 'test15', 'test11' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test15', 'test11' End <================= + +=================> Apply 'test11', 'test16' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test11', 'test16' End <================= + +=================> Apply 'test16', 'test11' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test16', 'test11' End <================= + +=================> Apply 'test11', 'test17' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test11', 'test17' End <================= + +=================> Apply 'test17', 'test11' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test17', 'test11' End <================= + +=================> Apply 'test11', 'test18' Begin <================= +Old routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Remove old[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Remove old[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Remove old[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Remove old[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +Remove old[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test11', 'test18' End <================= + +=================> Apply 'test18', 'test11' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test11') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] + 2. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 + 4. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 + 6. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] + 7. Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 + 8. Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 +Add new[8]: Net 192.168.2.1/32 Ifp fw0 Ifa 192.168.2.30 +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp fw0 Ifa 192.168.2.30 [SCOPED] +Add new[6]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[2]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 +Add new[4]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 [last] [SCOPED] +Add new[7]: Net 192.168.2.0/24 Ifp fw0 Ifa 192.168.2.30 +=================> Apply 'test18', 'test11' End <================= + +=================> Apply 'test12', 'test13' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +=================> Apply 'test12', 'test13' End <================= + +=================> Apply 'test13', 'test12' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +=================> Apply 'test13', 'test12' End <================= + +=================> Apply 'test12', 'test14' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test12', 'test14' End <================= + +=================> Apply 'test14', 'test12' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test14', 'test12' End <================= + +=================> Apply 'test12', 'test15' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test12', 'test15' End <================= + +=================> Apply 'test15', 'test12' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test15', 'test12' End <================= + +=================> Apply 'test12', 'test16' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test12', 'test16' End <================= + +=================> Apply 'test16', 'test12' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test16', 'test12' End <================= + +=================> Apply 'test12', 'test17' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test12', 'test17' End <================= + +=================> Apply 'test17', 'test12' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test17', 'test12' End <================= + +=================> Apply 'test12', 'test18' Begin <================= +Old routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test12', 'test18' End <================= + +=================> Apply 'test18', 'test12' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test12') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [SCOPED] +=================> Apply 'test18', 'test12' End <================= + +=================> Apply 'test13', 'test14' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test13', 'test14' End <================= + +=================> Apply 'test14', 'test13' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test14', 'test13' End <================= + +=================> Apply 'test13', 'test15' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test13', 'test15' End <================= + +=================> Apply 'test15', 'test13' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test15', 'test13' End <================= + +=================> Apply 'test13', 'test16' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test13', 'test16' End <================= + +=================> Apply 'test16', 'test13' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test16', 'test13' End <================= + +=================> Apply 'test13', 'test17' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test13', 'test17' End <================= + +=================> Apply 'test17', 'test13' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test17', 'test13' End <================= + +=================> Apply 'test13', 'test18' Begin <================= +Old routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Remove old[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test13', 'test18' End <================= + +=================> Apply 'test18', 'test13' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test13') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] + 4. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 5. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[4]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +Add new[1]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[3]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] [SCOPED] +=================> Apply 'test18', 'test13' End <================= + +=================> Apply 'test14', 'test15' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test14', 'test15' End <================= + +=================> Apply 'test15', 'test14' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test15', 'test14' End <================= + +=================> Apply 'test14', 'test16' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test14', 'test16' End <================= + +=================> Apply 'test16', 'test14' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test16', 'test14' End <================= + +=================> Apply 'test14', 'test17' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test14', 'test17' End <================= + +=================> Apply 'test17', 'test14' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test17', 'test14' End <================= + +=================> Apply 'test14', 'test18' Begin <================= +Old routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Remove old[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +Remove old[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test14', 'test18' End <================= + +=================> Apply 'test18', 'test14' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test14') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] + 1. Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] + 2. Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[2]: Net 10.0.0.1/32 Ifp en1 Ifa 10.0.0.20 [last] +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en1 Ifa 10.0.0.20 [never] [SCOPED] +Add new[1]: Net 10.0.0.0/24 Ifp en1 Ifa 10.0.0.20 [last] +=================> Apply 'test18', 'test14' End <================= + +=================> Apply 'test15', 'test16' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test15', 'test16' End <================= + +=================> Apply 'test16', 'test15' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test16', 'test15' End <================= + +=================> Apply 'test15', 'test17' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test15', 'test17' End <================= + +=================> Apply 'test17', 'test15' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test17', 'test15' End <================= + +=================> Apply 'test15', 'test18' Begin <================= +Old routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test15', 'test18' End <================= + +=================> Apply 'test18', 'test15' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test15') = = { + 0. Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Ifp en0 Ifa 169.254.22.44 +=================> Apply 'test18', 'test15' End <================= + +=================> Apply 'test16', 'test17' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test16', 'test17' End <================= + +=================> Apply 'test17', 'test16' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test17', 'test16' End <================= + +=================> Apply 'test16', 'test18' Begin <================= +Old routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Remove old[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Remove old[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test16', 'test18' End <================= + +=================> Apply 'test18', 'test16' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test16') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 5. Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 6. Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 7. Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 8. Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 + 9. Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +10. Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +11. Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +12. Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +13. Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +14. Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +15. Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +16. Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +17. Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +18. Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +19. Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +20. Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +21. Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +22. Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +23. Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +24. Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +25. Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +26. Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +27. Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +28. Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +29. Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +30. Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +31. Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +32. Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +33. Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +34. Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +35. Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +36. Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +37. Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +38. Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +39. Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +40. Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +41. Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +42. Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +43. Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +44. Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +45. Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +46. Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +47. Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +48. Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +49. Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[1]: Net 0.0.0.0/0 Ifp utun0 Ifa 17.153.46.24 [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 10.1.3.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[5]: Net 10.1.4.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[6]: Net 10.1.5.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[7]: Net 10.1.6.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[8]: Net 10.1.7.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[9]: Net 10.16.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[10]: Net 10.45.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[11]: Net 10.53.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[12]: Net 10.70.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[13]: Net 10.74.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[14]: Net 10.90.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[15]: Net 10.91.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[16]: Net 10.100.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[17]: Net 10.113.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[18]: Net 10.128.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[19]: Net 17.0.0.0/9 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[20]: Net 17.1.0.0/16 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[21]: Net 17.2.0.0/24 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[22]: Net 17.34.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[23]: Host 17.112.156.53 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[24]: Net 17.128.0.0/10 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[25]: Host 17.149.0.121 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[26]: Host 17.149.7.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[27]: Host 17.151.63.80 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[28]: Host 17.151.63.81 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[29]: Host 17.151.63.82 Gate 10.0.0.1 Ifp en0 !Ifp utun0 +Add new[30]: Host 17.153.46.24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[31]: Net 17.192.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[32]: Net 17.208.0.0/15 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[33]: Net 17.211.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[34]: Net 17.212.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[35]: Net 17.216.0.0/13 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[36]: Net 17.224.0.0/12 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[37]: Net 17.240.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[38]: Net 17.241.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[39]: Net 17.248.0.0/14 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[40]: Host 17.251.104.200 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[41]: Net 17.252.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[42]: Net 17.253.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[43]: Net 17.254.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[44]: Net 17.255.0.0/16 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[45]: Net 151.193.141.0/27 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[46]: Net 172.16.2.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[47]: Net 192.35.50.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[48]: Net 204.179.20.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +Add new[49]: Net 206.112.116.0/24 Gate 17.153.46.24 Ifp utun0 Ifa 17.153.46.24 +=================> Apply 'test18', 'test16' End <================= + +=================> Apply 'test17', 'test18' Begin <================= +Old routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +New Routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Remove old[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Remove old[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Remove old[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Remove old[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Remove old[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +Remove old[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +=================> Apply 'test17', 'test18' End <================= + +=================> Apply 'test18', 'test17' Begin <================= +Old routes ('test18') = = { + 0. Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 + 1. Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 + 2. Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 + 3. Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 + 4. Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 + 5. Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 + 6. Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 + 7. Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 + 8. Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 + 9. Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +10. Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +11. Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +12. Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +13. Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +} +Add new[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: routing loop detected, not adding: Host 1.1.1.11 Gate 1.1.1.1 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.10 Gate 1.1.1.11 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.9 Gate 1.1.1.10 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.8 Gate 1.1.1.9 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.7 Gate 1.1.1.8 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.6 Gate 1.1.1.7 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.5 Gate 1.1.1.6 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.4 Gate 1.1.1.5 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.3 Gate 1.1.1.4 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.2 Gate 1.1.1.3 Ifp en0 Ifa 192.168.130.16 +IPMonitor RouteProcess: failed to add: Host 1.1.1.1 Gate 1.1.1.2 Ifp en0 Ifa 192.168.130.16 +Add new[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +New Routes ('test17') = = { + 0. Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 + 1. Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] + 2. Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 + 3. Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 + 4. Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] + 5. Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +} +Remove old[0]: Net 0.0.0.0/0 Gate 192.168.130.1 Ifp en0 Ifa 192.168.130.16 +Remove old[12]: Net 192.168.130.0/24 Ifp en0 Ifa 192.168.130.16 +Remove old[13]: Net 192.168.130.1/32 Ifp en0 Ifa 192.168.130.16 +Add new[3]: Net 10.0.0.1/32 Ifp en0 Ifa 10.0.0.10 +Add new[0]: Net 0.0.0.0/0 Gate 10.0.0.1 Ifp en0 Ifa 10.0.0.10 +Add new[5]: Net 192.168.2.1/32 Ifp en1 Ifa 192.168.2.50 [last] +Add new[1]: Net 0.0.0.0/0 Gate 192.168.2.1 Ifp en1 Ifa 192.168.2.50 [never] [SCOPED] +Add new[2]: Net 10.0.0.0/24 Ifp en0 Ifa 10.0.0.10 +Add new[4]: Net 192.168.2.0/24 Ifp en1 Ifa 192.168.2.50 [last] +=================> Apply 'test18', 'test17' End <================= Checking for leaks Process: test_ipv4_routelist [XXXX] Path: XXXX Load Address: 0xXXXX Identifier: test_ipv4_routelist -Version: ??? (???) -Code Type: X86-64 (Native) +Version: 0 +Code Type: X86-64 Parent Process: sh [XXXX] Date/Time: XXXX diff --git a/Plugins/IPMonitor/test_ipv6_routelist_reference.txt b/Plugins/IPMonitor/test_ipv6_routelist_reference.txt new file mode 100644 index 0000000..4a7c27d --- /dev/null +++ b/Plugins/IPMonitor/test_ipv6_routelist_reference.txt @@ -0,0 +1,1400 @@ + +=================> RouteList Build 'test1' <================= +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9602 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9602 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 1. Net fe80::/64 Ifp fw0 [kern] + 2. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 1. Net fe80::/64 Ifp fw0 [kern] + 2. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9602 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9602 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test1': PASSED <================= + +=================> RouteList Build 'test2' <================= +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 1. Net fe80::/64 Ifp fw0 [kern] + 2. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9605 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9603 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 1. Net fe80::/64 Ifp fw0 [kern] + 2. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9604 [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test2': PASSED <================= + +=================> RouteList Build 'test3' <================= +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 !Ifp en1 +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 !Ifp en1 +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test3': PASSED <================= + +=================> RouteList Build 'test4' <================= +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 4. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 4. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test4': PASSED <================= + +=================> RouteList Build 'test5' <================= +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] + 1. Net fe80::/64 Ifp utun0 [kern] + 2. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] + 3. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 4. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 5. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2020:299:a:e02:825:1ed:fecc:abab/128 !Ifp utun0 +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa fe80::cabc:c8ff:fe96:96af [kern] + 1. Net fe80::/64 Ifp en0 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 1. Net fe80::/64 Ifp en1 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa fe80::cabc:c8ff:fe96:96af [kern] + 1. Net fe80::/64 Ifp en0 [kern] +} +Adding = { + 0. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] + 1. Net fe80::/64 Ifp utun0 [kern] + 2. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] + 3. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 4. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 5. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2020:299:a:e02:825:1ed:fecc:abab/128 !Ifp utun0 +} +Adding = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net fe80::/64 Ifp en0 [kern] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +} +Routes are = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +routes1 and routes2 are the same +=================> RouteList Build 'test5': PASSED <================= + +=================> Apply 'test1', 'test2' Begin <================= +Old routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +=================> Apply 'test1', 'test2' End <================= + +=================> Apply 'test2', 'test1' Begin <================= +Old routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +=================> Apply 'test2', 'test1' End <================= + +=================> Apply 'test1', 'test3' Begin <================= +Old routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Remove old[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +!Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +=================> Apply 'test1', 'test3' End <================= + +=================> Apply 'test3', 'test1' Begin <================= +Old routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[4]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[5]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +New Routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Remove old[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Remove old[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +=================> Apply 'test3', 'test1' End <================= + +=================> Apply 'test1', 'test4' Begin <================= +Old routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +!Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +=================> Apply 'test1', 'test4' End <================= + +=================> Apply 'test4', 'test1' Begin <================= +Old routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[15]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[16]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +New Routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +=================> Apply 'test4', 'test1' End <================= + +=================> Apply 'test1', 'test5' Begin <================= +Old routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +!Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +=================> Apply 'test1', 'test5' End <================= + +=================> Apply 'test5', 'test1' Begin <================= +Old routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Add new[11]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[12]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +New Routes ('test1') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +Remove old[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Remove old[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +!Remove old[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +=================> Apply 'test5', 'test1' End <================= + +=================> Apply 'test2', 'test3' Begin <================= +Old routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Remove old[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +!Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +=================> Apply 'test2', 'test3' End <================= + +=================> Apply 'test3', 'test2' Begin <================= +Old routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[4]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[5]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +New Routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Remove old[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Remove old[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +=================> Apply 'test3', 'test2' End <================= + +=================> Apply 'test2', 'test4' Begin <================= +Old routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +!Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +=================> Apply 'test2', 'test4' End <================= + +=================> Apply 'test4', 'test2' Begin <================= +Old routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[15]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[16]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +New Routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +=================> Apply 'test4', 'test2' End <================= + +=================> Apply 'test2', 'test5' Begin <================= +Old routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Add new[6]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[7]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +New Routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Remove old[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +!Remove old[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +=================> Apply 'test2', 'test5' End <================= + +=================> Apply 'test5', 'test2' Begin <================= +Old routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Add new[11]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[12]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +New Routes ('test2') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] + 6. Net fe80::/64 Ifp en0 [kern] + 7. Net fe80::/64 Ifp en1 [kern] [SCOPED] + 8. Net fe80::/64 Ifp fw0 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +Remove old[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Remove old[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +!Remove old[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[8]: Net fe80::/64 Ifp fw0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] [SCOPED] +!Add new[5]: Net 2011:470:1f05:3cb::/64 Ifp fw0 Ifa 2011:470:1f05:3cb:cabc:c8ff:fe96:ab01 [kern] +=================> Apply 'test5', 'test2' End <================= + +=================> Apply 'test3', 'test4' Begin <================= +Old routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[4]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[5]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +New Routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Remove old[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Remove old[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +=================> Apply 'test3', 'test4' End <================= + +=================> Apply 'test4', 'test3' Begin <================= +Old routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[15]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[16]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +New Routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +=================> Apply 'test4', 'test3' End <================= + +=================> Apply 'test3', 'test5' Begin <================= +Old routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[4]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[5]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +New Routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Remove old[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Remove old[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +=================> Apply 'test3', 'test5' End <================= + +=================> Apply 'test5', 'test3' Begin <================= +Old routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Add new[11]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[12]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +New Routes ('test3') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] + 3. Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] + 4. Net fe80::/64 Ifp en0 [kern] + 5. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +!Remove old[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Remove old[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +Remove old[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Remove old[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +!Remove old[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] +!Add new[3]: Net 2020:299:abcd:ef12::/64 Ifp en0 Ifa 2020:299:abcd:ef12:1:2:3:4 [kern] +=================> Apply 'test5', 'test3' End <================= + +=================> Apply 'test4', 'test5' Begin <================= +Old routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Add new[15]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[16]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[2]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +New Routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +=================> Apply 'test4', 'test5' End <================= + +=================> Apply 'test5', 'test4' Begin <================= +Old routes ('test5') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] + 3. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 4. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 5. Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 6. Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 7. Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 8. Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa + 9. Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +10. Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +11. Net fe80::/64 Ifp en0 [kern] +12. Net fe80::/64 Ifp en1 [kern] [SCOPED] +13. Net fe80::/64 Ifp utun0 [kern] [SCOPED] +} +!Add new[11]: Net fe80::/64 Ifp en0 [kern] +!Add new[0]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[12]: Net fe80::/64 Ifp en1 [kern] [SCOPED] +!Add new[1]: Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +!Add new[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +!Add new[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +!Add new[3]: Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] +!Add new[4]: Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] +Add new[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Add new[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Add new[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +New Routes ('test4') = = { + 0. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 1. Net ::/0 Gate fe80::21f:f3ff:fe43:1abf Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 2. Net 2001:470:1f05:3cb::/64 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 [kern] + 3. Net 2001:470:1f05:3cb::/64 Ifp en1 Ifa 2001:470:1f05:3cb:cabc:c8ff:fed9:125a [kern] [SCOPED] + 4. Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 5. Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 6. Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 7. Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 8. Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 + 9. Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +10. Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +11. Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +12. Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +13. Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +14. Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +15. Net fe80::/64 Ifp en0 [kern] +16. Net fe80::/64 Ifp en1 [kern] [SCOPED] +} +!Remove old[2]: Net ::/0 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] [SCOPED] +Remove old[5]: Net 2010:222:3fa5:acb::/48 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[6]: Net 2010:222:3fa5:1234::/40 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[7]: Net 2010:222:3fa5:5678::/40 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[8]: Net 2010:470:1f05:3cb::/64 Gate fe80::2d0:bcff:fe3d:8c00 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa +Remove old[9]: Host 2020:299:a:e02:825:1ed:fecc:abab Gate fe80::21f:f3ff:fe43:1abf Ifp en0 !Ifp utun0 +!Remove old[10]: Net 2620:149:4:f01::/64 Ifp utun0 Ifa 2620:149:4:f01:225:ff:fecc:89aa [kern] +!Remove old[13]: Net fe80::/64 Ifp utun0 [kern] [SCOPED] +IPMonitor RouteProcess: routing loop detected, not adding: Host 2620:149:4:f01:225:ff:fecc:89ab Gate 2620:149:4:f01:225:ff:fecc:89a1 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89aa Gate 2620:149:4:f01:225:ff:fecc:89ab Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a9 Gate 2620:149:4:f01:225:ff:fecc:89aa Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a8 Gate 2620:149:4:f01:225:ff:fecc:89a9 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a7 Gate 2620:149:4:f01:225:ff:fecc:89a8 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a6 Gate 2620:149:4:f01:225:ff:fecc:89a7 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a5 Gate 2620:149:4:f01:225:ff:fecc:89a6 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a4 Gate 2620:149:4:f01:225:ff:fecc:89a5 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a3 Gate 2620:149:4:f01:225:ff:fecc:89a4 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a2 Gate 2620:149:4:f01:225:ff:fecc:89a3 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +IPMonitor RouteProcess: failed to add: Host 2620:149:4:f01:225:ff:fecc:89a1 Gate 2620:149:4:f01:225:ff:fecc:89a2 Ifp en0 Ifa 2001:470:1f05:3cb:cabc:c8ff:fe96:9601 +=================> Apply 'test5', 'test4' End <================= + +Checking for leaks +Process: test_ipv6_routelist [XXXX] +Path: XXXX +Load Address: 0xXXXX +Identifier: test_ipv6_routelist +Version: 0 +Code Type: X86-64 +Parent Process: sh [XXXX] + +Date/Time: XXXX +OS Version: XXXX +Report Version: 7 + +leaks Report Version: 2.0 +Process XXXX 0 leaks for 0 total leaked bytes. diff --git a/Plugins/InterfaceNamer/Info.plist b/Plugins/InterfaceNamer/Info.plist index 243a5ab..dfaf270 100644 --- a/Plugins/InterfaceNamer/Info.plist +++ b/Plugins/InterfaceNamer/Info.plist @@ -17,10 +17,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 diff --git a/Plugins/InterfaceNamer/ifnamer.c b/Plugins/InterfaceNamer/ifnamer.c index 4ba2a56..faa4a06 100644 --- a/Plugins/InterfaceNamer/ifnamer.c +++ b/Plugins/InterfaceNamer/ifnamer.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001-2013 Apple Inc. All rights reserved. + * Copyright (c) 2001-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -266,14 +266,14 @@ if_unit_compare(const void *val1, const void *val2, void *context) static void reportIssue(const char *signature, CFStringRef issue) { - aslmsg m; + asl_object_t m; m = asl_new(ASL_TYPE_MSG); asl_set(m, "com.apple.message.domain", "com.apple.SystemConfiguration." MY_PLUGIN_NAME); asl_set(m, "com.apple.message.signature", signature); asl_set(m, "com.apple.message.result", "failure"); SCLOG(NULL, m, ~ASL_LEVEL_ERR, CFSTR("%s\n%@"), signature, issue); - asl_free(m); + asl_release(m); return; } @@ -304,7 +304,7 @@ writeInterfaceList(CFArrayRef if_list) } old_model = SCPreferencesGetValue(prefs, MODEL); - new_model = _SC_hw_model(); + new_model = _SC_hw_model(FALSE); if ((new_model != NULL) && !_SC_CFEqual(old_model, new_model)) { // if new hardware if ((old_model != NULL) && (cur_list != NULL)) { @@ -385,7 +385,7 @@ readInterfaceList() if (old_model != NULL) { CFStringRef new_model; - new_model = _SC_hw_model(); + new_model = _SC_hw_model(FALSE); if (!_SC_CFEqual(old_model, new_model)) { // if interface list was created on other hardware if_list = NULL; @@ -589,14 +589,17 @@ updateVirtualNetworkInterfaceConfiguration(SCPreferencesRef prefs, #if !TARGET_OS_EMBEDDED -#define BT_PAN_NAME "Bluetooth PAN" +#define BT_PAN_NAME "Bluetooth PAN" +#define BT_PAN_MAC BT_PAN_NAME " (MAC)" static void updateBTPANInformation(const void *value, void *context) -{ CFDictionaryRef dict = (CFDictionaryRef)value; - CFStringRef if_name; - CFDictionaryRef info; - CFStringRef name; +{ + CFDataRef addr; + CFDictionaryRef dict = (CFDictionaryRef)value; + CFStringRef if_name; + CFDictionaryRef info; + CFStringRef name; if_name = CFDictionaryGetValue(dict, CFSTR(kIOBSDNameKey)); if (!isA_CFString(if_name)) { @@ -617,6 +620,12 @@ updateBTPANInformation(const void *value, void *context) } CFDictionaryAddValue(S_state, CFSTR("_" BT_PAN_NAME "_"), if_name); + + addr = CFDictionaryGetValue(dict, CFSTR(kIOMACAddress)); + if (isA_CFData(addr)) { + CFDictionaryAddValue(S_state, CFSTR("_" BT_PAN_MAC "_"), addr); + } + return; } #endif // !TARGET_OS_EMBEDDED @@ -1750,7 +1759,7 @@ updateNetworkConfiguration(CFArrayRef if_list) SCPreferencesRef prefs = NULL; SCNetworkSetRef set = NULL; - prefs = SCPreferencesCreate(NULL, CFSTR("SCMonitor"), NULL); + prefs = SCPreferencesCreate(NULL, CFSTR("InterfaceNamer:updateNetworkConfiguration"), NULL); set = SCNetworkSetCopyCurrent(prefs); if (set == NULL) { @@ -1765,7 +1774,7 @@ updateNetworkConfiguration(CFArrayRef if_list) interface = CFArrayGetValueAtIndex(if_list, i); if (SCNetworkSetEstablishDefaultInterfaceConfiguration(set, interface)) { SCLog(TRUE, LOG_INFO, - CFSTR(MY_PLUGIN_NAME ": adding default configuration for %s"), + CFSTR(MY_PLUGIN_NAME ": adding default configuration for %@"), SCNetworkInterfaceGetBSDName(interface)); do_commit = TRUE; } diff --git a/Plugins/KernelEventMonitor/Info.plist b/Plugins/KernelEventMonitor/Info.plist index 1e48680..327a47a 100644 --- a/Plugins/KernelEventMonitor/Info.plist +++ b/Plugins/KernelEventMonitor/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 Requires com.apple.SystemConfiguration.InterfaceNamer diff --git a/Plugins/KernelEventMonitor/ev_dlil.c b/Plugins/KernelEventMonitor/ev_dlil.c index 364fd6d..03b6834 100644 --- a/Plugins/KernelEventMonitor/ev_dlil.c +++ b/Plugins/KernelEventMonitor/ev_dlil.c @@ -31,6 +31,7 @@ #include "eventmon.h" #include "cache.h" #include "ev_dlil.h" +#include "ev_extra.h" #ifndef kSCEntNetIdleRoute #define kSCEntNetIdleRoute CFSTR("IdleRoute") @@ -76,8 +77,9 @@ copy_entity(CFStringRef key) static void -interface_update_status(const char *if_name, CFBooleanRef active, - boolean_t attach) +interface_update_status(const char *if_name, + CFBooleanRef active, boolean_t attach, + CFBooleanRef expensive) { CFStringRef key = NULL; CFMutableDictionaryRef newDict = NULL; @@ -85,16 +87,23 @@ interface_update_status(const char *if_name, CFBooleanRef active, key = create_interface_key(if_name); newDict = copy_entity(key); /* if new status available, update cache */ - if (active == NULL) { - CFDictionaryRemoveValue(newDict, kSCPropNetLinkActive); + if (active != NULL) { + CFDictionarySetValue(newDict, kSCPropNetLinkActive, active); } else { - CFDictionarySetValue(newDict, kSCPropNetLinkActive, active); + CFDictionaryRemoveValue(newDict, kSCPropNetLinkActive); } + if (attach == TRUE) { /* the interface was attached, remove stale state */ CFDictionaryRemoveValue(newDict, kSCPropNetLinkDetaching); } + if ((expensive != NULL) && CFBooleanGetValue(expensive)) { + CFDictionarySetValue(newDict, kSCPropNetLinkExpensive, expensive); + } else { + CFDictionaryRemoveValue(newDict, kSCPropNetLinkExpensive); + } + /* update status */ if (CFDictionaryGetCount(newDict) > 0) { cache_SCDynamicStoreSetValue(store, key, newDict); @@ -296,31 +305,34 @@ __private_extern__ void link_update_status(const char *if_name, boolean_t attach) { - CFBooleanRef active = NULL; + CFBooleanRef active = NULL; + CFBooleanRef expensive; struct ifmediareq ifm; int sock; sock = dgram_socket(AF_INET); if (sock == -1) { SCLog(TRUE, LOG_NOTICE, CFSTR("link_update_status: socket open failed, %s"), strerror(errno)); - goto done; + return; } + + /* get "Link" */ bzero((char *)&ifm, sizeof(ifm)); (void) strncpy(ifm.ifm_name, if_name, sizeof(ifm.ifm_name)); if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) { /* if media status not available for this interface */ - goto done; + goto update; } if (ifm.ifm_count == 0) { /* no media types */ - goto done; + goto update; } if (!(ifm.ifm_status & IFM_AVALID)) { /* if active bit not valid */ - goto done; + goto update; } if (ifm.ifm_status & IFM_ACTIVE) { @@ -329,10 +341,14 @@ link_update_status(const char *if_name, boolean_t attach) active = kCFBooleanFalse; } - done: - interface_update_status(if_name, active, attach); - if (sock != -1) - close(sock); + update: + + /* get "Expensive" */ + expensive = interface_update_expensive(if_name); + + /* update status */ + interface_update_status(if_name, active, attach, expensive); + close(sock); return; } @@ -389,7 +405,6 @@ link_add(const char *if_name) CFRelease(interface); if (newDict) CFRelease(newDict); if (newIFList) CFRelease(newIFList); - return; } @@ -443,7 +458,6 @@ link_remove(const char *if_name) CFRelease(interface); if (newDict) CFRelease(newDict); if (newIFList) CFRelease(newIFList); - return; } diff --git a/Plugins/KernelEventMonitor/ev_extra.h b/Plugins/KernelEventMonitor/ev_extra.h new file mode 100644 index 0000000..7f59b45 --- /dev/null +++ b/Plugins/KernelEventMonitor/ev_extra.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * Modification History + * + * October 7, 2013 Allan Nathanson + * - initial revision + */ + + +#ifndef _EV_EXTRA_H +#define _EV_EXTRA_H + +#include + +__BEGIN_DECLS + +CFBooleanRef interface_update_expensive (const char *if_name); + +__END_DECLS + +#endif /* _EV_EXTRA_H */ + diff --git a/Plugins/KernelEventMonitor/ev_extra.m b/Plugins/KernelEventMonitor/ev_extra.m new file mode 100644 index 0000000..9b83799 --- /dev/null +++ b/Plugins/KernelEventMonitor/ev_extra.m @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2013, 2014 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * Modification History + * + * October 7, 2013 Allan Nathanson + * - initial revision + */ + + +#include +#include +#include + +#include "eventmon.h" +#include "ev_extra.h" + + +static CFBooleanRef +is_expensive(SCNetworkInterfaceRef interface) +{ + CFBooleanRef expensive = NULL; + CFStringRef interfaceType; + + while (interface != NULL) { + SCNetworkInterfaceRef child; + + child = SCNetworkInterfaceGetInterface(interface); + if (child == NULL) { + break; + } + + interface = child; + } + + // assume NOT expensive + expensive = kCFBooleanFalse; + + interfaceType = SCNetworkInterfaceGetInterfaceType(interface); + if (_SCNetworkInterfaceIsTethered(interface)) { + // if tethered (to iOS) interface + expensive = kCFBooleanTrue; + } else if (_SCNetworkInterfaceIsBluetoothPAN(interface)) { + // if BT-PAN interface + expensive = kCFBooleanTrue; + } else if (CFEqual(interfaceType, kSCNetworkInterfaceTypeWWAN)) { + // if WWAN [Ethernet] interface + expensive = kCFBooleanTrue; + } + + return expensive; +} + + +static int +ifexpensive_set(int s, const char * name, uint32_t expensive) +{ +#if defined(SIOCSIFEXPENSIVE) && !defined(MAIN) + struct ifreq ifr; + + bzero(&ifr, sizeof(ifr)); + strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + ifr.ifr_expensive = expensive; + return (ioctl(s, SIOCSIFEXPENSIVE, &ifr)); +#else // defined(SIOCSIFEXPENSIVE) && !defined(MAIN) + return 0; +#endif // defined(SIOCSIFEXPENSIVE) && !defined(MAIN) +} + + +__private_extern__ +CFBooleanRef +interface_update_expensive(const char *if_name) +{ + CFBooleanRef expensive = NULL; + SCNetworkInterfaceRef interface; + CFStringRef interface_name; + int s; + + interface_name = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); + interface = _SCNetworkInterfaceCreateWithBSDName(NULL, interface_name, kIncludeNoVirtualInterfaces); + CFRelease(interface_name); + + if (interface != NULL) { + expensive = is_expensive(interface); + CFRelease(interface); + } + + // mark ... or clear ... the [if_name] interface as "expensive" + s = dgram_socket(AF_INET); + if (s != -1) { + ifexpensive_set(s, + if_name, + ((expensive != NULL) && CFBooleanGetValue(expensive)) ? 1 : 0); + close(s); + } + + return expensive; +} + + +#ifdef MAIN + +int +dgram_socket(int domain) +{ + return (socket(domain, SOCK_DGRAM, 0)); +} + +int +main(int argc, char **argv) +{ + CFBooleanRef expensive; + + if (argc < 1 + 1) { + SCPrint(TRUE, stderr, CFSTR("usage: %s \n"), argv[0]); + exit(1); + } + + expensive = interface_update_expensive(argv[1]); + if (expensive != NULL) { + SCPrint(TRUE, stdout, CFSTR("interface \"%s\": %@\n"), argv[1], expensive); + } else { + SCPrint(TRUE, stdout, CFSTR("interface \"%s\": could not determine \"expensive\" status\n"), argv[1]); + } + + exit(0); +} +#endif // MAIN diff --git a/Plugins/KernelEventMonitor/ev_ipv4.c b/Plugins/KernelEventMonitor/ev_ipv4.c index 14e2979..bb5d6f1 100644 --- a/Plugins/KernelEventMonitor/ev_ipv4.c +++ b/Plugins/KernelEventMonitor/ev_ipv4.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2005, 2007, 2008, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2002-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -129,7 +129,7 @@ updateStore(const void *key, const void *value, void *context) __private_extern__ void -interface_update_ipv4(struct ifaddrs *ifap, const char *if_name) +ipv4_interface_update(struct ifaddrs *ifap, const char *if_name) { struct ifaddrs *ifa; struct ifaddrs *ifap_temp = NULL; @@ -239,7 +239,7 @@ interface_update_ipv4(struct ifaddrs *ifap, const char *if_name) __private_extern__ void -interface_collision_ipv4(const char *if_name, struct in_addr ip_addr, int hw_len, const void * hw_addr) +ipv4_arp_collision(const char *if_name, struct in_addr ip_addr, int hw_len, const void * hw_addr) { uint8_t * hw_addr_bytes = (uint8_t *)hw_addr; int i; @@ -270,7 +270,7 @@ interface_collision_ipv4(const char *if_name, struct in_addr ip_addr, int hw_len #if !TARGET_OS_IPHONE __private_extern__ void -port_in_use_ipv4(uint16_t port, pid_t req_pid) +ipv4_port_in_use(uint16_t port, pid_t req_pid) { CFStringRef key; @@ -286,3 +286,35 @@ port_in_use_ipv4(uint16_t port, pid_t req_pid) return; } #endif /* !TARGET_OS_IPHONE */ + +static void +interface_notify_entity(const char * if_name, CFStringRef entity) +{ + CFStringRef if_name_cf; + CFStringRef key; + + if_name_cf = CFStringCreateWithCString(NULL, if_name, + kCFStringEncodingASCII); + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + if_name_cf, + entity); + CFRelease(if_name_cf); + cache_SCDynamicStoreNotifyValue(store, key); + CFRelease(key); + return; +} + +__private_extern__ void +ipv4_router_arp_failure(const char * if_name) +{ + interface_notify_entity(if_name, kSCEntNetIPv4RouterARPFailure); + return; +} + +__private_extern__ void +ipv4_router_arp_alive(const char * if_name) +{ + interface_notify_entity(if_name, kSCEntNetIPv4RouterARPAlive); + return; +} diff --git a/Plugins/KernelEventMonitor/ev_ipv4.h b/Plugins/KernelEventMonitor/ev_ipv4.h index 241d41f..502a095 100644 --- a/Plugins/KernelEventMonitor/ev_ipv4.h +++ b/Plugins/KernelEventMonitor/ev_ipv4.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2005, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2002-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -37,16 +37,19 @@ __BEGIN_DECLS -void interface_update_ipv4 (struct ifaddrs *ifap, const char *if_name); +void ipv4_interface_update(struct ifaddrs *ifap, const char *if_name); -void interface_collision_ipv4(const char *if_name, - struct in_addr ip_addr, - int hw_len, const void * hw_addr); +void ipv4_arp_collision(const char *if_name, + struct in_addr ip_addr, + int hw_len, const void * hw_addr); #if !TARGET_OS_IPHONE -void port_in_use_ipv4 (uint16_t port, pid_t req_pid); +void ipv4_port_in_use(uint16_t port, pid_t req_pid); #endif /* !TARGET_OS_IPHONE */ +void ipv4_router_arp_failure(const char * if_name); +void ipv4_router_arp_alive(const char * if_name); + __END_DECLS #endif /* _EV_IPV4_H */ diff --git a/Plugins/KernelEventMonitor/ev_ipv6.c b/Plugins/KernelEventMonitor/ev_ipv6.c index f30d3a7..08114b2 100644 --- a/Plugins/KernelEventMonitor/ev_ipv6.c +++ b/Plugins/KernelEventMonitor/ev_ipv6.c @@ -331,7 +331,10 @@ interface_update_ipv6(struct ifaddrs *ifap, const char *if_name) ifr6.ifr_addr = *sin6; if (ioctl(sock, SIOCGIFAFLAG_IN6, &ifr6) == -1) { /* if flags not available for this address */ - SCLog(TRUE, LOG_NOTICE, CFSTR("interface_update_ipv6: ioctl failed, %s"), strerror(errno)); + SCLog(TRUE, + (errno != EADDRNOTAVAIL) ? LOG_NOTICE : LOG_DEBUG, + CFSTR("interface_update_ipv6: ioctl failed, %s"), + strerror(errno)); } appendAddress (newDict, kSCPropNetIPv6Addresses, sin6); diff --git a/Plugins/KernelEventMonitor/eventmon.c b/Plugins/KernelEventMonitor/eventmon.c index 231b763..8249a91 100644 --- a/Plugins/KernelEventMonitor/eventmon.c +++ b/Plugins/KernelEventMonitor/eventmon.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2010-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -115,6 +115,9 @@ static const char *dlEventName[] = { #ifdef KEV_DL_ISSUES "KEV_DL_ISSUES", #endif +#ifdef KEV_DL_IFDELEGATE_CHANGED + "KEV_DL_IFDELEGATE_CHANGED", +#endif }; static const char *inet6EventName[] = { @@ -134,6 +137,8 @@ static const char *nd6EventNameString[] = { }; #endif // KEV_ND6_SUBCLASS +static dispatch_queue_t S_kev_queue; +static dispatch_source_t S_kev_source; __private_extern__ Boolean network_changed = FALSE; __private_extern__ SCDynamicStoreRef store = NULL; __private_extern__ Boolean _verbose = FALSE; @@ -205,7 +210,7 @@ post_network_changed(void) status = notify_post(_SC_NOTIFY_NETWORK_CHANGE); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_post() failed: error=%ld"), status); + SCLog(TRUE, LOG_ERR, CFSTR("notify_post() failed: error=%u"), status); } network_changed = FALSE; @@ -234,7 +239,7 @@ logEvent(CFStringRef evStr, struct kern_event_msg *ev_msg) ev_msg->kev_subclass, ev_msg->event_code); for (i = 0, j = KEV_MSG_HEADER_SIZE; j < ev_msg->total_size; i++, j+=4) { - SCLog(TRUE, LOG_DEBUG, CFSTR(" Event data[%2d] = %08lx"), i, ev_msg->event_data[i]); + SCLog(TRUE, LOG_DEBUG, CFSTR(" Event data[%2d] = %08x"), i, ev_msg->event_data[i]); } } @@ -266,7 +271,7 @@ dlEventNameString(uint32_t event_code) } static void -copy_if_name(struct net_event_data * ev, char * ifr_name, int ifr_len) +copy_if_name(const struct net_event_data * ev, char * ifr_name, int ifr_len) { snprintf(ifr_name, ifr_len, "%s%d", ev->if_name, ev->if_unit); return; @@ -301,7 +306,7 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); - interface_update_ipv4(NULL, ifr_name); + ipv4_interface_update(NULL, ifr_name); break; } case KEV_INET_ARPCOLLISION : { @@ -314,10 +319,10 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) break; } copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); - interface_collision_ipv4(ifr_name, - ev->ia_ipaddr, - ev->hw_len, - ev->hw_addr); + ipv4_arp_collision(ifr_name, + ev->ia_ipaddr, + ev->hw_len, + ev->hw_addr); break; } #if !TARGET_OS_IPHONE @@ -328,10 +333,34 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) handled = FALSE; break; } - port_in_use_ipv4(ev->port, ev->req_pid); + ipv4_port_in_use(ev->port, ev->req_pid); break; } #endif /* !TARGET_OS_IPHONE */ + case KEV_INET_ARPRTRFAILURE: { + const struct kev_in_arpfailure * ev; + + ev = (const struct kev_in_arpfailure *)event_data; + if (dataLen < sizeof(*ev)) { + handled = FALSE; + break; + } + copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + ipv4_router_arp_failure(ifr_name); + break; + } + case KEV_INET_ARPRTRALIVE: { + const struct kev_in_arpalive * ev; + + ev = (const struct kev_in_arpalive *)event_data; + if (dataLen < sizeof(*ev)) { + handled = FALSE; + break; + } + copy_if_name(&ev->link_data, ifr_name, sizeof(ifr_name)); + ipv4_router_arp_alive(ifr_name); + break; + } default : handled = FALSE; break; @@ -546,22 +575,21 @@ processEvent_Apple_Network(struct kern_event_msg *ev_msg) return; } -static void -eventCallback(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) +static Boolean +eventCallback(int so) { - int so = CFSocketGetNative(s); - int status; + ssize_t status; union { char bytes[1024]; struct kern_event_msg ev_msg1; // first kernel event } buf; struct kern_event_msg *ev_msg = &buf.ev_msg1; - int offset = 0; + ssize_t offset = 0; status = recv(so, &buf, sizeof(buf), 0); if (status == -1) { SCLog(TRUE, LOG_ERR, CFSTR("recv() failed: %s"), strerror(errno)); - goto error; + return FALSE; } cache_open(); @@ -603,19 +631,12 @@ eventCallback(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const cache_close(); post_network_changed(); - return; - - error : - - SCLog(TRUE, LOG_ERR, CFSTR("kernel event monitor disabled.")); - CFSocketInvalidate(s); - return; - + return TRUE; } -__private_extern__ -void -prime_KernelEventMonitor() + +static void +prime(void) { struct ifaddrs *ifap = NULL; struct ifaddrs *scan; @@ -653,7 +674,7 @@ prime_KernelEventMonitor() * update IPv4 network addresses already assigned to * the interfaces. */ - interface_update_ipv4(ifap, NULL); + ipv4_interface_update(ifap, NULL); /* * update IPv6 network addresses already assigned to @@ -673,28 +694,26 @@ prime_KernelEventMonitor() network_changed = TRUE; post_network_changed(); + /* start handling kernel events */ + dispatch_resume(S_kev_source); + return; } -static CFStringRef -kevSocketCopyDescription(const void *info) + +__private_extern__ +void +prime_KernelEventMonitor() { - return CFStringCreateWithFormat(NULL, NULL, CFSTR("")); + dispatch_async(S_kev_queue, ^{ prime(); }); + return; } __private_extern__ void load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) { - CFSocketContext context = { 0 - , (void *)1 - , NULL - , NULL - , kevSocketCopyDescription - }; - CFSocketRef es; struct kev_request kev_req; - CFRunLoopSourceRef rls; int so; int status; @@ -750,18 +769,23 @@ load_KernelEventMonitor(CFBundleRef bundle, Boolean bundleVerbose) return; } - /* Create a CFSocketRef for the PF_SYSTEM kernel event socket */ - es = CFSocketCreateWithNative(NULL, - so, - kCFSocketReadCallBack, - eventCallback, - &context); + S_kev_queue = dispatch_queue_create("com.apple.SystemConfiguration.KernelEventMonitor", NULL); + S_kev_source + = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, so, 0, S_kev_queue); + dispatch_source_set_cancel_handler(S_kev_source, ^{ + close(so); + }); + dispatch_source_set_event_handler(S_kev_source, ^{ + Boolean ok; + + ok = eventCallback(so); + if (!ok) { + SCLog(TRUE, LOG_ERR, CFSTR("kernel event monitor disabled.")); + dispatch_source_cancel(S_kev_source); + } - /* Create and add a run loop source for the event socket */ - rls = CFSocketCreateRunLoopSource(NULL, es, 0); - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode); - CFRelease(rls); - CFRelease(es); + }); + // NOTE: dispatch_resume() will be called in prime() return; } @@ -794,7 +818,7 @@ main(int argc, char **argv) load_KernelEventMonitor(CFBundleGetMainBundle(), (argc > 1) ? TRUE : FALSE); prime_KernelEventMonitor(); - CFRunLoopRun(); + dispatch_main(); /* not reached */ exit(0); return 0; diff --git a/Plugins/LinkConfiguration/Info.plist b/Plugins/LinkConfiguration/Info.plist index 92fd2d8..63de67e 100644 --- a/Plugins/LinkConfiguration/Info.plist +++ b/Plugins/LinkConfiguration/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 Requires com.apple.SystemConfiguration.InterfaceNamer diff --git a/Plugins/Logger/Info-Embedded.plist b/Plugins/Logger/Info-Embedded.plist index 6655898..82171ed 100644 --- a/Plugins/Logger/Info-Embedded.plist +++ b/Plugins/Logger/Info-Embedded.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 Enabled Verbose diff --git a/Plugins/Logger/Info.plist b/Plugins/Logger/Info.plist index adde38f..7393541 100644 --- a/Plugins/Logger/Info.plist +++ b/Plugins/Logger/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 Enabled Verbose diff --git a/Plugins/Logger/logger.c b/Plugins/Logger/logger.c index ff5ea31..ebd68a0 100644 --- a/Plugins/Logger/logger.c +++ b/Plugins/Logger/logger.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2013 Apple Inc. All rights reserved. + * Copyright (c) 2005-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -61,10 +61,10 @@ #include #include #include -#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !TARGET_OS_EMBEDDED +#ifndef TARGET_OS_EMBEDDED #include #include -#endif // !(__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !TARGET_OS_EMBEDDED +#endif // !TARGET_OS_EMBEDDED /* generic MessageTracer keys */ @@ -78,7 +78,7 @@ #define MY_MSGTRACER_DOMAIN "com.apple.network.log" -static aslmsg log_msg = NULL; +static asl_object_t log_msg = NULL; static io_connect_t power = MACH_PORT_NULL; static Boolean verbose = FALSE; @@ -212,13 +212,13 @@ static void KernelEvent_notification(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { int so = CFSocketGetNative(s); - int status; + size_t status; union { char bytes[1024]; struct kern_event_msg ev_msg1; // first kernel event } buf; struct kern_event_msg *ev_msg = &buf.ev_msg1; - int offset = 0; + size_t offset = 0; status = recv(so, &buf, sizeof(buf), 0); if (status == -1) { @@ -1627,7 +1627,7 @@ add_smbconf_notification() #pragma mark pututxline Events -#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !TARGET_OS_EMBEDDED +#ifndef TARGET_OS_EMBEDDED static const char * ut_time(struct utmpx *utmpx) { @@ -1772,7 +1772,7 @@ pututxline_notification(CFMachPortRef port, void *msg, CFIndex size, void *info) entry_line != NULL ? entry_line : "" // <= 32 chars ); - n = strlen(line) - 1; + n = (int)strlen(line) - 1; while ((n > 0) && (line[n] == ' ')) { line[n] = '\0'; --n; @@ -1823,7 +1823,7 @@ add_pututxline_notification() CFRelease(mp); return; } -#endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !TARGET_OS_EMBEDDED +#endif // !TARGET_OS_EMBEDDED #pragma mark - @@ -1984,11 +1984,11 @@ load(CFBundleRef bundle, Boolean bundleVerbose) } #endif // !TARGET_OS_EMBEDDED -#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !TARGET_OS_EMBEDDED +#ifndef TARGET_OS_EMBEDDED if (log_all || bValFromDictionary(config, CFSTR("LOG_NOTIFY_UTMPX_CHANGE"))) { add_pututxline_notification(); } -#endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) && !TARGET_OS_EMBEDDED +#endif // !TARGET_OS_EMBEDDED #if !TARGET_OS_EMBEDDED if (log_all || bValFromDictionary(config, CFSTR("LOG_SC_BTMM_CONFIGURATION"))) { diff --git a/Plugins/PreferencesMonitor/Info.plist b/Plugins/PreferencesMonitor/Info.plist index 3670a68..04bfd35 100644 --- a/Plugins/PreferencesMonitor/Info.plist +++ b/Plugins/PreferencesMonitor/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 Builtin Requires diff --git a/Plugins/PreferencesMonitor/prefsmon.c b/Plugins/PreferencesMonitor/prefsmon.c index d11aa6d..22ace87 100644 --- a/Plugins/PreferencesMonitor/prefsmon.c +++ b/Plugins/PreferencesMonitor/prefsmon.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2008, 2010, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010, 2012-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -97,7 +97,7 @@ establishNewPreferences() } /* Ensure that the preferences has the new model */ - new_model = _SC_hw_model(); + new_model = _SC_hw_model(FALSE); /* Need to regenerate the new configuration for new model */ if (new_model != NULL) { @@ -116,7 +116,6 @@ establishNewPreferences() CFStringRef existing_key; existing_key = CFArrayGetValueAtIndex(keys, index); - if (isA_CFString(existing_key) != NULL) { CFStringRef new_key; CFPropertyListRef value; @@ -135,9 +134,8 @@ establishNewPreferences() new_key = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@:%@"), old_model, existing_key); SCPreferencesSetValue(prefs, new_key, value); - - /* Let's preserve existing host names */ if (!CFEqual(existing_key, kSCPrefSystem)) { + /* preserve existing host names */ SCPreferencesRemoveValue(prefs, existing_key); } CFRelease(new_key); @@ -739,7 +737,7 @@ load_PreferencesMonitor(CFBundleRef bundle, Boolean bundleVerbose) Boolean need_update = FALSE; CFStringRef new_model; - new_model = _SC_hw_model(); + new_model = _SC_hw_model(FALSE); /* Need to regenerate the new configuration for new model */ if (new_model != NULL) { diff --git a/Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist b/Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist new file mode 100644 index 0000000..e9cc0aa --- /dev/null +++ b/Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist @@ -0,0 +1,31 @@ + + + + + Builtin + + CFBundleDevelopmentRegion + English + CFBundleExecutable + SCNetworkReachability + CFBundleIdentifier + com.apple.SystemConfiguration.SCNetworkReachability + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + com.apple.SystemConfiguration.SCNetworkReachability + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.13 + CFBundleSignature + ???? + CFBundleVersion + 1.13 + MachServices + + com.apple.SystemConfiguration.SCNetworkReachability_sim + + + + diff --git a/Plugins/SCNetworkReachability/Info.plist b/Plugins/SCNetworkReachability/Info.plist index 26d3a95..d42e66a 100644 --- a/Plugins/SCNetworkReachability/Info.plist +++ b/Plugins/SCNetworkReachability/Info.plist @@ -17,10 +17,15 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 + MachServices + + com.apple.SystemConfiguration.SCNetworkReachability + + diff --git a/Plugins/SimulatorSupport/Info.plist b/Plugins/SimulatorSupport/Info.plist index 9d70b6b..4ae6f27 100644 --- a/Plugins/SimulatorSupport/Info.plist +++ b/Plugins/SimulatorSupport/Info.plist @@ -17,10 +17,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 diff --git a/SCMonitor/Info.plist b/SCMonitor/Info.plist index 4761e78..4496add 100644 --- a/SCMonitor/Info.plist +++ b/SCMonitor/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 CFPlugInDynamicRegistration NO CFPlugInFactories diff --git a/SCMonitor/monitor.c b/SCMonitor/monitor.c index 7f34e34..b4775b7 100644 --- a/SCMonitor/monitor.c +++ b/SCMonitor/monitor.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2007-2012 Apple Inc. All rights reserved. + * Copyright (c) 2007-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -78,7 +78,7 @@ typedef struct { Boolean debug; - aslmsg log_msg; + asl_object_t log_msg; CFStringRef configuration_action; @@ -124,7 +124,7 @@ getAuthorization(MyType *myInstance) if (status != errAuthorizationSuccess) { SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("AuthorizationCreate() failed: status = %d"), - status); + (int)status); } } @@ -203,7 +203,7 @@ open_NetworkPrefPane(MyType *myInstance) strlen(NETWORK_PREF_CMD), &aeDesc); if (status != noErr) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: AECreateDesc() failed: %d"), status); + SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: AECreateDesc() failed: %d"), (int)status); } prefSpec.appURL = NULL; @@ -214,7 +214,7 @@ open_NetworkPrefPane(MyType *myInstance) status = LSOpenFromURLSpec(&prefSpec, NULL); if (status != noErr) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: LSOpenFromURLSpec() failed: %d"), status); + SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: LSOpenFromURLSpec() failed: %d"), (int)status); } CFRelease(prefArray); @@ -250,7 +250,7 @@ notify_remove(MyType *myInstance, Boolean cancel) if (status != 0) { SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: CFUserNotificationCancel() failed, status=%d"), - status); + (int)status); } } CFRelease(myInstance->userNotification); @@ -418,7 +418,7 @@ notify_add(MyType *myInstance) &error, dict); if (myInstance->userNotification == NULL) { - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: CFUserNotificationCreate() failed, %d"), error); + SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_ERR, CFSTR("SCMonitor: CFUserNotificationCreate() failed, %d"), (int)error); goto done; } @@ -490,7 +490,7 @@ notify_configure(MyType *myInstance) CFStringRef name; name = SCNetworkInterfaceGetLocalizedDisplayName(interface); - SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_NOTICE, CFSTR("add service for %@"), name); + SCLOG(NULL, myInstance->log_msg, ASL_LEVEL_NOTICE, CFSTR("add/update service for %@"), name); } } @@ -532,6 +532,10 @@ notify_configure(MyType *myInstance) #pragma mark - +// configure ONLY IF authorized +#define kSCNetworkInterfaceConfigurationActionValueConfigureAuthorized CFSTR("Configure-Authorized") + + static void updateInterfaceList(MyType *myInstance) { @@ -567,11 +571,6 @@ updateInterfaceList(MyType *myInstance) interface = CFArrayGetValueAtIndex(interfaces, i); - if (_SCNetworkInterfaceIsBuiltin(interface)) { - // skip built-in interfaces - continue; - } - // track new vs. old (removed) interfaces CFSetRemoveValue(interfaces_old, interface); if (CFSetContainsValue(myInstance->interfaces_known, interface)) { @@ -595,7 +594,12 @@ updateInterfaceList(MyType *myInstance) if ((action == NULL) || (!CFEqual(action, kSCNetworkInterfaceConfigurationActionValueNone) && !CFEqual(action, kSCNetworkInterfaceConfigurationActionValueConfigure))) { - action = kSCNetworkInterfaceConfigurationActionValuePrompt; + if (_SCNetworkInterfaceIsBuiltin(interface)) { + // if built-in interface + action = kSCNetworkInterfaceConfigurationActionValueConfigureAuthorized; + } else { + action = kSCNetworkInterfaceConfigurationActionValuePrompt; + } } if (CFEqual(action, kSCNetworkInterfaceConfigurationActionValueNone)) { @@ -607,13 +611,13 @@ updateInterfaceList(MyType *myInstance) } CFArrayAppendValue(myInstance->interfaces_configure, interface); } else if (hasAuthorization(myInstance)) { - // if we already have the "admin" (kSCPreferencesWriteAuthorizationRight) + // if we already have the "admin" (kSCPreferencesAuthorizationRight_write) // right, configure automatically (without user intervention) if (myInstance->interfaces_configure == NULL) { myInstance->interfaces_configure = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } CFArrayAppendValue(myInstance->interfaces_configure, interface); - } else { + } else if (!CFEqual(action, kSCNetworkInterfaceConfigurationActionValueConfigureAuthorized)) { // notify user if (myInstance->interfaces_prompt == NULL) { myInstance->interfaces_prompt = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); @@ -1192,7 +1196,7 @@ watcher_remove(MyType *myInstance) myInstance->interfaces_known = NULL; } - asl_free(myInstance->log_msg); + asl_release(myInstance->log_msg); myInstance->log_msg = NULL; return; } diff --git a/SystemConfiguration.fproj/BondConfiguration.c b/SystemConfiguration.fproj/BondConfiguration.c index d3c5960..cb24ada 100644 --- a/SystemConfiguration.fproj/BondConfiguration.c +++ b/SystemConfiguration.fproj/BondConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -37,6 +37,7 @@ #include #include "SCNetworkConfigurationInternal.h" +#include "SCPreferencesInternal.h" #include #include @@ -138,30 +139,35 @@ if_bond_status_req_copy(int s, const char * ifname) static void -add_interface(CFMutableArrayRef *interfaces, CFStringRef if_name) +add_interface(CFMutableArrayRef *interfaces, CFStringRef if_name, SCPreferencesRef ni_prefs) { - SCNetworkInterfaceRef interface; + SCNetworkInterfaceRef interface = NULL; if (*interfaces == NULL) { *interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } - - interface = _SCNetworkInterfaceCreateWithBSDName(NULL, if_name, - kIncludeNoVirtualInterfaces); - CFArrayAppendValue(*interfaces, interface); - CFRelease(interface); + if (ni_prefs != NULL) { + interface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, if_name); + } + if (interface == NULL) { + interface = _SCNetworkInterfaceCreateWithBSDName(NULL, if_name, + kIncludeNoVirtualInterfaces); + } + + if (interface != NULL) { + CFArrayAppendValue(*interfaces, interface); + CFRelease(interface); + } } -static Boolean -_SCBondInterfaceSetMemberInterfaces(SCBondInterfaceRef bond, CFArrayRef members); - static Boolean _SCBondInterfaceSetMode(SCBondInterfaceRef bond, CFNumberRef mode); typedef struct { CFMutableArrayRef bonds; + SCPreferencesRef ni_prefs; SCPreferencesRef prefs; } addContext, *addContextRef; @@ -193,11 +199,11 @@ add_configured_interface(const void *key, const void *value, void *context) member = CFArrayGetValueAtIndex(interfaces, i); if (isA_CFString(member)) { - add_interface(&members, member); + add_interface(&members, member, myContext->ni_prefs); } } if (members != NULL) { - _SCBondInterfaceSetMemberInterfaces(bond, members); + __SCBondInterfaceSetMemberInterfaces(bond, members); CFRelease(members); } @@ -254,11 +260,21 @@ SCBondInterfaceCopyAll(SCPreferencesRef prefs) { addContext context; CFDictionaryRef dict; + SCPreferencesRef ni_prefs; CFStringRef path; - + + if ((prefs == NULL) || + (__SCPreferencesUsingDefaultPrefs(prefs) == TRUE)) { + ni_prefs = NULL; + } + else { + ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs); + } + context.bonds = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); context.prefs = prefs; - + context.ni_prefs = ni_prefs; + path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/%@/%@"), @@ -270,6 +286,9 @@ SCBondInterfaceCopyAll(SCPreferencesRef prefs) my_CFDictionaryApplyFunction(dict, add_configured_interface, &context); } + if (ni_prefs != NULL) { + CFRelease(ni_prefs); + } return context.bonds; } @@ -460,14 +479,14 @@ _SCBondInterfaceCopyActive(void) CFStringRef member; member = CFStringCreateWithCString(NULL, ibs_p[i].ibs_if_name, kCFStringEncodingASCII); - add_interface(&members, member); + add_interface(&members, member, NULL); CFRelease(member); } } free(ibsr_p); if (members != NULL) { - _SCBondInterfaceSetMemberInterfaces(bond, members); + __SCBondInterfaceSetMemberInterfaces(bond, members); CFRelease(members); } @@ -615,8 +634,9 @@ SCBondInterfaceGetOptions(SCBondInterfaceRef bond) } -static Boolean -_SCBondInterfaceSetMemberInterfaces(SCBondInterfaceRef bond, CFArrayRef members) +__private_extern__ +Boolean +__SCBondInterfaceSetMemberInterfaces(SCBondInterfaceRef bond, CFArrayRef members) { CFIndex i; SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)bond; @@ -764,7 +784,7 @@ SCBondInterfaceSetMemberInterfaces(SCBondInterfaceRef bond, CFArrayRef members) return FALSE; } - ok = _SCBondInterfaceSetMemberInterfaces(bond, members); + ok = __SCBondInterfaceSetMemberInterfaces(bond, members); return ok; } @@ -1407,7 +1427,7 @@ __bond_set_mode(int s, CFStringRef bond_if, CFNumberRef mode) if (ioctl(s, SIOCSIFBOND, (caddr_t)&ifr) == -1) { _SCErrorSet(errno); SCLog(TRUE, LOG_ERR, - CFSTR("could not set mode to %d on bond \"%@\": %s"), + CFSTR("could not set mode to %@ on bond \"%@\": %s"), mode, bond_if, strerror(errno)); diff --git a/SystemConfiguration.fproj/BridgeConfiguration.c b/SystemConfiguration.fproj/BridgeConfiguration.c index d291a3c..ee16a69 100644 --- a/SystemConfiguration.fproj/BridgeConfiguration.c +++ b/SystemConfiguration.fproj/BridgeConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013 Apple Inc. All rights reserved. + * Copyright (c) 2009-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,6 +34,7 @@ #include #include "SCNetworkConfigurationInternal.h" +#include "SCPreferencesInternal.h" #include #include @@ -126,27 +127,30 @@ ifbifconf_copy(int s, const char * ifname) static void -add_interface(CFMutableArrayRef *interfaces, CFStringRef if_name) +add_interface(CFMutableArrayRef *interfaces, CFStringRef if_name, SCPreferencesRef ni_prefs) { - SCNetworkInterfaceRef interface; + SCNetworkInterfaceRef interface = NULL; if (*interfaces == NULL) { *interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } - - interface = _SCNetworkInterfaceCreateWithBSDName(NULL, if_name, + if (ni_prefs != NULL) { + interface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, if_name); + } + if (interface == NULL) { + interface = _SCNetworkInterfaceCreateWithBSDName(NULL, if_name, kIncludeNoVirtualInterfaces); - CFArrayAppendValue(*interfaces, interface); - CFRelease(interface); -} - - -static Boolean -_SCBridgeInterfaceSetMemberInterfaces(SCBridgeInterfaceRef bridge, CFArrayRef members); + } + if (interface != NULL) { + CFArrayAppendValue(*interfaces, interface); + CFRelease(interface); + } +} typedef struct { CFMutableArrayRef bridges; + SCPreferencesRef ni_prefs; SCPreferencesRef prefs; } addContext, *addContextRef; @@ -183,11 +187,11 @@ add_configured_interface(const void *key, const void *value, void *context) member = CFArrayGetValueAtIndex(interfaces, i); if (isA_CFString(member)) { - add_interface(&members, member); + add_interface(&members, member, myContext->ni_prefs); } } if (members != NULL) { - _SCBridgeInterfaceSetMemberInterfaces(bridge, members); + __SCBridgeInterfaceSetMemberInterfaces(bridge, members); CFRelease(members); } @@ -242,11 +246,20 @@ SCBridgeInterfaceCopyAll(SCPreferencesRef prefs) { addContext context; CFDictionaryRef dict; + SCPreferencesRef ni_prefs; CFStringRef path; + if ((prefs == NULL) || + (__SCPreferencesUsingDefaultPrefs(prefs) == TRUE)) { + ni_prefs = NULL; + } + else { + ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs); + } context.bridges = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); context.prefs = prefs; - + context.ni_prefs = ni_prefs; + path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/%@/%@"), @@ -257,7 +270,9 @@ SCBridgeInterfaceCopyAll(SCPreferencesRef prefs) my_CFDictionaryApplyFunction(dict, add_configured_interface, &context); } CFRelease(path); - + if (ni_prefs != NULL) { + CFRelease(ni_prefs); + } return context.bridges; } @@ -412,9 +427,8 @@ _SCBridgeInterfaceCopyActive(void) continue; } - // check the interface name ("bridgeNNN") and ensure that - // we leave all non-SC configured bridge interfaces (those - // with unit #'s >= 100) alone. + // make sure that we leave non-SC configured bridge + // interfaces (those with unit #'s >= 100) alone. n = strlen(ifp->ifa_name); if ((n > 3) && isdigit(ifp->ifa_name[n - 1]) && @@ -455,14 +469,14 @@ _SCBridgeInterfaceCopyActive(void) ibr_p = ibc_p->ifbic_req + i; member = CFStringCreateWithCString(NULL, ibr_p->ifbr_ifsname, kCFStringEncodingASCII); - add_interface(&members, member); + add_interface(&members, member, NULL); CFRelease(member); } } free(ibc_p); if (members != NULL) { - _SCBridgeInterfaceSetMemberInterfaces(bridge, members); + __SCBridgeInterfaceSetMemberInterfaces(bridge, members); CFRelease(members); } @@ -611,8 +625,9 @@ SCBridgeInterfaceGetOptions(SCBridgeInterfaceRef bridge) } -static Boolean -_SCBridgeInterfaceSetMemberInterfaces(SCBridgeInterfaceRef bridge, CFArrayRef members) +__private_extern__ +Boolean +__SCBridgeInterfaceSetMemberInterfaces(SCBridgeInterfaceRef bridge, CFArrayRef members) { CFIndex i; SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)bridge; @@ -760,7 +775,7 @@ SCBridgeInterfaceSetMemberInterfaces(SCBridgeInterfaceRef bridge, CFArrayRef mem return FALSE; } - ok = _SCBridgeInterfaceSetMemberInterfaces(bridge, members); + ok = __SCBridgeInterfaceSetMemberInterfaces(bridge, members); return ok; } diff --git a/SystemConfiguration.fproj/DHCP.c b/SystemConfiguration.fproj/DHCP.c index 873046d..aaf1ba0 100644 --- a/SystemConfiguration.fproj/DHCP.c +++ b/SystemConfiguration.fproj/DHCP.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2003-2005, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2001, 2003-2005, 2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -42,9 +42,9 @@ static UInt8 * S_get_char_array(CFArrayRef arr, CFIndex * len) { UInt8 * buf = NULL; - int count = 0; - int i; - int real_count; + CFIndex count = 0; + CFIndex i; + CFIndex real_count; if (arr) { count = CFArrayGetCount(arr); @@ -77,8 +77,8 @@ S_get_char_array(CFArrayRef arr, CFIndex * len) static void my_CFArrayAppendUniqueValue(CFMutableArrayRef arr, CFTypeRef new) { - int i; - int n = CFArrayGetCount(arr); + CFIndex i; + CFIndex n = CFArrayGetCount(arr); for (i = 0; i < n; i++) { CFStringRef element = CFArrayGetValueAtIndex(arr, i); diff --git a/SystemConfiguration.fproj/English.lproj/NetworkInterface.strings b/SystemConfiguration.fproj/English.lproj/NetworkInterface.strings index 927ee05c3d43326cdda91f41184d66c6a82ec2ca..aba71b56672fc53e7aabd2d775de7a1abe1f3404 100644 GIT binary patch delta 54 xcmbPa^v-C*Hh%tOhE#?eAS?yqM24ct7rB%te_&+ebw(DS{E$t2^EUn%P5{VG5ETFb delta 12 TcmaE7G|6bgHvY{*0x_HbBwPfP diff --git a/SystemConfiguration.fproj/Info-Embedded.plist b/SystemConfiguration.fproj/Info-Embedded.plist index 1fb3706..b4571b9 100644 --- a/SystemConfiguration.fproj/Info-Embedded.plist +++ b/SystemConfiguration.fproj/Info-Embedded.plist @@ -7,7 +7,7 @@ CFBundleExecutable SystemConfiguration CFBundleGetInfoString - 1.13.1 + 1.14 CFBundleIdentifier com.apple.SystemConfiguration CFBundleInfoDictionaryVersion @@ -17,10 +17,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 diff --git a/SystemConfiguration.fproj/Info.plist b/SystemConfiguration.fproj/Info.plist index 1fb3706..b4571b9 100644 --- a/SystemConfiguration.fproj/Info.plist +++ b/SystemConfiguration.fproj/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable SystemConfiguration CFBundleGetInfoString - 1.13.1 + 1.14 CFBundleIdentifier com.apple.SystemConfiguration CFBundleInfoDictionaryVersion @@ -17,10 +17,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.13.1 + 1.14 CFBundleSignature ???? CFBundleVersion - 1.13.1 + 1.14 diff --git a/SystemConfiguration.fproj/NetworkConfiguration.plist b/SystemConfiguration.fproj/NetworkConfiguration.plist index b9ff5d7..ab5faf3 100644 --- a/SystemConfiguration.fproj/NetworkConfiguration.plist +++ b/SystemConfiguration.fproj/NetworkConfiguration.plist @@ -629,7 +629,7 @@ Proxies - ExceptionList + ExceptionsList *.local 169.254/16 diff --git a/SystemConfiguration.fproj/SCD.c b/SystemConfiguration.fproj/SCD.c index d6b8710..1463295 100644 --- a/SystemConfiguration.fproj/SCD.c +++ b/SystemConfiguration.fproj/SCD.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2010-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,8 +34,7 @@ #include #include #include -#include -#include +#include #include #include @@ -45,6 +44,9 @@ #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ +// LIBASL SPI +extern asl_object_t _asl_server_control_query(void); + /* framework variables */ int _sc_debug = FALSE; /* non-zero if debugging enabled */ @@ -68,7 +70,7 @@ __SCThreadSpecificDataFinalize(void *arg) __SCThreadSpecificDataRef tsd = (__SCThreadSpecificDataRef)arg; if (tsd != NULL) { - if (tsd->_asl != NULL) asl_close(tsd->_asl); + if (tsd->_asl != NULL) asl_release(tsd->_asl); if (tsd->_sc_store != NULL) CFRelease(tsd->_sc_store); CFAllocatorDeallocate(kCFAllocatorSystemDefault, tsd); } @@ -176,24 +178,26 @@ _SCCopyDescription(CFTypeRef cf, CFDictionaryRef formatOptions) } if (type == CFDateGetTypeID()) { - CFGregorianDate gDate; + CFCalendarRef calendar; CFStringRef str; - CFTimeZoneRef tZone; - - tZone = CFTimeZoneCopySystem(); - gDate = CFAbsoluteTimeGetGregorianDate(CFDateGetAbsoluteTime(cf), tZone); - str = CFStringCreateWithFormat(NULL, - formatOptions, - CFSTR("%@%02d/%02d/%04d %02d:%02d:%02.0f %@"), - prefix1, - gDate.month, - gDate.day, - (int)gDate.year, - gDate.hour, - gDate.minute, - gDate.second, - CFTimeZoneGetName(tZone)); - CFRelease(tZone); + CFTimeZoneRef tz; + int MM, DD, YYYY, hh, mm, ss; + + calendar = CFCalendarCreateWithIdentifier(NULL, kCFGregorianCalendar); + tz = CFTimeZoneCopySystem(); + CFCalendarSetTimeZone(calendar, tz); + CFRelease(tz); + CFCalendarDecomposeAbsoluteTime(calendar, + CFDateGetAbsoluteTime(cf), + "MdyHms", + &MM, &DD, &YYYY, &hh, &mm, &ss); + CFRelease(calendar); + + str = CFStringCreateWithFormat(NULL, + formatOptions, + CFSTR("%@%02d/%02d/%04d %02d:%02d:%02d"), + prefix1, + MM, DD, YYYY, hh, mm, ss); return str; } @@ -284,6 +288,7 @@ _SCCopyDescription(CFTypeRef cf, CFDictionaryRef formatOptions) nElements = CFDictionaryGetCount(cf); if (nElements > 0) { + CFComparatorFunction compFunc = NULL; CFMutableArrayRef sortedKeys; if (nElements > (CFIndex)(sizeof(keys_q) / sizeof(CFTypeRef))) { @@ -295,10 +300,23 @@ _SCCopyDescription(CFTypeRef cf, CFDictionaryRef formatOptions) for (i = 0; i < nElements; i++) { CFArrayAppendValue(sortedKeys, (CFStringRef)keys[i]); } - CFArraySortValues(sortedKeys, - CFRangeMake(0, nElements), - (CFComparatorFunction)CFStringCompare, - NULL); + + if (isA_CFString(keys[0])) { + compFunc = (CFComparatorFunction)CFStringCompare; + } + else if (isA_CFNumber(keys[0])) { + compFunc = (CFComparatorFunction)CFNumberCompare; + } + else if (isA_CFDate(keys[0])) { + compFunc = (CFComparatorFunction)CFDateCompare; + } + + if (compFunc != NULL) { + CFArraySortValues(sortedKeys, + CFRangeMake(0, nElements), + compFunc, + NULL); + } for (i = 0; i < nElements; i++) { CFStringRef key; @@ -361,8 +379,20 @@ _SCCopyDescription(CFTypeRef cf, CFDictionaryRef formatOptions) static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +__private_extern__ Boolean +is_install_environment() { + static dispatch_once_t once; + static Boolean is_install; + + dispatch_once(&once, ^{ + is_install = (getenv(INSTALL_ENVIRONMENT) != NULL); + }); + + return is_install; +} + static void -__SCLog(aslclient asl, aslmsg msg, int level, CFStringRef formatString, va_list formatArguments) +__SCLog(asl_object_t asl, asl_object_t msg, int level, CFStringRef formatString, va_list formatArguments) { CFDataRef line; CFArrayRef lines; @@ -373,12 +403,12 @@ __SCLog(aslclient asl, aslmsg msg, int level, CFStringRef formatString, va_list tsd = __SCGetThreadSpecificData(); if (tsd->_asl == NULL) { - tsd->_asl = asl_open(NULL, NULL, 0); + tsd->_asl = asl_open(NULL, (is_install_environment() ? INSTALL_FACILITY : NULL), 0); asl_set_filter(tsd->_asl, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); } asl = tsd->_asl; } - + #ifdef ENABLE_SC_FORMATTING str = _CFStringCreateWithFormatAndArgumentsAux(NULL, _SCCopyDescription, @@ -395,8 +425,8 @@ __SCLog(aslclient asl, aslmsg msg, int level, CFStringRef formatString, va_list if (level >= 0) { lines = CFStringCreateArrayBySeparatingStrings(NULL, str, CFSTR("\n")); if (lines != NULL) { - int i; - int n = CFArrayGetCount(lines); + CFIndex i; + CFIndex n = CFArrayGetCount(lines); for (i = 0; i < n; i++) { line = CFStringCreateExternalRepresentation(NULL, @@ -421,7 +451,6 @@ __SCLog(aslclient asl, aslmsg msg, int level, CFStringRef formatString, va_list } } CFRelease(str); - return; } @@ -528,7 +557,7 @@ SCLog(Boolean condition, int level, CFStringRef formatString, ...) void -SCLOG(aslclient asl, aslmsg msg, int level, CFStringRef formatString, ...) +SCLOG(asl_object_t asl, asl_object_t msg, int level, CFStringRef formatString, ...) { va_list formatArguments; va_list formatArguments_print; @@ -615,86 +644,6 @@ SCTrace(Boolean condition, FILE *stream, CFStringRef formatString, ...) #pragma mark ASL Functions -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) - - -extern kern_return_t _asl_server_query(mach_port_t server, - caddr_t request, - mach_msg_type_number_t requestCnt, - uint64_t startid, - int count, - int flags, - caddr_t *reply, - mach_msg_type_number_t *replyCnt, - uint64_t *lastid, - int *status, - security_token_t *token); - -#define ASL_SERVICE_NAME "com.apple.system.logger" - - -static aslresponse -_asl_control_query(aslmsg a) -{ - asl_search_result_t *out; - char *qstr, *str, *res; - uint32_t len, reslen, status; - uint64_t cmax, qmin; - kern_return_t kstatus; - caddr_t vmstr; - mach_port_t server_port; - security_token_t sec; - - bootstrap_look_up(bootstrap_port, ASL_SERVICE_NAME, &server_port); - if (server_port == MACH_PORT_NULL) return NULL; - - len = 0; - qstr = asl_msg_to_string((asl_msg_t *)a, &len); - - str = NULL; - if (qstr == NULL) - { - asprintf(&str, "1\nQ [= ASLOption control]\n"); - len = 27; - } - else - { - asprintf(&str, "1\n%s [= ASLOption control]\n", qstr); - len += 26; - free(qstr); - } - - if (str == NULL) return NULL; - - out = NULL; - qmin = 0; - cmax = 0; - sec.val[0] = -1; - sec.val[1] = -1; - - res = NULL; - reslen = 0; - status = ASL_STATUS_OK; - - kstatus = vm_allocate(mach_task_self(), (vm_address_t *)&vmstr, len, TRUE); - if (kstatus != KERN_SUCCESS) return NULL; - - memmove(vmstr, str, len); - free(str); - - status = 0; - kstatus = _asl_server_query(server_port, vmstr, len, qmin, 1, 0, (caddr_t *)&res, &reslen, &cmax, (int *)&status, &sec); - if (kstatus != KERN_SUCCESS) return NULL; - - if (res == NULL) return NULL; - - out = asl_list_from_string(res); - vm_deallocate(mach_task_self(), (vm_address_t)res, reslen); - - return out; -} - - static CFTypeID __kSCLoggerTypeID = _kCFRuntimeNotATypeID; typedef enum { @@ -709,8 +658,8 @@ struct SCLogger char * loggerID; // LoggerID SCLoggerFlags flags; - aslclient aslc; - aslmsg aslm; + asl_object_t aslc; + asl_object_t aslm; ModuleStatus module_status; pthread_mutex_t lock; }; @@ -793,11 +742,11 @@ __SCLoggerDeallocate(CFTypeRef cf) logger->loggerID = NULL; } if (logger->aslm != NULL) { - asl_free(logger->aslm); + asl_release(logger->aslm); logger->aslm = NULL; } if (logger->aslc != NULL) { - asl_close(logger->aslc); + asl_release(logger->aslc); logger->aslc = NULL; } } @@ -811,7 +760,7 @@ __SCLoggerCreate(void) tempLogger = __SCLoggerAllocate(kCFAllocatorDefault); tempLogger->loggerID = NULL; tempLogger->flags = kSCLoggerFlagsDefault; - tempLogger->aslc = asl_open(NULL, NULL, ASL_OPT_NO_DELAY); + tempLogger->aslc = asl_open(NULL, (is_install_environment() ? INSTALL_FACILITY : NULL), ASL_OPT_NO_DELAY); tempLogger->aslm = asl_new(ASL_TYPE_MSG); pthread_mutex_init(&(tempLogger->lock), NULL); tempLogger->module_status = kModuleStatusDoesNotExist; @@ -887,21 +836,16 @@ SCLoggerSetLoggerID(SCLoggerRef logger, CFStringRef loggerID) static ModuleStatus GetModuleStatus(const char * loggerID) { - aslresponse response = NULL; - aslmsg responseMessage = NULL; - ModuleStatus moduleStatus = kModuleStatusDoesNotExist; - const char* value = NULL; + ModuleStatus moduleStatus = kModuleStatusDoesNotExist; + asl_object_t response = NULL; + const char* value = NULL; if (loggerID != NULL) { - response = _asl_control_query(NULL); + response = _asl_server_control_query(); if (response == NULL) { goto done; } - responseMessage = aslresponse_next(response); - if (responseMessage == NULL) { - goto done; - } - value = asl_get(responseMessage, loggerID); + value = asl_get(response, loggerID); if (value == NULL) { moduleStatus = kModuleStatusDoesNotExist; goto done; @@ -915,9 +859,7 @@ GetModuleStatus(const char * loggerID) } } done: - if (response != NULL) { - aslresponse_free(response); - } + asl_release(response); return moduleStatus; } @@ -1003,8 +945,8 @@ void SCLoggerVLog(SCLoggerRef logger, int loglevel, CFStringRef formatString, va_list args) { - aslclient aslc; - aslmsg aslm; + asl_object_t aslc; + asl_object_t aslm; if (logger == NULL || logger->module_status == kModuleStatusDoesNotExist) { @@ -1034,8 +976,6 @@ SCLoggerLog(SCLoggerRef logger, int loglevel, CFStringRef formatString, ...) return; } -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) - #pragma mark - #pragma mark SC error handling / logging diff --git a/SystemConfiguration.fproj/SCDAdd.c b/SystemConfiguration.fproj/SCDAdd.c index 767277d..6225492 100644 --- a/SystemConfiguration.fproj/SCDAdd.c +++ b/SystemConfiguration.fproj/SCDAdd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -83,9 +83,9 @@ SCDynamicStoreAddTemporaryValue(SCDynamicStoreRef store, CFStringRef key, CFProp /* send the key & data to the server */ status = configadd_s(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, myDataRef, - myDataLen, + (mach_msg_type_number_t)myDataLen, &newInstance, (int *)&sc_status); @@ -156,9 +156,9 @@ SCDynamicStoreAddValue(SCDynamicStoreRef store, CFStringRef key, CFPropertyListR /* send the key & data to the server */ status = configadd(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, myDataRef, - myDataLen, + (mach_msg_type_number_t)myDataLen, &newInstance, (int *)&sc_status); diff --git a/SystemConfiguration.fproj/SCDGet.c b/SystemConfiguration.fproj/SCDGet.c index 16784d3..0636050 100644 --- a/SystemConfiguration.fproj/SCDGet.c +++ b/SystemConfiguration.fproj/SCDGet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -96,9 +96,9 @@ SCDynamicStoreCopyMultiple(SCDynamicStoreRef store, /* send the keys and patterns, fetch the associated result from the server */ status = configget_m(storePrivate->server, myKeysRef, - myKeysLen, + (mach_msg_type_number_t)myKeysLen, myPatternsRef, - myPatternsLen, + (mach_msg_type_number_t)myPatternsLen, &xmlDictRef, &xmlDictLen, (int *)&sc_status); @@ -175,7 +175,7 @@ SCDynamicStoreCopyValue(SCDynamicStoreRef store, CFStringRef key) /* send the key & fetch the associated data from the server */ status = configget(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, &xmlDataRef, &xmlDataLen, &newInstance, diff --git a/SystemConfiguration.fproj/SCDHostName.c b/SystemConfiguration.fproj/SCDHostName.c index d16f6d1..ed59896 100644 --- a/SystemConfiguration.fproj/SCDHostName.c +++ b/SystemConfiguration.fproj/SCDHostName.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2008, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -37,12 +37,13 @@ #include #include #include +#include "dy_framework.h" #pragma mark ComputerName -static CFStringRef +__private_extern__ CFStringRef _SCPreferencesCopyComputerName(SCPreferencesRef prefs, CFStringEncoding *nameEncoding) { @@ -90,9 +91,7 @@ _SCPreferencesCopyComputerName(SCPreferencesRef prefs, } if (tempPrefs) CFRelease(prefs); - if (name == NULL) { - _SCErrorSet(kSCStatusNoKey); - } + _SCErrorSet(name != NULL ? kSCStatusOK : kSCStatusNoKey); return name; } @@ -152,8 +151,11 @@ SCDynamicStoreCopyComputerName(SCDynamicStoreRef store, } } + _SCErrorSet(kSCStatusOK); + done : + if (dict != NULL) CFRelease(dict); return name; } @@ -334,7 +336,7 @@ SCPreferencesSetHostName(SCPreferencesRef prefs, #pragma mark LocalHostName -static CFStringRef +__private_extern__ CFStringRef _SCPreferencesCopyLocalHostName(SCPreferencesRef prefs) { CFDictionaryRef dict; @@ -370,9 +372,7 @@ _SCPreferencesCopyLocalHostName(SCPreferencesRef prefs) } if (tempPrefs) CFRelease(prefs); - if (name == NULL) { - _SCErrorSet(kSCStatusNoKey); - } + _SCErrorSet(name != NULL ? kSCStatusOK : kSCStatusNoKey); return name; } @@ -420,8 +420,11 @@ SCDynamicStoreCopyLocalHostName(SCDynamicStoreRef store) } CFRetain(name); + _SCErrorSet(kSCStatusOK); + done : + if (dict != NULL) CFRelease(dict); return name; } @@ -431,7 +434,7 @@ Boolean _SC_stringIsValidDNSName(const char *name) { int i; - int len = strlen(name); + size_t len = strlen(name); char prev = '\0'; const char *scan; diff --git a/SystemConfiguration.fproj/SCDList.c b/SystemConfiguration.fproj/SCDList.c index f77c219..154c935 100644 --- a/SystemConfiguration.fproj/SCDList.c +++ b/SystemConfiguration.fproj/SCDList.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -78,7 +78,7 @@ SCDynamicStoreCopyKeyList(SCDynamicStoreRef store, CFStringRef pattern) /* send the pattern & fetch the associated data from the server */ status = configlist(storePrivate->server, myPatternRef, - myPatternLen, + (mach_msg_type_number_t)myPatternLen, TRUE, /* isRegex == TRUE */ &xmlDataRef, &xmlDataLen, diff --git a/SystemConfiguration.fproj/SCDNotifierAdd.c b/SystemConfiguration.fproj/SCDNotifierAdd.c index 901278c..beb1364 100644 --- a/SystemConfiguration.fproj/SCDNotifierAdd.c +++ b/SystemConfiguration.fproj/SCDNotifierAdd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -85,7 +85,7 @@ SCDynamicStoreAddWatchedKey(SCDynamicStoreRef store, CFStringRef key, Boolean is /* send the key to the server */ status = notifyadd(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, isRegex, (int *)&sc_status); diff --git a/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c b/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c index e5fc043..4d81d95 100644 --- a/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c +++ b/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2008-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/SCDNotifierInformViaFD.c b/SystemConfiguration.fproj/SCDNotifierInformViaFD.c index f5505ce..fc51afe 100644 --- a/SystemConfiguration.fproj/SCDNotifierInformViaFD.c +++ b/SystemConfiguration.fproj/SCDNotifierInformViaFD.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2004, 2005, 2008-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2008-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -122,7 +122,7 @@ SCDynamicStoreNotifyFileDescriptor(SCDynamicStoreRef store, status = notifyviafd(storePrivate->server, un.sun_path, - strlen(un.sun_path), + (mach_msg_type_number_t)strlen(un.sun_path), identifier, (int *)&sc_status); diff --git a/SystemConfiguration.fproj/SCDNotifierRemove.c b/SystemConfiguration.fproj/SCDNotifierRemove.c index 739f4e8..20cc423 100644 --- a/SystemConfiguration.fproj/SCDNotifierRemove.c +++ b/SystemConfiguration.fproj/SCDNotifierRemove.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -95,7 +95,7 @@ SCDynamicStoreRemoveWatchedKey(SCDynamicStoreRef store, CFStringRef key, Boolean /* send the key to the server */ status = notifyremove(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, isRegex, (int *)&sc_status); diff --git a/SystemConfiguration.fproj/SCDNotifierSetKeys.c b/SystemConfiguration.fproj/SCDNotifierSetKeys.c index 1ffb863..76222d1 100644 --- a/SystemConfiguration.fproj/SCDNotifierSetKeys.c +++ b/SystemConfiguration.fproj/SCDNotifierSetKeys.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -86,9 +86,9 @@ SCDynamicStoreSetNotificationKeys(SCDynamicStoreRef store, /* send the keys and patterns, fetch the associated result from the server */ status = notifyset(storePrivate->server, myKeysRef, - myKeysLen, + (mach_msg_type_number_t)myKeysLen, myPatternsRef, - myPatternsLen, + (mach_msg_type_number_t)myPatternsLen, (int *)&sc_status); if (__SCDynamicStoreCheckRetryAndHandleError(store, diff --git a/SystemConfiguration.fproj/SCDNotify.c b/SystemConfiguration.fproj/SCDNotify.c index d55a46e..2b21178 100644 --- a/SystemConfiguration.fproj/SCDNotify.c +++ b/SystemConfiguration.fproj/SCDNotify.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -74,7 +74,7 @@ SCDynamicStoreNotifyValue(SCDynamicStoreRef store, /* send the key to the server */ status = confignotify(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, (int *)&sc_status); if (__SCDynamicStoreCheckRetryAndHandleError(store, diff --git a/SystemConfiguration.fproj/SCDPrivate.c b/SystemConfiguration.fproj/SCDPrivate.c index 5610bb7..882729b 100644 --- a/SystemConfiguration.fproj/SCDPrivate.c +++ b/SystemConfiguration.fproj/SCDPrivate.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -47,6 +47,8 @@ #include #include +#include + #include #include #include @@ -144,15 +146,15 @@ _SC_sockaddr_to_string(const struct sockaddr *address, char *buf, size_t bufLen) (void)inet_ntop(addr.sin->sin_family, &addr.sin->sin_addr, buf, - bufLen); + (socklen_t)bufLen); break; case AF_INET6 : { (void)inet_ntop(addr.sin6->sin6_family, &addr.sin6->sin6_addr, buf, - bufLen); + (socklen_t)bufLen); if (addr.sin6->sin6_scope_id != 0) { - int n; + size_t n; n = strlen(buf); if ((n+IF_NAMESIZE+1) <= (int)bufLen) { @@ -300,6 +302,51 @@ _SC_trimDomain(CFStringRef domain) } +CFStringRef +_SC_hw_model(Boolean trim) +{ + static CFStringRef model = NULL; + static CFStringRef model_trimmed = NULL; + static dispatch_once_t once; + + dispatch_once(&once, ^{ + char *cp; + char hwModel[64]; + int mib[] = { CTL_HW, HW_MODEL }; + size_t n = sizeof(hwModel); + int ret; + + // get HW model name + bzero(&hwModel, sizeof(hwModel)); + ret = sysctl(mib, sizeof(mib) / sizeof(mib[0]), &hwModel, &n, NULL, 0); + if (ret != 0) { + SCLog(TRUE, LOG_ERR, CFSTR("sysctl() CTL_HW/HW_MODEL failed: %s"), strerror(errno)); + return; + } + hwModel[sizeof(hwModel) - 1] = '\0'; + model = CFStringCreateWithCString(NULL, hwModel, kCFStringEncodingASCII); + + // and the "trimmed" name + // ... remove everything after (and including) a comma + // ... and then any trailing digits + cp = index(hwModel, ','); + if (cp != NULL) { + *cp = '\0'; + } + n = strlen(hwModel) - 1; + while (n > 0) { + if (!isdigit(hwModel[n])) { + break; + } + hwModel[n--] = '\0'; + } + model_trimmed = CFStringCreateWithCString(NULL, hwModel, kCFStringEncodingASCII); + }); + + return trim ? model_trimmed : model; +} + + #pragma mark - #pragma mark Serialization @@ -1006,7 +1053,7 @@ _SC_CFMachPortCreateWithPort(const char *portDescription, SCLog(TRUE, LOG_ERR, CFSTR("%s: CFMachPortCreateWithPort() failed , port = %p"), portDescription, - portNum); + (void *)(uintptr_t)portNum); if (port != NULL) { err = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s: CFMachPortCreateWithPort recycled, [old] port = %@"), @@ -1026,7 +1073,7 @@ _SC_CFMachPortCreateWithPort(const char *portDescription, getprogname()); _SC_crash(crash_info, CFSTR("CFMachPort error"), err); CFAllocatorDeallocate(NULL, crash_info); - CFRelease(err); + if (err != NULL) CFRelease(err); } return port; @@ -1352,8 +1399,12 @@ _SC_copyBacktrace() /* CrashReporter info */ +#if !TARGET_OS_IPHONE +#include +#else // !TARGET_OS_IPHONE const char *__crashreporter_info__ = NULL; asm(".desc ___crashreporter_info__, 0x10"); +#endif // !TARGET_OS_IPHONE static Boolean @@ -1430,7 +1481,11 @@ _SC_crash(const char *crash_info, CFStringRef notifyHeader, CFStringRef notifyMe Boolean ok = FALSE; if (crash_info != NULL) { +#if !TARGET_OS_IPHONE + CRSetCrashLogMessage(crash_info); +#else // !TARGET_OS_IPHONE __crashreporter_info__ = crash_info; +#endif // !TARGET_OS_IPHONE SCLog(TRUE, LOG_ERR, CFSTR("%s"), crash_info); } @@ -1446,7 +1501,11 @@ _SC_crash(const char *crash_info, CFStringRef notifyHeader, CFStringRef notifyMe #endif // DO_NOT_CRASH } +#if !TARGET_OS_IPHONE + CRSetCrashLogMessage(NULL); +#else // !TARGET_OS_IPHONE __crashreporter_info__ = NULL; +#endif // !TARGET_OS_IPHONE return; } diff --git a/SystemConfiguration.fproj/SCDRemove.c b/SystemConfiguration.fproj/SCDRemove.c index 38fc2ff..8f95d37 100644 --- a/SystemConfiguration.fproj/SCDRemove.c +++ b/SystemConfiguration.fproj/SCDRemove.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -76,7 +76,7 @@ SCDynamicStoreRemoveValue(SCDynamicStoreRef store, CFStringRef key) /* send the key to the server */ status = configremove(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, (int *)&sc_status); if (__SCDynamicStoreCheckRetryAndHandleError(store, diff --git a/SystemConfiguration.fproj/SCDSet.c b/SystemConfiguration.fproj/SCDSet.c index 81afaf4..9eec2e8 100644 --- a/SystemConfiguration.fproj/SCDSet.c +++ b/SystemConfiguration.fproj/SCDSet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -117,11 +117,11 @@ SCDynamicStoreSetMultiple(SCDynamicStoreRef store, /* send the keys and patterns, fetch the associated result from the server */ status = configset_m(storePrivate->server, mySetRef, - mySetLen, + (mach_msg_type_number_t)mySetLen, myRemoveRef, - myRemoveLen, + (mach_msg_type_number_t)myRemoveLen, myNotifyRef, - myNotifyLen, + (mach_msg_type_number_t)myNotifyLen, (int *)&sc_status); if (__SCDynamicStoreCheckRetryAndHandleError(store, @@ -192,9 +192,9 @@ SCDynamicStoreSetValue(SCDynamicStoreRef store, CFStringRef key, CFPropertyListR /* send the key & data to the server, get new instance id */ status = configset(storePrivate->server, myKeyRef, - myKeyLen, + (mach_msg_type_number_t)myKeyLen, myDataRef, - myDataLen, + (mach_msg_type_number_t)myDataLen, 0, &newInstance, (int *)&sc_status); diff --git a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c index b90bb1a..3b215c1 100644 --- a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c +++ b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c @@ -630,6 +630,9 @@ __rank_to_str(SCNetworkServicePrimaryRank rank, CFStringRef *rankStr) case kSCNetworkServicePrimaryRankNever : *rankStr = kSCValNetServicePrimaryRankNever; break; + case kSCNetworkServicePrimaryRankScoped : + *rankStr = kSCValNetServicePrimaryRankScoped; + break; default : return FALSE; } @@ -648,6 +651,8 @@ __str_to_rank(CFStringRef rankStr, SCNetworkServicePrimaryRank *rank) *rank = kSCNetworkServicePrimaryRankLast; } else if (CFEqual(rankStr, kSCValNetServicePrimaryRankNever)) { *rank = kSCNetworkServicePrimaryRankNever; + } else if (CFEqual(rankStr, kSCValNetServicePrimaryRankScoped)) { + *rank = kSCNetworkServicePrimaryRankScoped; } else { return FALSE; } diff --git a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h index 3075883..6562c21 100644 --- a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h +++ b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -25,6 +25,7 @@ #define _SCNETWORKCONFIGURATIONINTERNAL_H +#include #include #include #include @@ -32,6 +33,10 @@ #include #include +#if !TARGET_IPHONE_SIMULATOR +#include "IPMonitorControl.h" +#endif // !TARGET_IPHONE_SIMULATOR + typedef struct { @@ -101,6 +106,8 @@ typedef struct { // interface information CFStringRef interface_type; // interface type + Boolean active; + // [non-localized] name CFStringRef name; // non-localized [display] name @@ -181,6 +188,10 @@ typedef struct { CFDictionaryRef options; } vlan; +#if !TARGET_IPHONE_SIMULATOR + // for interface rank assertions + IPMonitorControlRef IPMonitorControl; +#endif // !TARGET_IPHONE_SIMULATOR } SCNetworkInterfacePrivate, *SCNetworkInterfacePrivateRef; @@ -190,16 +201,57 @@ __BEGIN_DECLS #pragma mark - #pragma mark SCNetworkInterface configuration (internal) +Boolean +__SCNetworkInterfaceMatchesName (CFStringRef name, CFStringRef key); CFArrayRef __SCNetworkInterfaceCopyAll_IONetworkInterface (void); +/*! + @function __SCNetworkInterfaceCopyStorageEntity + @discussion Create interface entity of network interface as seen in + NetworkInterfaces.plist + @param interface The network interface from which interface entity is create + @result Dictionary which contains information about interface entity + You must release the returned value. + */ +CFDictionaryRef +__SCNetworkInterfaceCopyStorageEntity (SCNetworkInterfaceRef interface); + +/*! + @function __SCNetworkInterfaceCopyStoredWithPreferences + @discussion Create an array of network interfaces, which is present in the preferences + in NetworkInteraces.plist + @param ni_prefs Preference for network interfaces + @result Array which contains SCNetworkInterfaceRef. + You must release the returned value. + */ + +CFArrayRef // SCNetworkInterfaceRef +__SCNetworkInterfaceCopyStoredWithPreferences (SCPreferencesRef ni_prefs); + SCNetworkInterfacePrivateRef __SCNetworkInterfaceCreateCopy (CFAllocatorRef allocator, SCNetworkInterfaceRef interface, SCPreferencesRef prefs, CFStringRef serviceID); +/*! + @function __SCNetworkInterfaceCreateMappingUsingBSDName + @discussion This function creates mapping of BSD name and network interface using + preferences which point to the NetworkInterfaces.plist file. + @param ni_prefs Preferences pointing to NetworkInterfaces.plist + @result BSD Mapping in a dictionary. + You must release the returned value. + */ +CFDictionaryRef +__SCNetworkInterfaceCreateMappingUsingBSDName(CFArrayRef interfaces); + +SCNetworkInterfaceRef +__SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(CFAllocatorRef allocator, + SCPreferencesRef ni_prefs, + CFStringRef bsdName); + SCNetworkInterfacePrivateRef __SCNetworkInterfaceCreatePrivate (CFAllocatorRef allocator, SCNetworkInterfaceRef interface, @@ -245,9 +297,36 @@ __SCNetworkInterfaceCreateMediaOptions (SCNetworkInterfaceRef interface, CFStringRef __SCNetworkInterfaceGetDefaultConfigurationType (SCNetworkInterfaceRef interface); +CFStringRef +__SCNetworkInterfaceGetEntitySubType (SCNetworkInterfaceRef interface); + +CFStringRef +__SCNetworkInterfaceGetEntityType (SCNetworkInterfaceRef interface); + CFStringRef __SCNetworkInterfaceGetNonLocalizedDisplayName (SCNetworkInterfaceRef interface); +void +__SCNetworkInterfaceSetUserDefinedName(SCNetworkInterfaceRef interface, CFStringRef name); + +/*! + @function __SCNetworkInterfaceGetUserDefinedName + @discussion This function returns the user defined name of the interface if available + @param interface The network interface. + @result String containing the user defined name. + */ +CFStringRef +__SCNetworkInterfaceGetUserDefinedName(SCNetworkInterfaceRef interface); + +/*! + @function __SCNetworkInterfaceIsActive + @discussion Identifies if the configuration of network interface is active or not + @param interface The network interface + @result TRUE if the interface configuration is active. + */ +Boolean +__SCNetworkInterfaceIsActive (SCNetworkInterfaceRef interface); + Boolean __SCNetworkInterfaceIsMember (SCPreferencesRef prefs, SCNetworkInterfaceRef interface); @@ -265,6 +344,20 @@ __SCNetworkInterfaceGetTemplateOverrides (SCNetworkInterfaceRef interface, int __SCNetworkInterfaceOrder (SCNetworkInterfaceRef interface); +/*! + @function __SCNetworkInterfaceSaveStoredWithPreferences + @discussion Saves the array of interfaces in the preferences passed in the function. The interfaces + which are already present in the prefs file are replaced. + @param prefs Preferences which contain the interfaces to be replaced. If NULL, then preferences on + the system are used. + @param interfacesToSave The new interfaces array which is to be stored in preferences. + @result TRUE if saving of the new interfaces was successful. + */ + +Boolean +__SCNetworkInterfaceSaveStoredWithPreferences (SCPreferencesRef prefs, + CFArrayRef interfacesToSave); + Boolean __SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface, CFStringRef extendedType, @@ -276,6 +369,17 @@ __SCNetworkInterfaceSetDeepConfiguration (SCNetworkSetRef set, SCNetworkInterfaceRef interface, CFArrayRef configs); +/*! + @function __SCNetworkInterfaceSetIOInterfaceUnity + @discussion Will allow the caller to set IO Interface Unit + @param interface The network interface + @param unit The new interface unit to set + + */ +void +__SCNetworkInterfaceSetIOInterfaceUnit (SCNetworkInterfaceRef interface, + CFNumberRef unit); + Boolean __SCNetworkInterfaceSupportsVLAN (CFStringRef bsd_if); @@ -283,10 +387,18 @@ void __SCBondInterfaceListCollectMembers (CFArrayRef interfaces, CFMutableSetRef set); +Boolean +__SCBondInterfaceSetMemberInterfaces (SCBondInterfaceRef bond, + CFArrayRef members); + void __SCBridgeInterfaceListCollectMembers (CFArrayRef interfaces, CFMutableSetRef set); +Boolean +__SCBridgeInterfaceSetMemberInterfaces (SCBridgeInterfaceRef bridge, + CFArrayRef members); + #pragma mark - #pragma mark SCNetworkProtocol configuration (internal) @@ -307,6 +419,9 @@ __SCNetworkProtocolIsValidType (CFStringRef protocolType); CFArrayRef /* of SCNetworkServiceRef's */ __SCNetworkServiceCopyAllEnabled (SCPreferencesRef prefs); +CFArrayRef /* of SCNetworkInterfaceRef's */ +__SCNetworkServiceCopyAllInterfaces (SCPreferencesRef prefs); + SCNetworkServicePrivateRef __SCNetworkServiceCreatePrivate (CFAllocatorRef allocator, SCPreferencesRef prefs, @@ -317,10 +432,28 @@ Boolean __SCNetworkServiceExistsForInterface (CFArrayRef services, SCNetworkInterfaceRef interface); -CF_RETURNS_RETAINED -CFStringRef -__SCNetworkServiceNextName (SCNetworkServiceRef service); - +Boolean +__SCNetworkServiceCreate (SCPreferencesRef prefs, + SCNetworkInterfaceRef interface, + CFStringRef userDefinedName); + +SCPreferencesRef +__SCNetworkCreateDefaultNIPrefs (CFStringRef prefsID); + +/*! + @function __SCNetworkServiceMigrateNew + @discussion Adds network service to SCPreferencesRef if it doesn't exists + @param prefs SCPreferencesRef + @param service The network service + @param bsdMapping Mapping of interface names between configurations + @result TRUE if add service to prefs is successful + */ +Boolean +__SCNetworkServiceMigrateNew (SCPreferencesRef prefs, + SCNetworkServiceRef service, + CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, + CFDictionaryRef serviceSetMapping); #pragma mark - #pragma mark SCNetworkSet configuration (internal) diff --git a/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h b/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h index ddc8ba7..8d017e9 100644 --- a/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h +++ b/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2005-2013 Apple Inc. All rights reserved. + * Copyright (c) 2005-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -51,6 +51,7 @@ __BEGIN_DECLS */ extern const CFStringRef kSCNetworkInterfaceTypeBridge __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); + /*! @const kSCNetworkInterfaceTypeLoopback */ @@ -79,13 +80,13 @@ extern const CFStringRef kSCNetworkInterfaceTypeVPN __OSX_AVAILABLE_STARTIN */ typedef SCNetworkInterfaceRef SCBridgeInterfaceRef; -enum { +typedef CF_ENUM(uint32_t, SCNetworkServicePrimaryRank) { kSCNetworkServicePrimaryRankDefault = 0, kSCNetworkServicePrimaryRankFirst = 1, kSCNetworkServicePrimaryRankLast = 2, - kSCNetworkServicePrimaryRankNever = 3 + kSCNetworkServicePrimaryRankNever = 3, + kSCNetworkServicePrimaryRankScoped = 4 }; -typedef uint32_t SCNetworkServicePrimaryRank; #pragma mark - #pragma mark SCNetworkInterface configuration (SPI) @@ -198,7 +199,7 @@ _SCNetworkInterfaceCopyAllWithPreferences (SCPreferencesRef prefs) __OSX_AVAI @result The BT-PAN interface; NULL if the interface is not (yet) known. */ SCNetworkInterfaceRef -_SCNetworkInterfaceCopyBTPANInterface (void) __OSX_AVAILABLE_STARTING(__MAC_10_8/*FIXME*/,__IPHONE_NA); +_SCNetworkInterfaceCopyBTPANInterface (void) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_NA); /*! @function _SCNetworkInterfaceCopySlashDevPath @@ -260,7 +261,6 @@ _SCNetworkInterfaceCreateWithIONetworkInterfaceObject (io_object_t if_obj) __ /*! @function SCNetworkInterfaceGetPrimaryRank @discussion We allow caller to retrieve the rank on an interface. - The key is stored in State:/Network/Interface//Service @param the interface to get the rank @result SCNetworkServicePrimaryRank */ @@ -270,6 +270,8 @@ SCNetworkInterfaceGetPrimaryRank (SCNetworkInterfaceRef interface) __OSX_AVAI /*! @function SCNetworkInterfaceSetPrimaryRank @discussion We allow caller to set an assertion on an interface. + The rank assertion lives as long as the SCNetworkInterfaceRef + remains valid. @param the interface to set the rank assertion @param the new rank to be set @result TRUE if operation is successful; FALSE if an error was encountered. @@ -285,7 +287,8 @@ SCNetworkInterfaceSetPrimaryRank (SCNetworkInterfaceRef interface, #define kSCNetworkInterfaceNetworkConfigurationOverridesKey CFSTR("NetworkConfigurationOverrides") #define kSCNetworkInterfaceHiddenConfigurationKey CFSTR("HiddenConfiguration") -#define kSCNetworkInterfaceHiddenPortKey CFSTR("HiddenPort") +#define kSCNetworkInterfaceHiddenPortKey CFSTR("HiddenPort") /* for serial ports */ +#define kSCNetworkInterfaceHiddenInterfaceKey CFSTR("HiddenInterface") /* for network interfaces */ // IORegistry property to indicate that a [WWAN] interface is not yet ready #define kSCNetworkInterfaceInitializingKey CFSTR("Initializing") @@ -830,6 +833,17 @@ CFStringRef SCNetworkServiceCopyExternalID (SCNetworkServiceRef service, CFStringRef identifierDomain); +/*! + @function _SCNetworkServiceSetServiceID + @discussion Sets serviceID of the service to a different value provided. + @param service The network service + @param newServiceID The new service ID + @result TRUE if new service ID is set successfully. + */ +Boolean +_SCNetworkServiceSetServiceID (SCNetworkServiceRef service, + CFStringRef newServiceID) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + #pragma mark - #pragma mark SCNetworkSet configuration (SPI) @@ -923,6 +937,10 @@ Boolean SCNetworkSetSetSelectedVPNService (SCNetworkSetRef set, SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); +Boolean +_SCNetworkSetSetSetID (SCNetworkSetRef set, + CFStringRef setID) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); + /*! @group VPN Service configuration */ @@ -1003,5 +1021,114 @@ Boolean VPNServiceRemoveAppRule (VPNServiceRef service, CFStringRef ruleIdentifier) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +/*! + @function VPNServiceIsManagedAppVPN + @discussion Check to see if a VPN service is a managed App VPN service + @param service The VPN servie. + @result Returns TRUE if the service is a managed App VPN service; FALSE otherwise. +*/ +Boolean +VPNServiceIsManagedAppVPN (VPNServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); + +/*! + @group Migration SPI + */ +#pragma mark - +#pragma mark Migration SPI + +extern const CFStringRef kSCNetworkConfigurationRepair /* CFBoolean */ __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); + +extern const CFStringRef kSCNetworkConfigurationMigrationActionKey /* CFNumber */ __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + +typedef CF_ENUM(uint32_t, SCNetworkConfigurationMigrationAction) { + kSCNetworkConfigurationMigrationAction_CleanInstall = 0, + kSCNetworkConfigurationMigrationAction_Upgrade = 1, + kSCNetworkConfigurationMigrationAction_Restore = 2, +}; + +/*! + @function _SCNetworkConfigurationCopyMigrationPaths + @result Returns an array of paths that we would need from the source + */ +CFArrayRef +_SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + +/*! + @function _SCNetworkConfigurationPerformMigration + @discussion Updates the network configuration of the target system with + configurations from previous system. Both sourceDir and targetDir + cannot be NULL, since NULL indicates API to look at the local system + @param sourceDir A reference which points to the root of a directory populated + with the list of requested directories/path from the "source" volume. Passing NULL + will indicate that sourceDir should point to local system + @param currentDir A reference which points to the root of a directory populated + with the list of requested directories/path from the "destination" volume. Passing + NULL will indicate that currentDir should point to local system. + @param targetDir A reference which points to the root of a directory that we + will populate (update) with new configuration. Passing NULL will mean that we want to + migrate to the currentDir. If not NULL, then this path should exist. + @param options Argument which will tell us what action we are supposed to take + (clean-install, upgrade, migrate/restore settings from another system, ...) + @result Returns array which would consist of those paths that should be moved + from the "targetDir" directory to destination volume. You must release the returned value. + */ + +CF_RETURNS_RETAINED +CFArrayRef +_SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, + CFURLRef currentDir, + CFURLRef targetDir, + CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + + +/*! + @function _SCNetworkConfigurationCheckValidity + @discussion Verifies whether the configuration files present in the specified + directory have valid mappings or not + @param configDir A reference which points to the directory where the configuration + files are present + @result TRUE if valid configurations are found + + */ + +Boolean +_SCNetworkConfigurationCheckValidity(CFURLRef configDir, + CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + + +/*! + @function _SCNetworkMigrationAreConfigurationsIdentical + @discussion Compares the migration output between network configurations + with the expected output. + @param configPref Preferences pointing toward preferences.plist file to + be compared with expected file. + @param configNetworkInterfacePref Preferences pointing toward NetworkInterfaces.plist + file to be compared with expected file. + @param expectedConfigPref Preferences pointing toward preferences.plist file + which is the expected result. + @param expectedNetworkInterfacePref Preferences pointing toward NetworkInterfaces.plist + file which is the expected file. + @result TRUE if configurations match with the expected configurations + + */ + +Boolean +_SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL, + CFURLRef expectedConfigurationURL) + __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + +/*! + @function _SCNetworkConfigurationCopyMigrationRemovePaths + @discussion List of paths to files which we want to be removed from the target filesystem after migration + @param targetPaths the CFArray returned by _SCNetworkConfigurationPerformMigration + @param targetDir the CFURL passed to _SCNetworkConfigurationPerformMigration + @result An array of CFURL's; NULL if no paths need to be removed from the target filesystem + +*/ + +CFArrayRef // of CFURLRef's +_SCNetworkConfigurationCopyMigrationRemovePaths (CFArrayRef targetPaths, + CFURLRef targetDir) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); + __END_DECLS #endif /* _SCNETWORKCONFIGURATIONPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCNetworkConnection.c b/SystemConfiguration.fproj/SCNetworkConnection.c index 067c14e..991457f 100644 --- a/SystemConfiguration.fproj/SCNetworkConnection.c +++ b/SystemConfiguration.fproj/SCNetworkConnection.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2013 Apple Inc. All rights reserved. + * Copyright (c) 2003-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -52,8 +53,7 @@ #include "dy_framework.h" #endif // !TARGET_OS_IPHONE -#include -#include +#include #include #include @@ -68,6 +68,8 @@ #include #include #include +#include +#include #include #include "pppcontroller.h" @@ -137,6 +139,11 @@ typedef struct { /* Flow Divert support info */ CFDictionaryRef flow_divert_token_params; + +#if !TARGET_IPHONE_SIMULATOR + /* NetworkExtension data structures */ + ne_session_t ne_session; +#endif /* !TARGET_IPHONE_SIMULATOR */ } SCNetworkConnectionPrivate, *SCNetworkConnectionPrivateRef; @@ -147,6 +154,59 @@ isA_SCNetworkConnection(CFTypeRef obj) } +#if !TARGET_IPHONE_SIMULATOR +Boolean +__SCNetworkConnectionUseNetworkExtension(SCNetworkConnectionPrivateRef connectionPrivate) +{ + Boolean result = FALSE; + + if (ne_session_use_as_system_vpn() && connectionPrivate->service != NULL) { + _SCErrorSet(kSCStatusOK); + result = _SCNetworkServiceIsVPN(connectionPrivate->service); + /* + * SCNetworkServiceGetInterface (called by _SCNetworkServiceIsVPN) will set the SC error to kSCStatusInvalidArgument if the service does not have an associated prefs object. + * In that case, we try to get the service type/subtype from the dynamic store. + */ + if (!result && SCError() == kSCStatusInvalidArgument) { + CFStringRef interfaceKey = SCDynamicStoreKeyCreateNetworkServiceEntity(kCFAllocatorDefault, + kSCDynamicStoreDomainSetup, + SCNetworkServiceGetServiceID(connectionPrivate->service), + kSCEntNetInterface); + CFDictionaryRef interfaceDict = SCDynamicStoreCopyValue(NULL, interfaceKey); + if (isA_CFDictionary(interfaceDict)) { + CFStringRef interfaceType = CFDictionaryGetValue(interfaceDict, kSCPropNetInterfaceType); + if (isA_CFString(interfaceType)) { + if (CFEqual(interfaceType, kSCNetworkInterfaceTypePPP)) { + CFStringRef interfaceSubType = CFDictionaryGetValue(interfaceDict, kSCPropNetInterfaceSubType); + result = (isA_CFString(interfaceSubType) && (CFEqual(interfaceSubType, kSCValNetInterfaceSubTypePPTP) || CFEqual(interfaceSubType, kSCValNetInterfaceSubTypeL2TP))); + } else { + result = (CFEqual(interfaceType, kSCNetworkInterfaceTypeVPN) || CFEqual(interfaceType, kSCNetworkInterfaceTypeIPSec)); + } + } + } + if (interfaceDict != NULL) { + CFRelease(interfaceDict); + } + CFRelease(interfaceKey); + } + } + + return result; +} +#endif /* !TARGET_IPHONE_SIMULATOR */ + + +Boolean +__SCNetworkConnectionUsingNetworkExtension(SCNetworkConnectionPrivateRef connectionPrivate) +{ +#if !TARGET_IPHONE_SIMULATOR + return (connectionPrivate->ne_session != NULL); +#else + return FALSE; +#endif /* !TARGET_IPHONE_SIMULATOR */ +} + + static CFStringRef __SCNetworkConnectionCopyDescription(CFTypeRef cf) { @@ -160,6 +220,7 @@ __SCNetworkConnectionCopyDescription(CFTypeRef cf) if (connectionPrivate->session_port != MACH_PORT_NULL) { CFStringAppendFormat(result, NULL, CFSTR(", server port = 0x%x"), connectionPrivate->session_port); } + CFStringAppendFormat(result, NULL, CFSTR("using NetworkExtension = %s"), (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate) ? "yes" : "no")); CFStringAppendFormat(result, NULL, CFSTR("}")); return result; @@ -238,6 +299,13 @@ __SCNetworkConnectionDeallocate(CFTypeRef cf) CFRelease(connectionPrivate->flow_divert_token_params); } +#if !TARGET_IPHONE_SIMULATOR + if (connectionPrivate->ne_session != NULL) { + ne_session_set_event_handler(connectionPrivate->ne_session, NULL, NULL); + ne_session_release(connectionPrivate->ne_session); + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + return; } @@ -360,12 +428,9 @@ __SCNetworkConnectionCallBackDispatchPerform(SCNetworkConnectionRef connection, static void -__SCNetworkConnectionCallBack(CFMachPortRef port, void * msg, CFIndex size, void * info) +__SCNetworkConnectionCallBack(void *connection) { - mach_no_senders_notification_t *buf = msg; - mach_msg_id_t msgid = buf->not_header.msgh_id; boolean_t exec_async = FALSE; - SCNetworkConnectionRef connection = (SCNetworkConnectionRef)info; SCNetworkConnectionPrivateRef connectionPrivate = (SCNetworkConnectionPrivateRef)connection; void *context_info; void (*context_release)(const void *); @@ -375,12 +440,6 @@ __SCNetworkConnectionCallBack(CFMachPortRef port, void * msg, CFIndex size, void dispatch_queue_t q = NULL; SCNetworkConnectionStatus nc_status = kSCNetworkConnectionInvalid; - if (msgid == MACH_NOTIFY_NO_SENDERS) { - // re-establish notification - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCNetworkConnectionCallBack: PPPController server died")); - (void)__SCNetworkConnectionReconnectNotifications(connection); - } - pthread_mutex_lock(&connectionPrivate->lock); if (!connectionPrivate->scheduled) { @@ -403,10 +462,24 @@ __SCNetworkConnectionCallBack(CFMachPortRef port, void * msg, CFIndex size, void context_release = NULL; } +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + pthread_mutex_unlock(&connectionPrivate->lock); + + nc_status = SCNetworkConnectionGetStatus(connection); + (*rlsFunction)(connection, nc_status, context_info); + if ((context_release != NULL) && (context_info != NULL)) { + (*context_release)(context_info); + } + CFRelease(connection); /* This releases the reference that we took in the NESessionEventStatusChanged event handler */ + return; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + // Do we need to spin a new thread? (either we are running on the main // dispatch queue or main runloop) if (connectionPrivate->rlList == NULL) { - // this is the case if we are performing a callback on a dispatch queue + // if we are performing the callback on a dispatch queue q = connectionPrivate->dispatchQueue; if (q == dispatch_get_main_queue()) { exec_async = TRUE; @@ -421,7 +494,7 @@ __SCNetworkConnectionCallBack(CFMachPortRef port, void * msg, CFIndex size, void CFRetain(connection); pthread_mutex_unlock(&connectionPrivate->lock); - if (exec_async == FALSE) { + if (!exec_async) { nc_status = SCNetworkConnectionGetStatus(connection); (*rlsFunction)(connection, nc_status, context_info); if ((context_release != NULL) && (context_info != NULL)) { @@ -434,29 +507,48 @@ __SCNetworkConnectionCallBack(CFMachPortRef port, void * msg, CFIndex size, void if (connectionPrivate->rlList == NULL) { assert(q != NULL); dispatch_retain(q); - dispatch_async(__SCNetworkConnectionQueue(), - ^{__SCNetworkConnectionCallBackDispatchPerform(connection, - q, - rlsFunction, - context_release, - context_info);}); + dispatch_async(__SCNetworkConnectionQueue(), ^{ + __SCNetworkConnectionCallBackDispatchPerform(connection, + q, + rlsFunction, + context_release, + context_info); + }); } else { assert(rl != NULL); CFRetain(rl); rl_mode = CFRunLoopCopyCurrentMode(rl); - dispatch_async(__SCNetworkConnectionQueue(), - ^{__SCNetworkConnectionCallBackRunLoopPerform(connection, - rl, - rl_mode, - rlsFunction, - context_release, - context_info);}); + dispatch_async(__SCNetworkConnectionQueue(), ^{ + __SCNetworkConnectionCallBackRunLoopPerform(connection, + rl, + rl_mode, + rlsFunction, + context_release, + context_info); + }); } return; } +static void +__SCNetworkConnectionMachCallBack(CFMachPortRef port, void * msg, CFIndex size, void * info) +{ + mach_no_senders_notification_t *buf = msg; + mach_msg_id_t msgid = buf->not_header.msgh_id; + SCNetworkConnectionRef connection = (SCNetworkConnectionRef)info; + + if (msgid == MACH_NOTIFY_NO_SENDERS) { + // re-establish notification + SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCNetworkConnectionMachCallBack: PPPController server died")); + (void)__SCNetworkConnectionReconnectNotifications(connection); + } + + __SCNetworkConnectionCallBack(info); +} + + #pragma mark - #pragma mark SCNetworkConnection APIs @@ -524,6 +616,26 @@ __SCNetworkConnectionCreatePrivate(CFAllocatorRef allocator, connectionPrivate->type = kSCNetworkConnectionTypeUnknown; +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUseNetworkExtension(connectionPrivate)) { + CFStringRef serviceID = SCNetworkServiceGetServiceID(connectionPrivate->service); + if (serviceID != NULL) { + uuid_string_t service_uuid_str; + if (CFStringGetCString(serviceID, service_uuid_str, sizeof(service_uuid_str), kCFStringEncodingUTF8)) { + uuid_t config_id; + if (uuid_parse(service_uuid_str, config_id) == 0) { + connectionPrivate->ne_session = ne_session_create(config_id, NESessionTypeVPN); + } + } + } + + if (connectionPrivate->ne_session == NULL) { + SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnection failed to create an ne_session: service ID %@ is not a valid UUID"), serviceID); + goto fail; + } + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + /* success, return the connection reference */ return connectionPrivate; @@ -649,7 +761,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate if (connectionPrivate->notify_port != NULL) { mach_port_t mp = CFMachPortGetPort(connectionPrivate->notify_port); - __MACH_PORT_DEBUG(TRUE, "*** __SCNetworkConnectionReconnectNotifications mp", mp); + __MACH_PORT_DEBUG(TRUE, "*** __SCNetworkConnectionSessionPort mp", mp); CFMachPortInvalidate(connectionPrivate->notify_port); CFRelease(connectionPrivate->notify_port); connectionPrivate->notify_port = NULL; @@ -695,7 +807,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate #endif // HAVE_PPPCONTROLLER_ATTACHWITHPROXY status = pppcontroller_attach(server, data, - dataLen, + (mach_msg_type_number_t)dataLen, bootstrap_port, notify_port, #ifdef HAVE_PPPCONTROLLER_ATTACHWITHAUDITSESSION @@ -722,7 +834,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate status = pppcontroller_attach_proxy(server, data, - dataLen, + (mach_msg_type_number_t)dataLen, client_bootstrap_port, notify_port, client_au_session, @@ -835,7 +947,7 @@ __SCNetworkConnectionSessionPort(SCNetworkConnectionPrivateRef connectionPrivate // create CFMachPort for SCNetworkConnection notification callback connectionPrivate->notify_port = _SC_CFMachPortCreateWithPort("SCNetworkConnection", notify_port, - __SCNetworkConnectionCallBack, + __SCNetworkConnectionMachCallBack, &context); // we need to try a bit harder to acquire the initial status @@ -919,13 +1031,9 @@ __SCNetworkConnectionReconnectNotifications(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); + // save and cancel [old] notifications if (connectionPrivate->rlList != NULL) { - rlList = CFArrayCreateCopy(NULL, connectionPrivate->rlList); - } - - // cancel [old] notifications - if (connectionPrivate->rlList != NULL) { - CFRelease(connectionPrivate->rlList); + rlList = connectionPrivate->rlList; connectionPrivate->rlList = NULL; } if (connectionPrivate->rls != NULL) { @@ -938,7 +1046,7 @@ __SCNetworkConnectionReconnectNotifications(SCNetworkConnectionRef connection) connectionPrivate->dispatchSource = NULL; } - /* Make sure dispatchSource is cancelled before removing group/queue */ + // make sure dispatchSource is cancelled before removing group/queue if (connectionPrivate->dispatchQueue != NULL) { // save dispatchQueue, release reference when we've queue'd blocks // complete, allow re-scheduling @@ -1240,14 +1348,14 @@ SCNetworkConnectionSetClientAuditInfo(SCNetworkConnectionRef connection, if (memcmp(&client_audit_token, &null_audit, sizeof(client_audit_token))) { #if TARGET_OS_IPHONE - audit_token_to_au32(client_audit_token, NULL, &uid, &gid, NULL, NULL, &pid, NULL, NULL); + audit_token_to_au32(client_audit_token, NULL, &uid, &gid, NULL, NULL, &pid, NULL, NULL); #else // TARGET_OS_IPHONE - uid = audit_token_to_euid(client_audit_token); - gid = audit_token_to_egid(client_audit_token); - pid = audit_token_to_pid(client_audit_token); + uid = audit_token_to_euid(client_audit_token); + gid = audit_token_to_egid(client_audit_token); + pid = audit_token_to_pid(client_audit_token); #endif // TARGET_OS_IPHONE } else { - pid = client_pid; + pid = client_pid; } if (!SCNetworkConnectionSetClientInfo(connection, audit_session, uid, gid, pid)) { @@ -1307,6 +1415,36 @@ SCNetworkConnectionCopyStatistics(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + __block xpc_object_t xstats = NULL; + ne_session_t ne_session = connectionPrivate->ne_session; + + ne_session_retain(ne_session); + pthread_mutex_unlock(&connectionPrivate->lock); + + dispatch_semaphore_t ne_sema = dispatch_semaphore_create(0); + ne_session_get_info(ne_session, NESessionInfoTypeStatistics, __SCNetworkConnectionQueue(), ^(xpc_object_t result) { + if (result != NULL) { + xstats = xpc_retain(result); + } + ne_session_release(ne_session); + dispatch_semaphore_signal(ne_sema); + }); + dispatch_semaphore_wait(ne_sema, DISPATCH_TIME_FOREVER); + dispatch_release(ne_sema); + + if (xstats != NULL) { + statistics = _CFXPCCreateCFObjectFromXPCObject(xstats); + xpc_release(xstats); + } else { + _SCErrorSet(kSCStatusFailed); + } + + return statistics; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1390,6 +1528,27 @@ SCNetworkConnectionGetStatus(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + __block ne_session_status_t ne_status; + ne_session_t ne_session = connectionPrivate->ne_session; + + ne_session_retain(ne_session); + pthread_mutex_unlock(&connectionPrivate->lock); + + dispatch_semaphore_t ne_sema = dispatch_semaphore_create(0); + ne_session_get_status(ne_session, __SCNetworkConnectionQueue(), ^(ne_session_status_t status) { + ne_status = status; + ne_session_release(ne_session); + dispatch_semaphore_signal(ne_sema); + }); + dispatch_semaphore_wait(ne_sema, DISPATCH_TIME_FOREVER); + dispatch_release(ne_sema); + + return SCNetworkConnectionGetStatusFromNEStatus(ne_status); + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1460,6 +1619,48 @@ SCNetworkConnectionCopyExtendedStatus(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + __block CFDictionaryRef statusDictionary = NULL; + ne_session_t ne_session = connectionPrivate->ne_session; + + ne_session_retain(ne_session); + pthread_mutex_unlock(&connectionPrivate->lock); + + dispatch_semaphore_t ne_sema = dispatch_semaphore_create(0); + ne_session_get_info(ne_session, NESessionInfoTypeExtendedStatus, __SCNetworkConnectionQueue(), ^(xpc_object_t extended_status) { + if (extended_status != NULL) { + statusDictionary = _CFXPCCreateCFObjectFromXPCObject(extended_status); + ne_session_release(ne_session); + dispatch_semaphore_signal(ne_sema); + } else { + ne_session_get_status(ne_session, __SCNetworkConnectionQueue(), ^(ne_session_status_t ne_status) { + SCNetworkConnectionStatus status = SCNetworkConnectionGetStatusFromNEStatus(ne_status); + if (status != kSCNetworkConnectionInvalid) { + CFStringRef keys[1] = { kSCNetworkConnectionStatus }; + CFNumberRef values[1] = { NULL }; + values[0] = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &status); + statusDictionary = CFDictionaryCreate(kCFAllocatorDefault, (const void **)keys, (const void **)values, sizeof(values) / sizeof(values[0]), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFRelease(values[0]); + } + ne_session_release(ne_session); + dispatch_semaphore_signal(ne_sema); + }); + } + }); + dispatch_semaphore_wait(ne_sema, DISPATCH_TIME_FOREVER); + dispatch_release(ne_sema); + + if (statusDictionary != NULL) { + extstatus = (CFPropertyListRef)statusDictionary; + } else { + _SCErrorSet(kSCStatusFailed); + } + + return extstatus; + } +#endif + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1559,7 +1760,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, if (debug > 0) { CFMutableDictionaryRef mdict = NULL; - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStart (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStart (%p)"), connectionPrivate); if (userOptions != NULL) { CFDictionaryRef dict; @@ -1610,10 +1811,6 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, if (mdict != NULL) CFRelease(mdict); } - if (userOptions && !_SCSerialize(userOptions, &dataref, &data, &datalen)) { - return FALSE; - } - pthread_mutex_lock(&connectionPrivate->lock); /* Clear out any cached flow divert token parameters */ @@ -1622,6 +1819,48 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, connectionPrivate->flow_divert_token_params = NULL; } +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + xpc_object_t xuser_options = NULL; + + if (userOptions != NULL) { + xuser_options = _CFXPCCreateXPCObjectFromCFObject(userOptions); + } + + if (connectionPrivate->client_bootstrap_port != MACH_PORT_NULL) { +#if NE_SESSION_VERSION > 2 + ne_session_start_on_behalf_of(connectionPrivate->ne_session, + xuser_options, + connectionPrivate->client_bootstrap_port, + connectionPrivate->client_audit_session, + connectionPrivate->client_uid, + connectionPrivate->client_gid, + connectionPrivate->client_pid); +#else + ne_session_start_on_behalf_of(connectionPrivate->ne_session, + xuser_options, + connectionPrivate->client_bootstrap_port, + connectionPrivate->client_audit_session, + connectionPrivate->client_uid, + connectionPrivate->client_gid); +#endif + } else { + ne_session_start_with_options(connectionPrivate->ne_session, xuser_options); + } + + if (xuser_options != NULL) { + xpc_release(xuser_options); + } + + ok = TRUE; + goto done; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + + if (userOptions && !_SCSerialize(userOptions, &dataref, &data, &datalen)) { + return FALSE; + } + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1630,7 +1869,11 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, goto done; } - status = pppcontroller_start(session_port, data, datalen, linger, &sc_status); + status = pppcontroller_start(session_port, + data, + (mach_msg_type_number_t)datalen, + linger, + &sc_status); if (__SCNetworkConnectionNeedsRetry(connection, "SCNetworkConnectionStart()", status, @@ -1641,7 +1884,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, if (dataref) CFRelease(dataref); if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStart (0x%x), return: %d"), connectionPrivate, sc_status); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStart (%p), return: %d"), connectionPrivate, sc_status); } if (sc_status != kSCStatusOK) { @@ -1674,11 +1917,19 @@ SCNetworkConnectionStop(SCNetworkConnectionRef connection, } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStop (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStop (%p)"), connectionPrivate); } pthread_mutex_lock(&connectionPrivate->lock); +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + ne_session_stop(connectionPrivate->ne_session); + ok = TRUE; + goto done; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1695,7 +1946,7 @@ SCNetworkConnectionStop(SCNetworkConnectionRef connection, } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStop (0x%x), return: %d"), connectionPrivate, sc_status); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionStop (%p), return: %d"), connectionPrivate, sc_status); } if (sc_status != kSCStatusOK) { @@ -1728,11 +1979,19 @@ SCNetworkConnectionSuspend(SCNetworkConnectionRef connection) } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionSuspend (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionSuspend (%p)"), connectionPrivate); } pthread_mutex_lock(&connectionPrivate->lock); +#if !!TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + /* Suspend only applies to PPPSerial and PPPoE */ + ok = TRUE; + goto done; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1749,7 +2008,7 @@ SCNetworkConnectionSuspend(SCNetworkConnectionRef connection) } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionSuspend (0x%x), return: %d"), connectionPrivate, sc_status); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionSuspend (%p), return: %d"), connectionPrivate, sc_status); } if (sc_status != kSCStatusOK) { @@ -1782,11 +2041,19 @@ SCNetworkConnectionResume(SCNetworkConnectionRef connection) } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionResume (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionResume (%p)"), connectionPrivate); } pthread_mutex_lock(&connectionPrivate->lock); +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + /* Resume only applies to PPPSerial and PPPoE */ + ok = TRUE; + goto done; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1803,7 +2070,7 @@ SCNetworkConnectionResume(SCNetworkConnectionRef connection) } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionResume (0x%x), return: %d"), connectionPrivate, sc_status); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionResume (%p), return: %d"), connectionPrivate, sc_status); } if (sc_status != kSCStatusOK) { @@ -1838,7 +2105,7 @@ SCNetworkConnectionRefreshOnDemandState(SCNetworkConnectionRef connection) } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionRefreshOnDemandState (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionRefreshOnDemandState (%p)"), connectionPrivate); } pthread_mutex_lock(&connectionPrivate->lock); @@ -1866,10 +2133,10 @@ SCNetworkConnectionRefreshOnDemandState(SCNetworkConnectionRef connection) if (status == MACH_SEND_INVALID_DEST) { // the server is not yet available - SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionRefreshOnDemandState (!dest) (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionRefreshOnDemandState (!dest) (%p)"), connectionPrivate); } else if (status == MIG_SERVER_DIED) { // the server we were using is gone - SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionRefreshOnDemandState (!mig) (0x%x)"), connectionPrivate); + SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnectionRefreshOnDemandState (!mig) (%p)"), connectionPrivate); } else { // if we got an unexpected error, don't retry sc_status = status; @@ -1878,7 +2145,7 @@ SCNetworkConnectionRefreshOnDemandState(SCNetworkConnectionRef connection) } if (debug > 0) { - SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionRefreshOnDemandState (0x%x), return: %d/%d"), connectionPrivate, status, sc_status); + SCLog(TRUE, LOG_DEBUG, CFSTR("SCNetworkConnectionRefreshOnDemandState (%p), return: %d/%d"), connectionPrivate, status, sc_status); } if (sc_status != kSCStatusOK) { @@ -1914,6 +2181,36 @@ SCNetworkConnectionCopyUserOptions(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + __block xpc_object_t config = NULL; + ne_session_t ne_session = connectionPrivate->ne_session; + + ne_session_retain(ne_session); + pthread_mutex_unlock(&connectionPrivate->lock); + + dispatch_semaphore_t ne_sema = dispatch_semaphore_create(0); + ne_session_get_info(ne_session, NESessionInfoTypeConfiguration, __SCNetworkConnectionQueue(), ^(xpc_object_t result) { + if (result != NULL) { + config = xpc_retain(result); + } + ne_session_release(ne_session); + dispatch_semaphore_signal(ne_sema); + }); + dispatch_semaphore_wait(ne_sema, DISPATCH_TIME_FOREVER); + dispatch_release(ne_sema); + + if (config != NULL) { + xpc_object_t xoptions = xpc_dictionary_get_value(config, NESMSessionLegacyUserConfigurationKey); + if (xoptions != NULL) { + userOptions = _CFXPCCreateCFObjectFromXPCObject(xoptions); + } + xpc_release(config); + } + return userOptions; + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + retry : session_port = __SCNetworkConnectionSessionPort(connectionPrivate); @@ -1992,26 +2289,44 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef connection, retry : - session_port = __SCNetworkConnectionSessionPort(connectionPrivate); - if (session_port == MACH_PORT_NULL) { - goto done; - } + if (!__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + session_port = __SCNetworkConnectionSessionPort(connectionPrivate); + if (session_port == MACH_PORT_NULL) { + goto done; + } - status = pppcontroller_notification(session_port, 1, &sc_status); - if (__SCNetworkConnectionNeedsRetry(connection, - "__SCNetworkConnectionScheduleWithRunLoop()", - status, - &sc_status)) { - goto retry; - } + status = pppcontroller_notification(session_port, 1, &sc_status); + if (__SCNetworkConnectionNeedsRetry(connection, + "__SCNetworkConnectionScheduleWithRunLoop()", + status, + &sc_status)) { + goto retry; + } - if (sc_status != kSCStatusOK) { - _SCErrorSet(sc_status); - goto done; - } + if (sc_status != kSCStatusOK) { + _SCErrorSet(sc_status); + goto done; + } - if (runLoop != NULL) { - connectionPrivate->rls = CFMachPortCreateRunLoopSource(NULL, connectionPrivate->notify_port, 0); + if (runLoop != NULL) { + connectionPrivate->rls = CFMachPortCreateRunLoopSource(NULL, connectionPrivate->notify_port, 0); + connectionPrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + } else if (runLoop != NULL) { + CFRunLoopSourceContext rlsContext = { + 0, // version + (void *)connection, // info + NULL, // retain + NULL, // release + NULL, // copy description + NULL, // equal + NULL, // hash + NULL, // schedule + NULL, // cancel + __SCNetworkConnectionCallBack, // perform + }; + + connectionPrivate->rls = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &rlsContext); connectionPrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } @@ -2019,83 +2334,89 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef connection, } if (queue != NULL) { - dispatch_group_t group = NULL; - mach_port_t mp; - dispatch_source_t source; - - mp = CFMachPortGetPort(connectionPrivate->notify_port); - source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, mp, 0, queue); - if (source == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnection dispatch_source_create() failed")); - _SCErrorSet(kSCStatusFailed); - goto done; - } - - // have our dispatch source hold a reference to the notification CFMachPort - CFRetain(connectionPrivate->notify_port); - dispatch_set_context(source, (void *)connectionPrivate->notify_port); - dispatch_set_finalizer_f(source, (dispatch_function_t)CFRelease); - // retain the dispatch queue connectionPrivate->dispatchQueue = queue; dispatch_retain(connectionPrivate->dispatchQueue); - // - // We've taken a reference to the callers dispatch_queue and we - // want to hold on to that reference until we've processed any/all - // notifications. To facilitate this we create a group, dispatch - // any notification blocks to via that group, and when the caller - // has told us to stop the notifications (unschedule) we wait for - // the group to empty and use the group's finalizer to release - // our reference to the SCNetworkConnection. - // - group = dispatch_group_create(); - connectionPrivate->dispatchGroup = group; - CFRetain(connection); - dispatch_set_context(connectionPrivate->dispatchGroup, (void *)connection); - dispatch_set_finalizer_f(connectionPrivate->dispatchGroup, (dispatch_function_t)CFRelease); - - dispatch_source_set_event_handler(source, ^{ - kern_return_t kr; - union { - u_int8_t buf[sizeof(mach_msg_empty_t) + MAX_TRAILER_SIZE]; - mach_msg_empty_rcv_t msg; - mach_no_senders_notification_t no_senders; - } notify_msg; - CFMachPortRef notify_port; - - kr = mach_msg(¬ify_msg.msg.header, // msg - MACH_RCV_MSG, // options - 0, // send_size - sizeof(notify_msg), // rcv_size - mp, // rcv_name - MACH_MSG_TIMEOUT_NONE, // timeout - MACH_PORT_NULL); // notify - if (kr != KERN_SUCCESS) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCDynamicStore notification handler, kr=0x%x"), - kr); - return; + if (!__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + dispatch_group_t group = NULL; + mach_port_t mp; + dispatch_source_t source; + + // + // We've taken a reference to the caller's dispatch_queue and we + // want to hold on to that reference until we've processed any/all + // notifications. To facilitate this we create a group, dispatch + // any notification blocks via that group, and when the caller + // has told us to stop the notifications (unschedule) we wait for + // the group to empty and use the group's finalizer to release + // our reference to the SCNetworkConnection. + // + group = dispatch_group_create(); + connectionPrivate->dispatchGroup = group; + CFRetain(connection); + dispatch_set_context(connectionPrivate->dispatchGroup, (void *)connection); + dispatch_set_finalizer_f(connectionPrivate->dispatchGroup, (dispatch_function_t)CFRelease); + + mp = CFMachPortGetPort(connectionPrivate->notify_port); + source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, mp, 0, queue); + if (source == NULL) { + SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConnection dispatch_source_create() failed")); + _SCErrorSet(kSCStatusFailed); + goto done; } - CFRetain(connection); - notify_port = dispatch_get_context(source); + // have our dispatch source hold a reference to the notification CFMachPort + CFRetain(connectionPrivate->notify_port); + dispatch_set_context(source, (void *)connectionPrivate->notify_port); + dispatch_set_finalizer_f(source, (dispatch_function_t)CFRelease); + + dispatch_source_set_event_handler(source, ^{ + kern_return_t kr; + typedef union { + u_int8_t buf[sizeof(mach_msg_empty_t) + MAX_TRAILER_SIZE]; + mach_msg_empty_rcv_t msg; + mach_no_senders_notification_t no_senders; + } *notify_message_t; + CFMachPortRef notify_port; + notify_message_t notify_msg; + + notify_msg = (notify_message_t)malloc(sizeof(*notify_msg)); + + kr = mach_msg(¬ify_msg->msg.header, // msg + MACH_RCV_MSG, // options + 0, // send_size + sizeof(*notify_msg), // rcv_size + mp, // rcv_name + MACH_MSG_TIMEOUT_NONE, // timeout + MACH_PORT_NULL); // notify + if (kr != KERN_SUCCESS) { + SCLog(TRUE, LOG_ERR, + CFSTR("SCDynamicStore notification handler, kr=0x%x"), + kr); + return; + } - dispatch_group_async(group, queue, ^{ - __SCNetworkConnectionCallBack(notify_port, - (void *)¬ify_msg.msg, - sizeof(notify_msg), - (void *)connection); - CFRelease(connection); + CFRetain(connection); + notify_port = dispatch_get_context(source); + + dispatch_group_async(group, queue, ^{ + __SCNetworkConnectionMachCallBack(notify_port, + (void *)notify_msg, + sizeof(*notify_msg), + (void *)connection); + free(notify_msg); + CFRelease(connection); + }); }); - }); - dispatch_source_set_cancel_handler(source, ^{ - dispatch_release(source); - }); + dispatch_source_set_cancel_handler(source, ^{ + dispatch_release(source); + }); - connectionPrivate->dispatchSource = source; - dispatch_resume(source); + connectionPrivate->dispatchSource = source; + dispatch_resume(source); + } } else { if (!_SC_isScheduled(NULL, runLoop, runLoopMode, connectionPrivate->rlList)) { /* @@ -2108,6 +2429,28 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef connection, _SC_schedule(connection, runLoop, runLoopMode, connectionPrivate->rlList); } +#if !TARGET_IPHONE_SIMULATOR + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + CFRetain(connection); + ne_session_set_event_handler(connectionPrivate->ne_session, __SCNetworkConnectionQueue(), ^(ne_session_event_t event, void *event_data) { + #pragma unused(event_data) + if (event == NESessionEventStatusChanged) { + CFRetain(connection); /* Released in __SCNetworkConnectionCallBack */ + pthread_mutex_lock(&connectionPrivate->lock); + if (connectionPrivate->rls != NULL) { + CFRunLoopSourceSignal(connectionPrivate->rls); + _SC_signalRunLoop(connection, connectionPrivate->rls, connectionPrivate->rlList); + } else if (connectionPrivate->dispatchQueue != NULL) { + dispatch_async(connectionPrivate->dispatchQueue, ^{ __SCNetworkConnectionCallBack((void *)connection); }); + } + pthread_mutex_unlock(&connectionPrivate->lock); + } else if (event == NESessionEventCanceled) { + CFRelease(connection); + } + }); + } +#endif /* !TARGET_IPHONE_SIMULATOR */ + ok = TRUE; done : @@ -2129,7 +2472,6 @@ __SCNetworkConnectionUnscheduleFromRunLoop(SCNetworkConnectionRef connection, int sc_status = kSCStatusFailed; CFIndex n = 0; Boolean ok = FALSE; - mach_port_t session_port; kern_return_t status; // hold a reference while we unschedule @@ -2148,24 +2490,24 @@ __SCNetworkConnectionUnscheduleFromRunLoop(SCNetworkConnectionRef connection, goto done; } - session_port = __SCNetworkConnectionSessionPort(connectionPrivate); - if (session_port == MACH_PORT_NULL) { - goto done; - } - if (connectionPrivate->dispatchQueue != NULL) { - // cancel dispatchSource - if (connectionPrivate->dispatchSource != NULL) { - dispatch_source_cancel(connectionPrivate->dispatchSource); - connectionPrivate->dispatchSource = NULL; - } + if (!__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { + // cancel dispatchSource + if (connectionPrivate->dispatchSource != NULL) { + dispatch_source_cancel(connectionPrivate->dispatchSource); + connectionPrivate->dispatchSource = NULL; + } - // save dispatchQueue/group, release reference when all queue'd blocks - // have been processed, allow re-scheduling - drainGroup = connectionPrivate->dispatchGroup; - connectionPrivate->dispatchGroup = NULL; - drainQueue = connectionPrivate->dispatchQueue; - connectionPrivate->dispatchQueue = NULL; + // save dispatchQueue/group, release reference when all queue'd blocks + // have been processed, allow re-scheduling + drainGroup = connectionPrivate->dispatchGroup; + connectionPrivate->dispatchGroup = NULL; + drainQueue = connectionPrivate->dispatchQueue; + connectionPrivate->dispatchQueue = NULL; + } else { + dispatch_release(connectionPrivate->dispatchQueue); + connectionPrivate->dispatchQueue = NULL; + } } else { if (!_SC_unschedule(connection, runLoop, runLoopMode, connectionPrivate->rlList, FALSE)) { // if not currently scheduled on this runLoop / runLoopMode @@ -2196,18 +2538,29 @@ __SCNetworkConnectionUnscheduleFromRunLoop(SCNetworkConnectionRef connection, // if *all* notifications have been unscheduled connectionPrivate->scheduled = FALSE; - status = pppcontroller_notification(session_port, 0, &sc_status); - if (__SCNetworkConnectionNeedsRetry(connection, - "__SCNetworkConnectionUnscheduleFromRunLoop pppcontroller_notification()", - status, - &sc_status)) { - sc_status = kSCStatusOK; - status = KERN_SUCCESS; - } + if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { +#if !TARGET_IPHONE_SIMULATOR + ne_session_cancel(connectionPrivate->ne_session); +#endif /* !TARGET_IPHONE_SIMULATOR */ + } else { + mach_port_t session_port = __SCNetworkConnectionSessionPort(connectionPrivate); + if (session_port == MACH_PORT_NULL) { + goto done; + } - if ((status != KERN_SUCCESS) || (sc_status != kSCStatusOK)) { - _SCErrorSet(sc_status); - goto done; + status = pppcontroller_notification(session_port, 0, &sc_status); + if (__SCNetworkConnectionNeedsRetry(connection, + "__SCNetworkConnectionUnscheduleFromRunLoop pppcontroller_notification()", + status, + &sc_status)) { + sc_status = kSCStatusOK; + status = KERN_SUCCESS; + } + + if ((status != KERN_SUCCESS) || (sc_status != kSCStatusOK)) { + _SCErrorSet(sc_status); + goto done; + } } } @@ -2308,110 +2661,108 @@ SCNetworkConnectionIsOnDemandSuspended(SCNetworkConnectionRef connection) return FALSE; } -static void -SCNetworkConnectionTriggerOnDemandCallback (SCNetworkConnectionRef connection, - SCNetworkConnectionStatus status, - void *info) -{ - dispatch_group_t group = (dispatch_group_t)info; - if (status != kSCNetworkConnectionConnecting) { - dispatch_group_leave(group); - } -} - Boolean SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName, Boolean afterDNSFail, int timeout, int trafficClass) { - SCNetworkConnectionRef connection = NULL; - dispatch_group_t group = NULL; - CFMutableDictionaryRef options_dict = NULL; - Boolean connectedIfNeeded = FALSE; - +#if !TARGET_IPHONE_SIMULATOR + __block Boolean triggeredOnDemand = FALSE; + struct proc_uniqidentifierinfo procu; + void *policy_match = NULL; + char *hostname = NULL; + CFIndex hostnameSize = 0; + pid_t pid = getpid(); + uid_t uid = geteuid(); + /* Require hostName, require non-root user */ if (hostName == NULL || geteuid() == 0) { goto done; } - - group = dispatch_group_create(); - if (group == NULL) { + + hostnameSize = CFStringGetLength(hostName); + if (hostnameSize == 0) { goto done; } - - SCNetworkConnectionContext context = { 0, (void*)group, NULL, NULL, NULL }; - connection = SCNetworkConnectionCreate(kCFAllocatorDefault, SCNetworkConnectionTriggerOnDemandCallback, &context); - if (connection == NULL) { + + hostname = malloc(hostnameSize + 1); + CFStringGetCString(hostName, hostname, hostnameSize + 1, kCFStringEncodingUTF8); + + if (proc_pidinfo(pid, PROC_PIDUNIQIDENTIFIERINFO, 1, &procu, sizeof(procu)) != sizeof(procu)) { goto done; } - - options_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - if (options_dict == NULL) { - goto done; - } - - CFDictionaryAddValue(options_dict, kSCNetworkConnectionSelectionOptionOnDemandHostName, hostName); - CFDictionaryAddValue(options_dict, kSCNetworkConnectionSelectionOptionOnDemandRetry, (afterDNSFail ? kCFBooleanTrue : kCFBooleanFalse)); - - if (trafficClass) { - CFNumberRef trafficClassRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &trafficClass); - if (trafficClassRef) { - CFDictionaryAddValue(options_dict, kSCNetworkConnectionSelectionOptionOnDemandTrafficClass, trafficClassRef); - CFRelease(trafficClassRef); - } - } - - if (SCNetworkConnectionSelectServiceWithOptions(connection, options_dict)) { - SCNetworkConnectionStatus status = SCNetworkConnectionGetStatus(connection); - - if (status == kSCNetworkConnectionConnected) { - /* If already connected, done */ - connectedIfNeeded = TRUE; - } else if (status == kSCNetworkConnectionDisconnected || status == kSCNetworkConnectionConnecting) { - dispatch_queue_t callback_queue = dispatch_queue_create("SCNetworkConnectionTrigger queue", NULL); - if (callback_queue) { - SCNetworkConnectionSetDispatchQueue(connection, callback_queue); - - dispatch_group_enter(group); - - /* If the connection is already connecting, we don't need to start. - If disconnected, do call start. */ - if (status == kSCNetworkConnectionDisconnected) { - SCNetworkConnectionStart(connection, NULL, TRUE); - } - - dispatch_group_wait(group, (timeout == 0) ? DISPATCH_TIME_FOREVER : dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * timeout)); - - SCNetworkConnectionSetDispatchQueue(connection, NULL); - - status = SCNetworkConnectionGetStatus(connection); - if (status == kSCNetworkConnectionConnected) { - connectedIfNeeded = TRUE; + + policy_match = ne_session_copy_policy_match(hostname, NULL, NULL, procu.p_uuid, procu.p_uuid, pid, uid, 0, trafficClass); + + NEPolicyServiceActionType action_type = ne_session_policy_match_get_service_action(policy_match); + if (action_type == NESessionPolicyActionTrigger || + (afterDNSFail && action_type == NESessionPolicyActionTriggerIfNeeded)) { + uuid_t config_id; + if (ne_session_policy_match_get_service(policy_match, config_id)) { + xpc_object_t start_options = xpc_dictionary_create(NULL, NULL, 0); + if (start_options != NULL) { + xpc_dictionary_set_bool(start_options, NESessionStartOptionIsOnDemandKey, true); + xpc_dictionary_set_string(start_options, NESessionStartOptionMatchHostnameKey, hostname); + + ne_session_t new_session = ne_session_create(config_id, ne_session_policy_match_get_service_type(policy_match)); + if (new_session != NULL) { + dispatch_semaphore_t wait_for_session = dispatch_semaphore_create(0); + dispatch_retain(wait_for_session); + xpc_retain(start_options); + ne_session_get_status(new_session, __SCNetworkConnectionQueue(), + ^(ne_session_status_t status) { + if (status == NESessionStatusDisconnected) { + dispatch_retain(wait_for_session); + ne_session_set_event_handler(new_session, __SCNetworkConnectionQueue(), + ^(ne_session_event_t event, void *event_data) { + if (event == NESessionEventStatusChanged) { + dispatch_retain(wait_for_session); + ne_session_get_status(new_session, __SCNetworkConnectionQueue(), + ^(ne_session_status_t new_status) { + if (new_status != NESessionStatusConnecting) { + if (status == NESessionStatusConnected) { + triggeredOnDemand = TRUE; + } + ne_session_cancel(new_session); + } + dispatch_release(wait_for_session); + }); + } else if (event == NESessionEventCanceled) { + dispatch_semaphore_signal(wait_for_session); + dispatch_release(wait_for_session); + } + }); + ne_session_start_with_options(new_session, start_options); + } else { + dispatch_semaphore_signal(wait_for_session); + } + dispatch_release(wait_for_session); + xpc_release(start_options); + }); + dispatch_semaphore_wait(wait_for_session, timeout ? dispatch_time(DISPATCH_TIME_NOW, (int64_t)timeout * NSEC_PER_SEC) : DISPATCH_TIME_FOREVER); + dispatch_release(wait_for_session); + ne_session_release(new_session); } - - dispatch_release(callback_queue); + + xpc_release(start_options); } } - } else { - /* Not needed, so we can return true */ - connectedIfNeeded = TRUE; } - done: - if (options_dict) { - CFRelease(options_dict); + if (hostname) { + free(hostname); } - - if (connection) { - CFRelease(connection); - } - - if (group) { - dispatch_release(group); + + if (policy_match) { + free(policy_match); } - return connectedIfNeeded; + return triggeredOnDemand; +#else +#pragma unused(hostName, afterDNSFail, timeout, trafficClass) + return FALSE; +#endif } @@ -2680,6 +3031,29 @@ SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection) } +#if !TARGET_IPHONE_SIMULATOR +SCNetworkConnectionStatus +SCNetworkConnectionGetStatusFromNEStatus(ne_session_status_t status) +{ + switch (status) { + case NESessionStatusInvalid: + return kSCNetworkConnectionInvalid; + case NESessionStatusDisconnected: + return kSCNetworkConnectionDisconnected; + case NESessionStatusConnecting: + case NESessionStatusReasserting: + return kSCNetworkConnectionConnecting; + case NESessionStatusConnected: + return kSCNetworkConnectionConnected; + case NESessionStatusDisconnecting: + return kSCNetworkConnectionDisconnecting; + } + + return kSCNetworkConnectionInvalid; +} +#endif /* !TARGET_IPHONE_SIMULATOR */ + + #pragma mark - #pragma mark User level "dial" API @@ -2775,6 +3149,98 @@ _SC_domainEndsWithDomain(CFStringRef compare_domain, CFStringRef match_domain) return ret; } +static CFCharacterSetRef +_SC_getNotDotOrStarCharacterSet (void) +{ + static CFCharacterSetRef notDotOrStar = NULL; + if (notDotOrStar == NULL) { + CFCharacterSetRef dotOrStar = CFCharacterSetCreateWithCharactersInString(kCFAllocatorDefault, CFSTR(".*")); + if (dotOrStar) { + notDotOrStar = CFCharacterSetCreateInvertedSet(kCFAllocatorDefault, dotOrStar); + CFRelease(dotOrStar); + } + } + return notDotOrStar; +} + +static CFMutableStringRef +_SC_createStringByTrimmingDotsAndStars (CFStringRef string) +{ + CFCharacterSetRef notDotOrStar = _SC_getNotDotOrStarCharacterSet(); + CFRange entireString = CFRangeMake(0, CFStringGetLength(string)); + CFMutableStringRef result = CFStringCreateMutableCopy(kCFAllocatorDefault, entireString.length, string); + CFRange start; + CFRange end = CFRangeMake(entireString.length, 0); + + if (CFStringFindCharacterFromSet(string, notDotOrStar, entireString, 0, &start) && + CFStringFindCharacterFromSet(string, notDotOrStar, entireString, kCFCompareBackwards, &end)) { + if (start.location == kCFNotFound || end.location == kCFNotFound || start.location > end.location) { + CFRelease(result); + return NULL; + } + } + + if ((end.location + 1) < entireString.length) { + CFStringReplace(result, CFRangeMake(end.location + 1, entireString.length - (end.location + 1)), CFSTR("")); + } + if (start.location > 0) { + CFStringReplace(result, CFRangeMake(0, start.location), CFSTR("")); + } + + return result; +} + +static CFIndex +_SC_getCountOfStringInString (CFStringRef string, CFStringRef substring) +{ + CFIndex count = 0; + CFArrayRef ranges = CFStringCreateArrayWithFindResults(kCFAllocatorDefault, string, substring, CFRangeMake(0, CFStringGetLength(string)), 0); + if (ranges != NULL) { + count = CFArrayGetCount(ranges); + CFRelease(ranges); + } + return count; +} + +Boolean +_SC_hostMatchesDomain(CFStringRef hostname, CFStringRef domain) +{ + Boolean result = FALSE; + CFMutableStringRef trimmedHostname = NULL; + CFMutableStringRef trimmedDomain = NULL; + + if (!isA_CFString(hostname) || !isA_CFString(domain)) { + goto done; + } + + trimmedHostname = _SC_createStringByTrimmingDotsAndStars(hostname); + trimmedDomain = _SC_createStringByTrimmingDotsAndStars(domain); + + if (!isA_CFString(trimmedHostname) || !isA_CFString(trimmedDomain)) { + goto done; + } + + CFIndex numHostnameDots = _SC_getCountOfStringInString(trimmedHostname, CFSTR(".")); + CFIndex numDomainDots = _SC_getCountOfStringInString(trimmedDomain, CFSTR(".")); + if (numHostnameDots == numDomainDots) { + result = CFEqual(trimmedHostname, trimmedDomain); + } else if (numDomainDots > 0 && numDomainDots < numHostnameDots) { + CFStringReplace(trimmedDomain, CFRangeMake(0, 0), CFSTR(".")); + result = CFStringHasSuffix(trimmedHostname, trimmedDomain); + } else { + result = FALSE; + } + +done: + if (trimmedHostname) { + CFRelease(trimmedHostname); + } + if (trimmedDomain) { + CFRelease(trimmedDomain); + } + return result; +} + /* VPN On Demand */ static CFDictionaryRef @@ -2789,7 +3255,7 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void) if (onDemand_notify_token == -1) { status = notify_register_check(kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY, &onDemand_notify_token); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_register_check() failed, status=%lu"), status); + SCLog(TRUE, LOG_ERR, CFSTR("notify_register_check() failed, status=%d"), status); onDemand_notify_token = -1; } } @@ -2797,7 +3263,7 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void) if (onDemand_notify_token != -1) { status = notify_check(onDemand_notify_token, &changed); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_check() failed, status=%lu"), status); + SCLog(TRUE, LOG_ERR, CFSTR("notify_check() failed, status=%d"), status); (void)notify_cancel(onDemand_notify_token); onDemand_notify_token = -1; } @@ -2806,7 +3272,7 @@ __SCNetworkConnectionCopyOnDemandConfiguration(void) if (changed && (onDemand_notify_token != -1)) { status = notify_get_state(onDemand_notify_token, &triggersCount); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_get_state() failed, status=%lu"), status); + SCLog(TRUE, LOG_ERR, CFSTR("notify_get_state() failed, status=%d"), status); (void)notify_cancel(onDemand_notify_token); onDemand_notify_token = -1; } @@ -2862,10 +3328,10 @@ static Boolean __SCNetworkConnectionShouldNeverMatch(CFDictionaryRef trigger, CFStringRef hostName, pid_t client_pid) { CFArrayRef exceptedProcesses; - int exceptedProcessesCount; - int exceptedProcessesIndex; + CFIndex exceptedProcessesCount; + CFIndex exceptedProcessesIndex; CFArrayRef exceptions; - int exceptionsCount; + CFIndex exceptionsCount; int exceptionsIndex; // we have a matching domain, check against exception list @@ -2967,7 +3433,7 @@ static CFStringRef __SCNetworkConnectionDomainGetMatch(CFDictionaryRef trigger, CFStringRef hostName, Boolean onDemandRetry) { CFArrayRef domains; - int domainsCount; + CFIndex domainsCount; int domainsIndex; CFStringRef key; CFStringRef match_domain = NULL; @@ -3003,8 +3469,6 @@ static Boolean __SCNetworkConnectionShouldIgnoreTrigger(CFDictionaryRef trigger) { CFStringRef action = CFDictionaryGetValue(trigger, kSCPropNetVPNOnDemandRuleAction); - int flags; - CFNumberRef reachFlags; if (isA_CFString(action) && (CFEqual(action, kSCValNetVPNOnDemandRuleActionIgnore) || @@ -3012,14 +3476,6 @@ __SCNetworkConnectionShouldIgnoreTrigger(CFDictionaryRef trigger) return TRUE; } - /* If the VPN server is not reachable immediately, ignore this trigger */ - reachFlags = CFDictionaryGetValue(trigger, kSCNetworkConnectionOnDemandReachFlags); - if (isA_CFNumber(reachFlags) && CFNumberGetValue(reachFlags, kCFNumberIntType, &flags)) { - if (!(flags & kSCNetworkReachabilityFlagsReachable) || (flags & kSCNetworkReachabilityFlagsConnectionRequired)) { - return TRUE; - } - } - return FALSE; } @@ -3374,7 +3830,7 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef selectionOption if (notify_userprefs_token == -1) { status = notify_register_check(k_NetworkConnect_Notification, ¬ify_userprefs_token); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_register_check() failed, status=%lu"), status); + SCLog(TRUE, LOG_ERR, CFSTR("notify_register_check() failed, status=%d"), status); (void)notify_cancel(notify_userprefs_token); notify_userprefs_token = -1; } else { @@ -3386,7 +3842,7 @@ __SCNetworkConnectionCopyUserPreferencesInternal(CFDictionaryRef selectionOption if (notify_userprefs_token != -1) { status = notify_check(notify_userprefs_token, &prefsChanged); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_ERR, CFSTR("notify_check() failed, status=%lu"), status); + SCLog(TRUE, LOG_ERR, CFSTR("notify_check() failed, status=%d"), status); (void)notify_cancel(notify_userprefs_token); notify_userprefs_token = -1; } @@ -3689,8 +4145,8 @@ SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connecti Boolean __SCNetworkConnectionIPv4AddressMatchesRoutes (struct sockaddr_in *addr_in, CFDictionaryRef routes) { - int count; - int i; + CFIndex count; + CFIndex i; CFDataRef maskData = NULL; struct in_addr *maskDataArray; CFDataRef routeaddrData = NULL; @@ -3714,7 +4170,6 @@ __SCNetworkConnectionIPv4AddressMatchesRoutes (struct sockaddr_in *addr_in, CFDi } count = CFDataGetLength(routeaddrData) / sizeof(struct in_addr); - for (i=0; itype == kSCNetworkConnectionTypeAppLayerVPN) { - /* Check App Layer on demand flag */ + /* Check App Layer OnDemand flag */ CFBooleanRef app_on_demand_enabled = CFDictionaryGetValue(found_trigger, kSCNetworkConnectionOnDemandMatchAppEnabled); if (isA_CFBoolean(app_on_demand_enabled) && CFBooleanGetValue(app_on_demand_enabled)) { @@ -4576,7 +5030,7 @@ copyPasswordFromKeychain(CFStringRef uniqueID) __private_extern__ char * -__SCNetworkConnectionGetControllerPortName() +__SCNetworkConnectionGetControllerPortName(void) { #if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 70000)) && !TARGET_IPHONE_SIMULATOR if (scnc_server_name == NULL){ diff --git a/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h b/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h index 81e6194..df77da3 100644 --- a/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h +++ b/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2008, 2009, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2009, 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -26,6 +26,9 @@ #include #include +#if !TARGET_IPHONE_SIMULATOR +#include +#endif #include #include #include @@ -484,6 +487,10 @@ __SCNetworkConnectionCopyOnDemandInfoWithName (SCDynamicStoreRef *storeP, SCNetworkConnectionStatus *connectionStatus, CFStringRef *vpnRemoteAddress) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0); +#if !TARGET_IPHONE_SIMULATOR +SCNetworkConnectionStatus +SCNetworkConnectionGetStatusFromNEStatus (ne_session_status_t status) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); +#endif /* !TARGET_IPHONE_SIMULATOR */ #pragma mark - #pragma mark SCUserPreferences SPIs diff --git a/SystemConfiguration.fproj/SCNetworkInterface.c b/SystemConfiguration.fproj/SCNetworkInterface.c index b66bcb7..f371ca0 100644 --- a/SystemConfiguration.fproj/SCNetworkInterface.c +++ b/SystemConfiguration.fproj/SCNetworkInterface.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -86,6 +86,7 @@ #include #include #include +#include #include #include #include @@ -95,11 +96,11 @@ #include -static CFStringRef copy_interface_string (CFBundleRef bundle, CFStringRef key, Boolean localized); -static CFStringRef __SCNetworkInterfaceCopyDescription (CFTypeRef cf); -static void __SCNetworkInterfaceDeallocate (CFTypeRef cf); -static Boolean __SCNetworkInterfaceEqual (CFTypeRef cf1, CFTypeRef cf2); -static CFHashCode __SCNetworkInterfaceHash (CFTypeRef cf); +static CFStringRef copy_interface_string (CFBundleRef bundle, CFStringRef key, Boolean localized); +static CFStringRef __SCNetworkInterfaceCopyFormattingDescription (CFTypeRef cf, CFDictionaryRef formatOptions); +static void __SCNetworkInterfaceDeallocate (CFTypeRef cf); +static Boolean __SCNetworkInterfaceEqual (CFTypeRef cf1, CFTypeRef cf2); +static CFHashCode __SCNetworkInterfaceHash (CFTypeRef cf); enum { @@ -153,6 +154,7 @@ const CFStringRef kSCNetworkInterfaceTypeIPv4 = CFSTR("IPv4"); static SCNetworkInterfacePrivate __kSCNetworkInterfaceIPv4 = { INIT_CFRUNTIME_BASE(), // cfBase NULL, // interface type + FALSE, // active NULL, // name NULL, // localized name NULL, // localization key @@ -189,7 +191,10 @@ static SCNetworkInterfacePrivate __kSCNetworkInterfaceIPv4 = { FALSE, // supportsBridge { NULL, NULL }, // bridge { interfaces, options } FALSE, // supportsVLAN - { NULL, NULL, NULL } // vlan { interface, tag, options } + { NULL, NULL, NULL }, // vlan { interface, tag, options } +#if !TARGET_IPHONE_SIMULATOR + NULL, // IPMonitorControl +#endif // !TARGET_IPHONE_SIMULATOR }; const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4 = (SCNetworkInterfaceRef)&__kSCNetworkInterfaceIPv4; @@ -197,6 +202,7 @@ const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4 = (SCNetworkInterfaceRef)&__ static SCNetworkInterfacePrivate __kSCNetworkInterfaceLoopback = { INIT_CFRUNTIME_BASE(), // cfBase NULL, // interface type + FALSE, // active NULL, // name NULL, // localized name NULL, // localization key @@ -233,7 +239,10 @@ static SCNetworkInterfacePrivate __kSCNetworkInterfaceLoopback = { FALSE, // supportsBridge { NULL, NULL }, // bridge { interfaces, options } FALSE, // supportsVLAN - { NULL, NULL, NULL } // vlan { interface, tag, options } + { NULL, NULL, NULL }, // vlan { interface, tag, options } +#if !TARGET_IPHONE_SIMULATOR + NULL, // IPMonitorControl +#endif // !TARGET_IPHONE_SIMULATOR }; const SCNetworkInterfaceRef kSCNetworkInterfaceLoopback = (SCNetworkInterfaceRef)&__kSCNetworkInterfaceLoopback; @@ -270,32 +279,44 @@ static const struct { const CFStringRef *ppp_subtype; uint32_t supported_protocols; } configurations[] = { - // interface type entity_hardware if config? interface types PPP sub-type interface protocols - // ===================================== ================= ========== =============== ======================================= ========================================= - { &kSCNetworkInterfaceType6to4 , &kSCEntNet6to4 , FALSE, doNone, NULL, doIPv6 }, - { &kSCNetworkInterfaceTypeBluetooth , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, - { &kSCNetworkInterfaceTypeBond , &kSCEntNetEthernet, TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeBridge , &kSCEntNetEthernet, TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeEthernet , &kSCEntNetEthernet, TRUE , doPPP, &kSCValNetInterfaceSubTypePPPoE, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeFireWire , &kSCEntNetFireWire, TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeIEEE80211 , &kSCEntNetAirPort , TRUE , doPPP, &kSCValNetInterfaceSubTypePPPoE, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeIPSec , &kSCEntNetIPSec , FALSE, doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeIrDA , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, - { &kSCNetworkInterfaceTypeL2TP , NULL , FALSE, doPPP, &kSCValNetInterfaceSubTypeL2TP, doNone }, - { &kSCNetworkInterfaceTypeModem , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, - { &kSCNetworkInterfaceTypePPP , &kSCEntNetPPP , FALSE, doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypePPTP , NULL , FALSE, doPPP, &kSCValNetInterfaceSubTypePPTP, doNone }, - { &kSCNetworkInterfaceTypeSerial , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, - { &kSCNetworkInterfaceTypeVLAN , &kSCEntNetEthernet, TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeVPN , &kSCEntNetVPN , FALSE, doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, - { &kSCNetworkInterfaceTypeWWAN , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, - // ===================================== ================= ========== =============== ======================================= ========================================= - { &kSCNetworkInterfaceTypeLoopback , NULL , TRUE , doNone, NULL, doIPv4|doIPv6 }, - // ===================================== ================= ========== =============== ======================================= ========================================= - { &kSCNetworkInterfaceTypeIPv4 , NULL , FALSE, doOverIP, NULL, doNone } + // interface type entity_hardware if config? interface types PPP sub-type interface protocols + // ===================================== ==================== ========== =============== ======================================= ========================================= + { &kSCNetworkInterfaceType6to4 , &kSCEntNet6to4 , FALSE, doNone, NULL, doIPv6 }, + { &kSCNetworkInterfaceTypeBluetooth , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, + { &kSCNetworkInterfaceTypeBond , &kSCEntNetEthernet , TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeBridge , &kSCEntNetEthernet , TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeEthernet , &kSCEntNetEthernet , TRUE , doPPP, &kSCValNetInterfaceSubTypePPPoE, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeFireWire , &kSCEntNetFireWire , TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeIEEE80211 , &kSCEntNetAirPort , TRUE , doPPP, &kSCValNetInterfaceSubTypePPPoE, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeIPSec , &kSCEntNetIPSec , FALSE, doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeIrDA , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, + { &kSCNetworkInterfaceTypeL2TP , NULL , FALSE, doPPP, &kSCValNetInterfaceSubTypeL2TP, doNone }, + { &kSCNetworkInterfaceTypeModem , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, + { &kSCNetworkInterfaceTypePPP , &kSCEntNetPPP , FALSE, doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypePPTP , NULL , FALSE, doPPP, &kSCValNetInterfaceSubTypePPTP, doNone }, + { &kSCNetworkInterfaceTypeSerial , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, + { &kSCNetworkInterfaceTypeVLAN , &kSCEntNetEthernet , TRUE , doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeVPN , &kSCEntNetVPN , FALSE, doNone, NULL, doDNS|doIPv4|doIPv6|doProxies|doSMB }, + { &kSCNetworkInterfaceTypeWWAN , &kSCEntNetModem , FALSE, doPPP, &kSCValNetInterfaceSubTypePPPSerial, doNone }, + // ===================================== =================== ========== =============== ======================================= ========================================= + { &kSCNetworkInterfaceTypeLoopback , NULL , TRUE , doNone, NULL, doIPv4|doIPv6 }, + // ===================================== =================== ========== =============== ======================================= ========================================= + { &kSCNetworkInterfaceTypeIPv4 , NULL , FALSE, doOverIP, NULL, doNone } }; +#define kSCNetworkInterfaceActive "Active" +#define kSCNetworkInterfaceInfo "SCNetworkInterfaceInfo" +#define kSCNetworkInterfaceType "SCNetworkInterfaceType" +#define kSCNetworkInterfaceBSDName kIOBSDNameKey +#define kSCNetworkInterfaceIOBuiltin kIOBuiltin +#define kSCNetworkInterfaceIOInterfaceNamePrefix kIOInterfaceNamePrefix +#define kSCNetworkInterfaceIOInterfaceType kIOInterfaceType +#define kSCNetworkInterfaceIOInterfaceUnit kIOInterfaceUnit +#define kSCNetworkInterfaceIOMACAddress kIOMACAddress +#define kSCNetworkInterfaceIOPathMatch kIOPathMatchKey + + #define NETWORKINTERFACE_LOCALIZATIONS CFSTR("NetworkInterface") static CFBundleRef bundle = NULL; @@ -304,15 +325,15 @@ static CFTypeID __kSCNetworkInterfaceTypeID = _kCFRuntimeNotATypeID; static const CFRuntimeClass __SCNetworkInterfaceClass = { - 0, // version - "SCNetworkInterface", // className - NULL, // init - NULL, // copy - __SCNetworkInterfaceDeallocate, // dealloc - __SCNetworkInterfaceEqual, // equal - __SCNetworkInterfaceHash, // hash - NULL, // copyFormattingDesc - __SCNetworkInterfaceCopyDescription // copyDebugDesc + 0, // version + "SCNetworkInterface", // className + NULL, // init + NULL, // copy + __SCNetworkInterfaceDeallocate, // dealloc + __SCNetworkInterfaceEqual, // equal + __SCNetworkInterfaceHash, // hash + __SCNetworkInterfaceCopyFormattingDescription, // copyFormattingDesc + NULL // copyDebugDesc }; @@ -324,7 +345,7 @@ static mach_port_t masterPort = MACH_PORT_NULL; static CFStringRef -__SCNetworkInterfaceCopyDescription(CFTypeRef cf) +__SCNetworkInterfaceCopyFormattingDescription(CFTypeRef cf, CFDictionaryRef formatOptions) { CFAllocatorRef allocator = CFGetAllocator(cf); CFMutableStringRef result; @@ -418,7 +439,7 @@ __SCNetworkInterfaceCopyDescription(CFTypeRef cf) CFStringAppendFormat(result, NULL, CFSTR(", action = %@"), interfacePrivate->configurationAction); } if (interfacePrivate->overrides != NULL) { - CFStringAppendFormat(result, NULL, CFSTR(", overrides = %p"), interfacePrivate->overrides); + CFStringAppendFormat(result, formatOptions, CFSTR(", overrides = %p"), interfacePrivate->overrides); } CFStringAppendFormat(result, NULL, CFSTR(", order = %d"), interfacePrivate->sort_order); if (interfacePrivate->prefs != NULL) { @@ -431,7 +452,7 @@ __SCNetworkInterfaceCopyDescription(CFTypeRef cf) CFStringAppendFormat(result, NULL, CFSTR(", interface = %@"), interfacePrivate->interface); } if (interfacePrivate->unsaved != NULL) { - CFStringAppendFormat(result, NULL, CFSTR(", unsaved = %@"), interfacePrivate->unsaved); + CFStringAppendFormat(result, formatOptions, CFSTR(", unsaved = %@"), interfacePrivate->unsaved); } if (interfacePrivate->bond.interfaces != NULL) { @@ -453,7 +474,11 @@ __SCNetworkInterfaceCopyDescription(CFTypeRef cf) CFStringAppendFormat(result, NULL, CFSTR(", mode = %@"), interfacePrivate->bond.mode); } if (interfacePrivate->bond.options != NULL) { - CFStringAppendFormat(result, NULL, CFSTR(", options = %@"), interfacePrivate->bond.options); + CFStringRef str; + + str = _SCCopyDescription(interfacePrivate->bond.options, formatOptions); + CFStringAppendFormat(result, formatOptions, CFSTR(", options = %@"), str); + CFRelease(str); } if (interfacePrivate->bridge.interfaces != NULL) { @@ -472,7 +497,11 @@ __SCNetworkInterfaceCopyDescription(CFTypeRef cf) } } if (interfacePrivate->bridge.options != NULL) { - CFStringAppendFormat(result, NULL, CFSTR(", options = %@"), interfacePrivate->bridge.options); + CFStringRef str; + + str = _SCCopyDescription(interfacePrivate->bridge.options, formatOptions); + CFStringAppendFormat(result, formatOptions, CFSTR(", options = %@"), str); + CFRelease(str); } if (interfacePrivate->vlan.interface != NULL) { @@ -484,7 +513,11 @@ __SCNetworkInterfaceCopyDescription(CFTypeRef cf) CFStringAppendFormat(result, NULL, CFSTR(", tag = %@"), interfacePrivate->vlan.tag); } if (interfacePrivate->vlan.options != NULL) { - CFStringAppendFormat(result, NULL, CFSTR(", options = %@"), interfacePrivate->vlan.options); + CFStringRef str; + + str = _SCCopyDescription(interfacePrivate->vlan.options, formatOptions); + CFStringAppendFormat(result, formatOptions, CFSTR(", options = %@"), str); + CFRelease(str); } CFStringAppendFormat(result, NULL, CFSTR("}")); @@ -598,7 +631,10 @@ __SCNetworkInterfaceDeallocate(CFTypeRef cf) if (interfacePrivate->vlan.options != NULL) CFRelease(interfacePrivate->vlan.options); - +#if !TARGET_IPHONE_SIMULATOR + if (interfacePrivate->IPMonitorControl != NULL) + CFRelease(interfacePrivate->IPMonitorControl); +#endif // !TARGET_IPHONE_SIMULATOR return; } @@ -750,6 +786,7 @@ __SCNetworkInterfaceCreatePrivate(CFAllocatorRef allocator, } interfacePrivate->interface_type = NULL; + interfacePrivate->active = FALSE; interfacePrivate->name = NULL; interfacePrivate->localized_name = NULL; interfacePrivate->localized_key = NULL; @@ -1129,8 +1166,9 @@ _SCNetworkInterfaceCompare(const void *val1, const void *val2, void *context) static void sort_interfaces(CFMutableArrayRef all_interfaces) { - int n = CFArrayGetCount(all_interfaces); + CFIndex n; + n = CFArrayGetCount(all_interfaces); if (n < 2) { return; } @@ -1671,8 +1709,11 @@ update_interface_name(SCNetworkInterfacePrivateRef interfacePrivate, interfacePrivate->name = CFRetain(productName); if (interfacePrivate->localized_name != NULL) { CFRelease(interfacePrivate->localized_name); + interfacePrivate->localized_name = NULL; + } + if (bundle != NULL) { + interfacePrivate->localized_name = copy_interface_string(bundle, productName, TRUE); } - interfacePrivate->localized_name = copy_interface_string(bundle, productName, TRUE); updated = TRUE; } @@ -1731,6 +1772,7 @@ merge_override(SCNetworkInterfacePrivateRef interfacePrivate, #define BT_PAN_NAME "Bluetooth PAN" +#define BT_PAN_MAC BT_PAN_NAME " (MAC)" static Boolean processNetworkInterface(SCNetworkInterfacePrivateRef interfacePrivate, @@ -1938,24 +1980,51 @@ processNetworkInterface(SCNetworkInterfacePrivateRef interfacePrivate, } } } - } else if (CFEqual(provider, CFSTR("IOUSBDevice")) || - CFEqual(provider, CFSTR("IOUSBInterface"))) { - // get USB info (if available) - processUSBInterface(interfacePrivate, - interface, - interface_dict, - controller, - controller_dict, - bus, - bus_dict); + } else { + io_registry_entry_t node = interface; + + while (provider != NULL) { + if (CFEqual(provider, CFSTR("IOUSBDevice")) || + CFEqual(provider, CFSTR("IOUSBInterface"))) { + // get USB info (if available) + processUSBInterface(interfacePrivate, + interface, + interface_dict, + controller, + controller_dict, + bus, + bus_dict); + + // set interface "name" + if (!update_interface_name(interfacePrivate, interface, TRUE)) { + interfacePrivate->localized_key = CFSTR("usb-ether"); + interfacePrivate->localized_arg1 = IODictionaryCopyBSDName(interface_dict); + } + break; + } - // set interface "name" - if (!update_interface_name(interfacePrivate, interface, TRUE)) { - interfacePrivate->localized_key = CFSTR("usb-ether"); - interfacePrivate->localized_arg1 = IODictionaryCopyBSDName(interface_dict); + if (node == interface) { + node = controller; + } else if (node == controller ) { + node = bus; + } else { + break; + } + + CFRelease(provider); + provider = IORegistryEntrySearchCFProperty(node, + kIOServicePlane, + CFSTR(kIOProviderClassKey), + NULL, + kIORegistryIterateRecursively | kIORegistryIterateParents); + } + + if (interfacePrivate->localized_key == NULL) { + update_interface_name(interfacePrivate, interface, FALSE); } } - CFRelease(provider); + + if (provider != NULL) CFRelease(provider); } if (interfacePrivate->localized_key == NULL) { @@ -2175,17 +2244,6 @@ processSerialInterface(SCNetworkInterfacePrivateRef interfacePrivate, Boolean ok = FALSE; CFTypeRef val; - // check if hidden - val = IORegistryEntrySearchCFProperty(interface, - kIOServicePlane, - kSCNetworkInterfaceHiddenPortKey, - NULL, - kIORegistryIterateRecursively | kIORegistryIterateParents); - if (val != NULL) { - CFRelease(val); - return FALSE; // if this interface should not be exposed - } - // check if initializing val = IORegistryEntrySearchCFProperty(interface, kIOServicePlane, @@ -2496,7 +2554,8 @@ __SC_IORegistryEntryCopyPath(io_registry_entry_t entry, const io_name_t plane) static SCNetworkInterfaceRef -createInterface(io_registry_entry_t interface, processInterface func) +createInterface(io_registry_entry_t interface, processInterface func, + CFStringRef hidden_key) { io_registry_entry_t bus = MACH_PORT_NULL; CFMutableDictionaryRef bus_dict = NULL; @@ -2508,41 +2567,55 @@ createInterface(io_registry_entry_t interface, processInterface func) kern_return_t kr; CFTypeRef val; + if (hidden_key != NULL) { + // check if hidden + val = IORegistryEntrySearchCFProperty(interface, + kIOServicePlane, + hidden_key, + NULL, + kIORegistryIterateRecursively | kIORegistryIterateParents); + if (val != NULL) { + CFRelease(val); + goto done; // if this interface should not be exposed + } + } + + // get the dictionary associated with the [interface] node kr = IORegistryEntryCreateCFProperties(interface, &interface_dict, NULL, kNilOptions); if (kr != kIOReturnSuccess) { SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryCreateCFProperties() failed, kr = 0x%x"), kr); goto done; } - /* get the controller node */ + // get the controller node kr = IORegistryEntryGetParentEntry(interface, kIOServicePlane, &controller); if (kr != kIOReturnSuccess) { SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetParentEntry() failed, kr = 0x%x"), kr); goto done; } - /* get the dictionary associated with the node */ + // get the dictionary associated with the [controller] node kr = IORegistryEntryCreateCFProperties(controller, &controller_dict, NULL, kNilOptions); if (kr != kIOReturnSuccess) { SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryCreateCFProperties() failed, kr = 0x%x"), kr); goto done; } - /* get the bus node */ + // get the bus node kr = IORegistryEntryGetParentEntry(controller, kIOServicePlane, &bus); if (kr != kIOReturnSuccess) { SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetParentEntry() failed, kr = 0x%x"), kr); goto done; } - /* get the dictionary associated with the node */ + // get the dictionary associated with the [bus] node kr = IORegistryEntryCreateCFProperties(bus, &bus_dict, NULL, kNilOptions); if (kr != kIOReturnSuccess) { SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryCreateCFProperties() failed, kr = 0x%x"), kr); goto done; } - /* get the registry entry ID */ + // get the registry entry ID kr = IORegistryEntryGetRegistryEntryID(interface, &entryID); if (kr != kIOReturnSuccess) { SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetRegistryEntryID() failed, kr = 0x%x"), kr); @@ -2568,7 +2641,7 @@ createInterface(io_registry_entry_t interface, processInterface func) } if ((*func)(interfacePrivate, interface, interface_dict, controller, controller_dict, bus, bus_dict)) { - /* get user-notification / auto-configuration preference */ + // get user-notification / auto-configuration preference val = IORegistryEntrySearchCFProperty(interface, kIOServicePlane, kSCNetworkInterfaceConfigurationActionKey, @@ -2581,7 +2654,7 @@ createInterface(io_registry_entry_t interface, processInterface func) CFRelease(val); } - /* get HiddenConfiguration preference */ + // get HiddenConfiguration preference val = IORegistryEntrySearchCFProperty(interface, kIOServicePlane, kSCNetworkInterfaceHiddenConfigurationKey, @@ -2611,7 +2684,8 @@ createInterface(io_registry_entry_t interface, processInterface func) static CF_RETURNS_RETAINED CFArrayRef -findMatchingInterfaces(CFDictionaryRef matching, processInterface func) +findMatchingInterfaces(CFDictionaryRef matching, processInterface func, + CFStringRef hidden_key) { CFMutableArrayRef interfaces; io_registry_entry_t interface; @@ -2636,7 +2710,7 @@ findMatchingInterfaces(CFDictionaryRef matching, processInterface func) while ((interface = IOIteratorNext(iterator)) != MACH_PORT_NULL) { SCNetworkInterfaceRef match; - match = createInterface(interface, func); + match = createInterface(interface, func, hidden_key); if (match != NULL) { CFArrayAppendValue(interfaces, match); CFRelease(match); @@ -3160,19 +3234,113 @@ findVLANInterface(SCPreferencesRef prefs, CFStringRef ifDevice) } +#define N_QUICK 32 + + +static CFMutableDictionaryRef +copy_ppp_entity(CFStringRef bsdName) +{ + CFMutableDictionaryRef entity = NULL; + CFStringRef pattern; + CFMutableArrayRef patterns; + CFDictionaryRef dict; + + patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetPPP); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); + pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainSetup, kSCCompAnyRegex, kSCEntNetInterface); + CFArrayAppendValue(patterns, pattern); + CFRelease(pattern); + dict = SCDynamicStoreCopyMultiple(NULL, NULL, patterns); + CFRelease(patterns); + if (dict != NULL) { + CFIndex i; + const void * keys_q[N_QUICK]; + const void ** keys = keys_q; + CFIndex n; + const void * vals_q[N_QUICK]; + const void ** vals = vals_q; + + n = CFDictionaryGetCount(dict); + if (n > (CFIndex)(sizeof(keys_q) / sizeof(CFTypeRef))) { + keys = CFAllocatorAllocate(NULL, n * sizeof(CFTypeRef), 0); + vals = CFAllocatorAllocate(NULL, n * sizeof(CFTypeRef), 0); + } + CFDictionaryGetKeysAndValues(dict, keys, vals); + for (i = 0; i < n; i++) { + CFArrayRef components; + CFStringRef interfaceKey; + CFDictionaryRef interfaceVal; + CFStringRef ifName; + CFStringRef pppKey = (CFStringRef)keys[i]; + CFDictionaryRef pppVal = (CFDictionaryRef)vals[i]; + CFStringRef serviceID; + + if (!CFStringHasSuffix(pppKey, kSCEntNetPPP) || + !CFDictionaryGetValueIfPresent(pppVal, kSCPropInterfaceName, (const void **)&ifName) || + !CFEqual(bsdName, ifName)) { + // if not matching PPP interface + continue; + } + + components = CFStringCreateArrayBySeparatingStrings(NULL, pppKey, CFSTR("/")); + serviceID = CFArrayGetValueAtIndex(components, 3); + interfaceKey = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, kSCDynamicStoreDomainSetup, serviceID, kSCEntNetInterface); + interfaceVal = CFDictionaryGetValue(dict, interfaceKey); + CFRelease(interfaceKey); + CFRelease(components); + if (interfaceVal != NULL) { + entity = CFDictionaryCreateMutableCopy(NULL, 0, interfaceVal); + break; + } + } + if (keys != keys_q) { + CFAllocatorDeallocate(NULL, keys); + CFAllocatorDeallocate(NULL, vals); + } + + CFRelease(dict); + } + + return entity; +} + + SCNetworkInterfaceRef _SCNetworkInterfaceCreateWithBSDName(CFAllocatorRef allocator, CFStringRef bsdName, UInt32 flags) { - CFMutableDictionaryRef entity; + CFMutableDictionaryRef entity = NULL; + struct ifreq ifr; SCNetworkInterfaceRef interface; - entity = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - CFDictionarySetValue(entity, kSCPropNetInterfaceDeviceName, bsdName); + bzero(&ifr, sizeof(ifr)); + if (_SC_cfstring_to_cstring(bsdName, ifr.ifr_name, sizeof(ifr.ifr_name), kCFStringEncodingASCII) != NULL) { + int s; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s != -1) { + if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) == -1) { + ifr.ifr_flags = 0; + } + close(s); + } + + if ((ifr.ifr_flags & IFF_POINTOPOINT) != 0) { + // if PPP + entity = copy_ppp_entity(bsdName); + } + } + + if (entity == NULL) { + entity = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionarySetValue(entity, kSCPropNetInterfaceDeviceName, bsdName); + } #if !TARGET_OS_IPHONE if ((flags & kIncludeBondInterfaces) == 0) { @@ -3195,6 +3363,264 @@ _SCNetworkInterfaceCreateWithBSDName(CFAllocatorRef allocator, } +static CFStringRef +_SCNetworkInterfaceCopyPrefixFromBSDName(CFStringRef bsdName) +{ + CFMutableStringRef interfacePrefix = NULL; + UniChar lastChar; + CFIndex length = 0; + + if (isA_CFString(bsdName) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("_SCNetworkInterfaceCopyPrefixFromBSDName: bsdName is NULL or not of the correct type")); + goto done; + } + + interfacePrefix = CFStringCreateMutableCopy(NULL, 0, bsdName); + length = CFStringGetLength(interfacePrefix); + + while (length > 0) { + lastChar = CFStringGetCharacterAtIndex(interfacePrefix, length - 1); + if (lastChar >= '0' && lastChar <= '9') { + CFStringDelete(interfacePrefix, + CFRangeMake(length-1, 1)); + } + else { + break; + } + length = CFStringGetLength(interfacePrefix); + } +done: + return interfacePrefix; +} + + +static void +__SCNetworkInterfaceSetIOInterfacePrefix(SCNetworkInterfaceRef interface, + CFStringRef prefix); + + +static Boolean +__SCNetworkInterfaceUpdateBSDName(SCNetworkInterfaceRef interface, CFStringRef currentBSDName, CFStringRef newBSDName) +{ + Boolean success = FALSE; + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + if (isA_SCNetworkInterface(interface) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceUpdateBSDName: interface is NULL or not of the correct type")); + goto done; + } + + if (CFEqual(currentBSDName, newBSDName)) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceUpdateBSDName: bsdName (%@) is equal to interfacePrivate->entity_device (%@)"), currentBSDName, newBSDName); + goto done; + } + + if (interfacePrivate->entity_device != NULL) { + CFRelease(interfacePrivate->entity_device); + } + interfacePrivate->entity_device = CFRetain(newBSDName); + success = TRUE; +done: + return success; +} + + +static Boolean +__SCNetworkInterfaceUpdateIOPath(SCNetworkInterfaceRef interface) +{ + Boolean success = FALSE; + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + CFStringRef oldPath = NULL; + CFStringRef newPath = NULL; + + // Using the BSD Name update the path + oldPath = interfacePrivate->path; + if (isA_CFString(oldPath) == NULL) { + goto done; + } + newPath = CFStringCreateWithFormat(NULL, NULL, CFSTR("Migrated_From: %@"), oldPath); + if (interfacePrivate->path != NULL) { + CFRelease(interfacePrivate->path); + } + interfacePrivate->path = CFRetain(newPath); + success = TRUE; + +done: + if (newPath != NULL) { + CFRelease(newPath); + } + return success; +} + + +static void +__SCNetworkInterfaceSetIOInterfacePrefix (SCNetworkInterfaceRef interface, + CFStringRef prefix) +{ + SCNetworkInterfacePrivateRef interfacePrivate; + + if (isA_CFString(prefix) == NULL) { + return; + } + + interfacePrivate = (SCNetworkInterfacePrivateRef) interface; + + CFRetain(prefix); + + if (interfacePrivate->prefix != NULL) { + CFRelease(interfacePrivate->prefix); + } + + interfacePrivate->prefix = prefix; + return; +} + + +__private_extern__ +void +__SCNetworkInterfaceSetIOInterfaceUnit (SCNetworkInterfaceRef interface, + CFNumberRef unit) +{ + SCNetworkInterfacePrivateRef interfacePrivate; + CFStringRef newBSDName = NULL; + CFStringRef oldBSDName = NULL; + + if (isA_CFNumber(unit) == NULL) { + return; + } + interfacePrivate = (SCNetworkInterfacePrivateRef) interface; + + oldBSDName = SCNetworkInterfaceGetBSDName(interface); + + if (interfacePrivate->prefix == NULL) { + if (isA_CFString(interfacePrivate->entity_device) != NULL) { + CFStringRef interfaceNamePrefix = _SCNetworkInterfaceCopyPrefixFromBSDName(interfacePrivate->entity_device); + if (interfaceNamePrefix == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceSetIOInterfaceUnit: interfaceNamePrefix is NULL")); + } + else { + __SCNetworkInterfaceSetIOInterfacePrefix(interface, interfaceNamePrefix); + CFRelease(interfaceNamePrefix); + } + } + } + + if (interfacePrivate->prefix != NULL) { + newBSDName = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@%@"), interfacePrivate->prefix, unit); + } + + // Update the BSD Name + if ((newBSDName == NULL) || + (__SCNetworkInterfaceUpdateBSDName(interface, oldBSDName, newBSDName) == FALSE)) { + SCLog(_sc_debug, LOG_DEBUG, CFSTR("__SCNetworkInterfaceSetIOInterfaceUnit: Update BSD Name Failed")); + } + + // Update the path + if (__SCNetworkInterfaceUpdateIOPath(interface) == FALSE) { + SCLog(_sc_debug, LOG_DEBUG, CFSTR("__SCNetworkInterfaceSetIOInterfaceUnit: Update IO Path Failed")); + } + + CFRetain(unit); + if (interfacePrivate->unit != NULL) { + CFRelease(interfacePrivate->unit); + } + interfacePrivate->unit = unit; + + + if (newBSDName != NULL) { + CFRelease(newBSDName); + } + return; +} + + +__private_extern__ +CFDictionaryRef +__SCNetworkInterfaceCopyStorageEntity(SCNetworkInterfaceRef interface) +{ + CFMutableDictionaryRef interface_entity = NULL; + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + CFBooleanRef active = NULL; + CFStringRef bsdName = NULL; + CFBooleanRef builtin = NULL; + CFStringRef interfaceNamePrefix = NULL; + CFNumberRef interfaceType = NULL; + CFNumberRef interfaceUnit = NULL; + CFDataRef macAddress = NULL; + CFStringRef pathMatch = NULL; + CFDictionaryRef info = NULL; + CFStringRef type = NULL; + + if (interfacePrivate->active == TRUE) { + active = kCFBooleanTrue; + } + + bsdName = SCNetworkInterfaceGetBSDName(interface); + if (isA_CFString(bsdName) == NULL) { + goto done; + } + + builtin = interfacePrivate->builtin ? kCFBooleanTrue : kCFBooleanFalse; + interfaceNamePrefix = _SCNetworkInterfaceGetIOInterfaceNamePrefix(interface); + if (isA_CFString(interfaceNamePrefix) == NULL) { + goto done; + } + + interfaceType = _SCNetworkInterfaceGetIOInterfaceType(interface); + if (isA_CFNumber(interfaceType) == NULL) { + goto done; + } + + interfaceUnit = _SCNetworkInterfaceGetIOInterfaceUnit(interface); + if (isA_CFNumber(interfaceUnit) == NULL) { + goto done; + } + + macAddress = _SCNetworkInterfaceGetHardwareAddress(interface); + if (isA_CFData(macAddress) == NULL) { + goto done; + } + + pathMatch = _SCNetworkInterfaceGetIOPath(interface); + if (isA_CFString(pathMatch) == NULL) { + goto done; + } + + info = _SCNetworkInterfaceCopyInterfaceInfo(interface); + if (isA_CFDictionary(info) == NULL) { + goto done; + } + + type = SCNetworkInterfaceGetInterfaceType(interface); + if (isA_CFString(type) == NULL) { + goto done; + } + + interface_entity = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + + if (isA_CFBoolean(active) != NULL) { + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceActive), active); + } + + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceBSDName), bsdName); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceIOBuiltin), builtin); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceNamePrefix), interfaceNamePrefix); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceType), interfaceType); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceUnit), interfaceUnit); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceIOMACAddress), macAddress); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceIOPathMatch), pathMatch); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceInfo), info); + CFDictionaryAddValue(interface_entity, CFSTR(kSCNetworkInterfaceType), type); +done: + if (info != NULL) { + CFRelease(info); + } + return interface_entity; +} + + static void __SCNetworkInterfaceSetService(SCNetworkInterfaceRef interface, SCNetworkServiceRef service) @@ -3224,8 +3650,9 @@ __SCNetworkInterfaceSetService(SCNetworkInterfaceRef interface, } -static Boolean -_SCNetworkInterfaceMatchesName(CFStringRef name, CFStringRef key) +__private_extern__ +Boolean +__SCNetworkInterfaceMatchesName(CFStringRef name, CFStringRef key) { Boolean match; CFStringRef str; @@ -3264,6 +3691,152 @@ _SCNetworkInterfaceMatchesName(CFStringRef name, CFStringRef key) } +#define kInterfaceTypeEthernetValue 6 +#define kInterfaceTypeFirewireValue 144 + + +static SCNetworkInterfaceRef +__SCNetworkInterfaceCreateWithStorageEntity (CFAllocatorRef allocator, + CFDictionaryRef interface_entity, + SCPreferencesRef prefs) +{ + SCNetworkInterfacePrivateRef interfacePrivate = NULL; + CFBooleanRef active = NULL; + CFStringRef bsdName = NULL; + CFBooleanRef ioBuiltin = NULL; + CFStringRef ioInterfaceNamePrefix = NULL; + CFNumberRef ioInterfaceType = NULL; + int ioInterfaceTypeNum; + CFNumberRef ioInterfaceUnit = NULL; + CFDataRef ioMACAddress = NULL; + CFStringRef ioPathMatch = NULL; + CFDictionaryRef SCNetworkInterfaceInfo = NULL; + CFStringRef userDefinedName = NULL; + CFStringRef usbProductName = NULL; + CFNumberRef idProduct = NULL; + CFNumberRef idVendor = NULL; + CFStringRef type = NULL; + + /* initialize runtime */ + pthread_once(&initialized, __SCNetworkInterfaceInitialize); + + if (isA_CFDictionary(interface_entity) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: interface_entity is NULL or not of the correct type")); + goto done; + } + active = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceActive)); + if (isA_CFBoolean(active) == NULL) { + active = kCFBooleanFalse; + } + bsdName = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceBSDName)); + if (isA_CFString(bsdName) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: bsdName is NULL or not of the correct type")); + goto done; + } + ioBuiltin = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOBuiltin)); + if (isA_CFBoolean(ioBuiltin) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioBuiltin is NULL or not of the correct type")); + goto done; + } + ioInterfaceNamePrefix = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceNamePrefix)); + if (isA_CFString(ioInterfaceNamePrefix) == NULL) { + ioInterfaceNamePrefix = _SCNetworkInterfaceCopyPrefixFromBSDName(bsdName); + if (ioInterfaceNamePrefix == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioInterfaceNamePrefix is NULL or not of the correct type")); + goto done; + } + } + else { + CFRetain(ioInterfaceNamePrefix); + } + ioInterfaceType = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceType)); + if (isA_CFNumber(ioInterfaceType) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioInterfaceType is NULL or not of the correct type")); + goto done; + } + if (CFNumberGetValue(ioInterfaceType, kCFNumberIntType, &ioInterfaceTypeNum) == FALSE) { + SCLog(TRUE, LOG_ERR, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: Count not extract value from ioInterfaceType")); + } + + ioInterfaceUnit = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOInterfaceUnit)); + if (isA_CFNumber(ioInterfaceUnit) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioInterfaceUnit is NULL or not of the correct type")); + + goto done; + } + ioMACAddress = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOMACAddress)); + if (isA_CFData(ioMACAddress) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioMACAddress is NULL or not of the correct type")); + goto done; + } + ioPathMatch = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceIOPathMatch)); + if (isA_CFString(ioPathMatch) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: ioPathMatch is NULL or not of the correct type")); + goto done; + } + else { + // Check if Path contains the BSD Name in the end + } + SCNetworkInterfaceInfo = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceInfo)); + if (isA_CFDictionary(SCNetworkInterfaceInfo) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: SCNetworkInterfaceInfo is NULL or not of the correct type")); + goto done; + } + userDefinedName = CFDictionaryGetValue(SCNetworkInterfaceInfo, kSCPropUserDefinedName); +#if !TARGET_IPHONE_SIMULATOR + usbProductName = CFDictionaryGetValue(SCNetworkInterfaceInfo, CFSTR(kUSBProductString)); + idProduct = CFDictionaryGetValue(SCNetworkInterfaceInfo, CFSTR(kUSBProductID)); + idVendor = CFDictionaryGetValue(SCNetworkInterfaceInfo, CFSTR(kUSBVendorID)); +#endif // !TARGET_IPHONE_SIMULATOR + + type = CFDictionaryGetValue(interface_entity, CFSTR(kSCNetworkInterfaceType)); + if (isA_CFString(type) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateWithStorageEntity: type is NULL or not of the correct type")); + goto done; + } + + interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL); + interfacePrivate->active = CFBooleanGetValue(active); + interfacePrivate->entity_device = CFRetain(bsdName); + interfacePrivate->builtin = CFBooleanGetValue(ioBuiltin); + interfacePrivate->prefix = CFRetain(ioInterfaceNamePrefix); + interfacePrivate->type = CFRetain(ioInterfaceType); + interfacePrivate->unit = CFRetain(ioInterfaceUnit); + interfacePrivate->address = CFRetain(ioMACAddress); + interfacePrivate->path = CFRetain(ioPathMatch); + interfacePrivate->name = ((userDefinedName != NULL) ? CFRetain(userDefinedName) : NULL); + interfacePrivate->localized_name = ((userDefinedName != NULL) ? CFRetain(userDefinedName) : NULL); + interfacePrivate->usb.name = ((usbProductName != NULL) ? CFRetain(usbProductName) : NULL); + interfacePrivate->usb.pid = ((idProduct != NULL) ? CFRetain(idProduct) : NULL); + interfacePrivate->usb.vid = ((idVendor != NULL) ? CFRetain(idVendor) : NULL); + + // Handling interface types to be seen in NetworkInterfaces.plist + CFIndex interfaceIndex; + + interfaceIndex = findConfiguration(type); + if (interfaceIndex != kCFNotFound) { + interfacePrivate->interface_type = *configurations[interfaceIndex].interface_type; + } + else { + interfacePrivate->interface_type = kSCNetworkInterfaceTypeEthernet; + } + + // Extracting entity type from value of interface type + if (ioInterfaceTypeNum == kInterfaceTypeEthernetValue) { + interfacePrivate->entity_type = kSCValNetInterfaceTypeEthernet; // kSCNetworkInterfaceTypeEthernet; + } + else if (ioInterfaceTypeNum == kInterfaceTypeFirewireValue) { + interfacePrivate->entity_type = kSCValNetInterfaceTypeFireWire; + } +done: + if (ioInterfaceNamePrefix != NULL) { + CFRelease(ioInterfaceNamePrefix); + } + + return (SCNetworkInterfaceRef)interfacePrivate; +} + + SCNetworkInterfaceRef _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, CFDictionaryRef interface_entity, @@ -3276,10 +3849,18 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, CFStringRef ifType; CFStringRef ifUnique; CFArrayRef matching_interfaces = NULL; + SCPreferencesRef servicePref = NULL; + Boolean useSystemInterfaces = TRUE; /* initialize runtime (and kSCNetworkInterfaceIPv4) */ pthread_once(&initialized, __SCNetworkInterfaceInitialize); + if (service != NULL) { + servicePref = ((SCNetworkServicePrivateRef)service)->prefs; + useSystemInterfaces = ((__SCPreferencesUsingDefaultPrefs(servicePref)) && + (__SCPreferencesGetLimitSCNetworkConfiguration(servicePref) == FALSE)); + } + ifType = CFDictionaryGetValue(interface_entity, kSCPropNetInterfaceType); if (ifType == NULL) { /* @@ -3287,7 +3868,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, * assumption that this is an "Ethernet" interface. If a * real interface exists with the provided interface name * then the actual type will be set accordingly. If not, we'll - * end up crafting an "Ethernet" SCNetworkInterface which + * end up crafting an "Ethernet" SCNetworkInterface that * will keep the rest of the configuration APIs happy. */ ifType = kSCValNetInterfaceTypeEthernet; @@ -3322,17 +3903,18 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, interfacePrivate = __SCNetworkInterfaceCreateCopy(NULL, kSCNetworkInterfaceLoopback, NULL, NULL); goto done; } + if (useSystemInterfaces) { + if (_SC_cfstring_to_cstring(ifDevice, bsdName, sizeof(bsdName), kCFStringEncodingASCII) == NULL) { + goto done; + } - if (_SC_cfstring_to_cstring(ifDevice, bsdName, sizeof(bsdName), kCFStringEncodingASCII) == NULL) { - goto done; - } - - matching = IOBSDNameMatching(masterPort, 0, bsdName); - if (matching == NULL) { - goto done; + matching = IOBSDNameMatching(masterPort, 0, bsdName); + if (matching == NULL) { + goto done; + } + matching_interfaces = findMatchingInterfaces(matching, processNetworkInterface, kSCNetworkInterfaceHiddenInterfaceKey); + CFRelease(matching); } - matching_interfaces = findMatchingInterfaces(matching, processNetworkInterface); - CFRelease(matching); } else if (CFEqual(ifType, kSCValNetInterfaceTypePPP)) { if (CFEqual(ifSubType, kSCValNetInterfaceSubTypePPPSerial)) { CFDictionaryRef matching; @@ -3343,21 +3925,22 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, return NULL; } - match_keys[0] = CFSTR(kIOProviderClassKey); - match_vals[0] = CFSTR(kIOSerialBSDServiceValue); - - match_keys[1] = CFSTR(kIOTTYBaseNameKey); - match_vals[1] = ifDevice; - - matching = CFDictionaryCreate(NULL, - (const void **)match_keys, - (const void **)match_vals, - sizeof(match_keys)/sizeof(match_keys[0]), - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - matching_interfaces = findMatchingInterfaces(matching, processSerialInterface); - CFRelease(matching); - + if (useSystemInterfaces) { + match_keys[0] = CFSTR(kIOProviderClassKey); + match_vals[0] = CFSTR(kIOSerialBSDServiceValue); + + match_keys[1] = CFSTR(kIOTTYBaseNameKey); + match_vals[1] = ifDevice; + + matching = CFDictionaryCreate(NULL, + (const void **)match_keys, + (const void **)match_vals, + sizeof(match_keys)/sizeof(match_keys[0]), + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + matching_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey); + CFRelease(matching); + } if (ifUnique == NULL) { CFIndex n; Boolean useDeviceName = TRUE; @@ -3377,7 +3960,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, } } - if (useDeviceName) { + if (useDeviceName && useSystemInterfaces) { if (matching_interfaces != NULL) { CFRelease(matching_interfaces); } @@ -3389,7 +3972,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, sizeof(match_keys)/sizeof(match_keys[0]), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - matching_interfaces = findMatchingInterfaces(matching, processSerialInterface); + matching_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey); CFRelease(matching); } } @@ -3501,8 +4084,8 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, } } } else if (CFDictionaryGetValueIfPresent(interface_entity, - kSCPropUserDefinedName, - (const void **)&ifName)) { + kSCPropUserDefinedName, + (const void **)&ifName)) { CFIndex i; // we don't have a unique ID but do have an interface @@ -3542,51 +4125,87 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, done : - if (interfacePrivate == NULL) { + if ((interfacePrivate == NULL) || (useSystemInterfaces == FALSE)) { /* * if device not present on this system */ + if (useSystemInterfaces == FALSE) { + if (interfacePrivate != NULL) { + CFRelease(interfacePrivate); + } + } + interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL); - interfacePrivate->entity_type = ifType; - interfacePrivate->entity_subtype = ifSubType; + interfacePrivate->entity_type = (ifType != NULL) ? ifType : NULL; + interfacePrivate->entity_subtype = (ifSubType != NULL) ? ifSubType : NULL; interfacePrivate->entity_device = (ifDevice != NULL) ? CFStringCreateCopy(NULL, ifDevice) : NULL; interfacePrivate->entity_device_unique = (ifUnique != NULL) ? CFStringCreateCopy(NULL, ifUnique) : NULL; + // Using UserDefinedName to check the validity of preferences file + // when useSystemInterfaces is FALSE + if (useSystemInterfaces == FALSE) { + CFStringRef userDefinedName = CFDictionaryGetValue(interface_entity, kSCPropUserDefinedName); + if (isA_CFString(userDefinedName) != NULL) { + CFRetain(userDefinedName); + if (interfacePrivate->name != NULL) { + CFRelease(interfacePrivate->name); + } + interfacePrivate->name = userDefinedName; + + CFRetain(userDefinedName); + if (interfacePrivate->localized_name != NULL) { + CFRelease(interfacePrivate->localized_name); + } + interfacePrivate->localized_name = userDefinedName; + } + } + if (CFEqual(ifType, kSCValNetInterfaceTypeEthernet)) { CFStringRef entity_hardware; - - entity_hardware = CFDictionaryGetValue(interface_entity, kSCPropNetInterfaceHardware); - if (isA_CFString((entity_hardware)) && - CFEqual(entity_hardware, kSCEntNetAirPort)) { - interfacePrivate->interface_type = kSCNetworkInterfaceTypeIEEE80211; - interfacePrivate->localized_key = CFSTR("airport"); - interfacePrivate->sort_order = kSortAirPort; + SCNetworkInterfaceRef virtualInterface; + + if ((useSystemInterfaces == FALSE) && + (((virtualInterface = findBridgeInterface(servicePref, ifDevice)) != NULL) || +#if !TARGET_OS_IPHONE + ((virtualInterface = findBondInterface(servicePref, ifDevice)) != NULL) || +#endif + ((virtualInterface = findVLANInterface(servicePref, ifDevice)) != NULL))) { + CFRelease(interfacePrivate); + interfacePrivate = (SCNetworkInterfacePrivateRef)virtualInterface; } else { - CFStringRef name; + entity_hardware = CFDictionaryGetValue(interface_entity, kSCPropNetInterfaceHardware); + if (isA_CFString((entity_hardware)) && + CFEqual(entity_hardware, kSCEntNetAirPort)) { + interfacePrivate->interface_type = kSCNetworkInterfaceTypeIEEE80211; + interfacePrivate->localized_key = CFSTR("airport"); + interfacePrivate->sort_order = kSortAirPort; + } else { + CFStringRef name; - interfacePrivate->interface_type = kSCNetworkInterfaceTypeEthernet; + interfacePrivate->interface_type = kSCNetworkInterfaceTypeEthernet; - name = CFDictionaryGetValue(interface_entity, kSCPropUserDefinedName); - if (_SCNetworkInterfaceMatchesName(name, CFSTR("iPhone"))) { - interfacePrivate->localized_key = CFSTR("iPhone"); - interfacePrivate->sort_order = kSortTethered; - } else if (_SCNetworkInterfaceMatchesName(name, CFSTR("iPad"))) { - interfacePrivate->localized_key = CFSTR("iPad"); - interfacePrivate->sort_order = kSortTethered; - } else if (_SCNetworkInterfaceMatchesName(name, CFSTR("thunderbolt"))) { - interfacePrivate->localized_key = CFSTR("thunderbolt"); - interfacePrivate->sort_order = kSortThunderbolt; - } else if (_SCNetworkInterfaceMatchesName(name, CFSTR("bluetooth-pan-gn"))) { - interfacePrivate->localized_key = CFSTR("bluetooth-pan-gn"); - interfacePrivate->sort_order = kSortBluetoothPAN_GN; - } else if (_SCNetworkInterfaceMatchesName(name, CFSTR("bluetooth-pan-nap"))) { - interfacePrivate->localized_key = CFSTR("bluetooth-pan-nap"); - interfacePrivate->sort_order = kSortBluetoothPAN_NAP; - } else if (_SCNetworkInterfaceMatchesName(name, CFSTR("bluetooth-pan-u"))) { - interfacePrivate->localized_key = CFSTR("bluetooth-pan-u"); - interfacePrivate->sort_order = kSortBluetoothPAN_U; - } else { - interfacePrivate->sort_order = kSortEthernet; + name = CFDictionaryGetValue(interface_entity, kSCPropUserDefinedName); + if (__SCNetworkInterfaceMatchesName(name, CFSTR("iPhone"))) { + interfacePrivate->localized_key = CFSTR("iPhone"); + interfacePrivate->sort_order = kSortTethered; + } else if (__SCNetworkInterfaceMatchesName(name, CFSTR("iPad"))) { + interfacePrivate->localized_key = CFSTR("iPad"); + interfacePrivate->sort_order = kSortTethered; + } else if (__SCNetworkInterfaceMatchesName(name, CFSTR("thunderbolt"))) { + interfacePrivate->localized_key = CFSTR("thunderbolt"); + interfacePrivate->sort_order = kSortThunderbolt; + } else if (__SCNetworkInterfaceMatchesName(name, CFSTR("bluetooth-pan-gn"))) { + interfacePrivate->localized_key = CFSTR("bluetooth-pan-gn"); + interfacePrivate->sort_order = kSortBluetoothPAN_GN; + } else if (__SCNetworkInterfaceMatchesName(name, CFSTR("bluetooth-pan-nap"))) { + interfacePrivate->localized_key = CFSTR("bluetooth-pan-nap"); + interfacePrivate->sort_order = kSortBluetoothPAN_NAP; + } else if (__SCNetworkInterfaceMatchesName(name, CFSTR("bluetooth-pan-u"))) { + interfacePrivate->localized_key = CFSTR("bluetooth-pan-u"); + interfacePrivate->sort_order = kSortBluetoothPAN_U; + } else { + interfacePrivate->sort_order = kSortEthernet; + } } } } else if (CFEqual(ifType, kSCValNetInterfaceTypeFireWire)) { @@ -3621,7 +4240,6 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, } } else { SCNetworkInterfaceRef child; - // PPTP, L2TP, ... CFRelease(interfacePrivate); child = SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4, ifSubType); @@ -3632,14 +4250,27 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, } } else if (CFEqual(ifType, kSCValNetInterfaceTypeVPN)) { SCNetworkInterfaceRef child; - CFRelease(interfacePrivate); child = SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4, ifSubType); interfacePrivate = (SCNetworkInterfacePrivateRef)child; if (interfacePrivate == NULL) { return NULL; } - } else if (CFStringFind(ifType, CFSTR("."), 0).location != kCFNotFound) { + } else if (CFEqual(ifType, kSCValNetInterfaceTypeIPSec)) { + CFRelease(interfacePrivate); + interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4, + kSCNetworkInterfaceTypeIPSec); + } else if (CFEqual(ifType, kSCValNetInterfaceType6to4)) { + CFRelease(interfacePrivate); + if (!isA_CFString(ifDevice)) { + return NULL; + } + interfacePrivate = (SCNetworkInterfacePrivateRef)SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4, + kSCNetworkInterfaceType6to4); + } else if (CFEqual(ifType, kSCValNetInterfaceTypeLoopback)) { + CFRelease(interfacePrivate); + interfacePrivate = __SCNetworkInterfaceCreateCopy(NULL, kSCNetworkInterfaceLoopback, NULL, NULL); + } else if (CFStringFind(ifType, CFSTR("."), 0).location != kCFNotFound) { // if vendor interface if (vendor_interface_types == NULL) { vendor_interface_types = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); @@ -3696,7 +4327,6 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, __SCNetworkInterfaceSetService(member, service); } } - // set prefs & serviceID to VLAN pyhsical interface if (CFEqual(interfacePrivate->interface_type, kSCNetworkInterfaceTypeVLAN)) { SCNetworkInterfaceRef vlan_physical; @@ -3744,7 +4374,7 @@ __SCNetworkInterfaceCopyAll_IONetworkInterface(void) // get Ethernet, Firewire, Thunderbolt, and AirPort interfaces matching = IOServiceMatching(kIONetworkInterfaceClass); - new_interfaces = findMatchingInterfaces(matching, processNetworkInterface); + new_interfaces = findMatchingInterfaces(matching, processNetworkInterface, kSCNetworkInterfaceHiddenInterfaceKey); CFRelease(matching); return new_interfaces; @@ -3772,7 +4402,7 @@ __SCNetworkInterfaceCopyAll_Modem() sizeof(match_keys)/sizeof(match_keys[0]), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - new_interfaces = findMatchingInterfaces(matching, processSerialInterface); + new_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey); CFRelease(matching); return new_interfaces; @@ -3800,7 +4430,7 @@ __SCNetworkInterfaceCopyAll_RS232() sizeof(match_keys)/sizeof(match_keys[0]), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - new_interfaces = findMatchingInterfaces(matching, processSerialInterface); + new_interfaces = findMatchingInterfaces(matching, processSerialInterface, kSCNetworkInterfaceHiddenPortKey); CFRelease(matching); return new_interfaces; @@ -4442,6 +5072,26 @@ SCNetworkInterfaceGetExtendedConfiguration(SCNetworkInterfaceRef interface, } +__private_extern__ +CFStringRef +__SCNetworkInterfaceGetEntityType(SCNetworkInterfaceRef interface) +{ + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + return interfacePrivate->entity_type; +} + + +__private_extern__ +CFStringRef +__SCNetworkInterfaceGetEntitySubType(SCNetworkInterfaceRef interface) +{ + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef) interface; + + return interfacePrivate->entity_subtype; +} + + CFStringRef SCNetworkInterfaceGetBSDName(SCNetworkInterfaceRef interface) { @@ -4673,6 +5323,45 @@ __SCNetworkInterfaceCopyXNonLocalizedDisplayName(SCNetworkInterfaceRef interface } #endif // !TARGET_OS_IPHONE +__private_extern__ +void +__SCNetworkInterfaceSetUserDefinedName(SCNetworkInterfaceRef interface, CFStringRef name) +{ + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + if (!isA_SCNetworkInterface(interface)) { + return; + } + if (name != NULL) { + CFRetain(name); + } + if (interfacePrivate->name != NULL) { + CFRelease(interfacePrivate->name); + } + interfacePrivate->name = name; + + if (name != NULL) { + CFRetain(name); + } + if (interfacePrivate->localized_name != NULL) { + CFRelease(interfacePrivate->localized_name); + } + interfacePrivate->localized_name = name; +} + +__private_extern__ +CFStringRef +__SCNetworkInterfaceGetUserDefinedName(SCNetworkInterfaceRef interface) +{ + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + if (!isA_SCNetworkInterface(interface)) { + return NULL; + } + + return interfacePrivate->name; +} + __private_extern__ CFStringRef @@ -6171,9 +6860,9 @@ _SCNetworkInterfaceCreateWithIONetworkInterfaceObject(io_object_t if_obj) pthread_once(&initialized, __SCNetworkInterfaceInitialize); if (IOObjectConformsTo(if_obj, kIONetworkInterfaceClass)) { - interface = createInterface(if_obj, processNetworkInterface); + interface = createInterface(if_obj, processNetworkInterface, NULL); } else if (IOObjectConformsTo(if_obj, kIOSerialBSDServiceValue)) { - interface = createInterface(if_obj, processSerialInterface); + interface = createInterface(if_obj, processSerialInterface, kSCNetworkInterfaceHiddenPortKey); } return interface; @@ -6243,6 +6932,16 @@ _SCNetworkInterfaceGetIORegistryEntryID(SCNetworkInterfaceRef interface) } +__private_extern__ +Boolean +__SCNetworkInterfaceIsActive (SCNetworkInterfaceRef interface) +{ + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + return interfacePrivate->active; +} + + Boolean _SCNetworkInterfaceIsBuiltin(SCNetworkInterfaceRef interface) { @@ -6269,7 +6968,9 @@ _SCNetworkInterfaceCopyBTPANInterface(void) dict = SCDynamicStoreCopyValue(NULL, key); CFRelease(key); if (dict != NULL) { - CFStringRef if_name; + CFDataRef addr; + CFStringRef if_name; + SCNetworkInterfacePrivateRef interfacePrivate; if (isA_CFDictionary(dict) && CFDictionaryGetValueIfPresent(dict, @@ -6295,6 +6996,17 @@ _SCNetworkInterfaceCopyBTPANInterface(void) CFRelease(entity); } + interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + if ((interfacePrivate != NULL) && + (interfacePrivate->address == NULL) && + CFDictionaryGetValueIfPresent(dict, + CFSTR("_" BT_PAN_MAC "_"), + (const void **)&addr) && + isA_CFData(addr)) { + interfacePrivate->address = CFRetain(addr); + } + CFRelease(dict); } @@ -6541,6 +7253,9 @@ __SCNetworkInterfaceCreateCopy(CFAllocatorRef allocator, if (oldPrivate->name != NULL) { newPrivate->name = CFRetain(oldPrivate->name); } + if (oldPrivate->prefix != NULL) { + newPrivate->prefix = CFRetain(oldPrivate->prefix); + } if (oldPrivate->localized_name != NULL) { newPrivate->localized_name = CFRetain(oldPrivate->localized_name); } @@ -6844,117 +7559,235 @@ _SCNetworkInterfaceCopyActive(SCDynamicStoreRef store, CFStringRef bsdName) } +#if !TARGET_IPHONE_SIMULATOR SCNetworkServicePrimaryRank SCNetworkInterfaceGetPrimaryRank(SCNetworkInterfaceRef interface) { - CFDictionaryRef entity; - SCNetworkInterfacePrivateRef interfacePrivate = - (SCNetworkInterfacePrivateRef)interface; - CFStringRef ifName; - Boolean ok = FALSE; - CFStringRef path; - SCNetworkServicePrimaryRank rank = kSCNetworkServicePrimaryRankDefault; - SCDynamicStoreRef session; - - ifName = SCNetworkInterfaceGetBSDName(interface); - if ((ifName == NULL) || (interfacePrivate->store == NULL)) { - _SCErrorSet(kSCStatusInvalidArgument); - return rank; - } - - session = interfacePrivate->store; + IPMonitorControlRef control; + SCNetworkInterfacePrivateRef interfacePrivate = + (SCNetworkInterfacePrivateRef)interface; + SCNetworkServicePrimaryRank rank = kSCNetworkServicePrimaryRankDefault; - path = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, - kSCDynamicStoreDomainState, - ifName, - kSCEntNetService); - entity = SCDynamicStoreCopyValue(session, path); - CFRelease(path); + control = interfacePrivate->IPMonitorControl; + if (control != NULL) { + CFStringRef ifName; - if (entity != NULL) { - if (isA_CFDictionary(entity)) { - CFStringRef rankStr = - CFDictionaryGetValue(entity, kSCPropNetServicePrimaryRank); - ok = __str_to_rank(rankStr, &rank); + ifName = SCNetworkInterfaceGetBSDName(interface); + if (ifName != NULL) { + rank = IPMonitorControlGetInterfacePrimaryRank(control, + ifName); + } + else { + _SCErrorSet(kSCStatusInvalidArgument); } - CFRelease(entity); - } - - if (!ok) { - rank = kSCNetworkServicePrimaryRankDefault; - _SCErrorSet(kSCStatusInvalidArgument); - } else if (rank == kSCNetworkServicePrimaryRankDefault) { - _SCErrorSet(kSCStatusOK); } - - return (rank); + return rank; } Boolean SCNetworkInterfaceSetPrimaryRank(SCNetworkInterfaceRef interface, SCNetworkServicePrimaryRank newRank) { - CFDictionaryRef entity; + IPMonitorControlRef control; SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; CFStringRef ifName; - CFMutableDictionaryRef newEntity; - Boolean ok = TRUE; - CFStringRef path = NULL; - CFStringRef rankStr; - SCDynamicStoreRef session; ifName = SCNetworkInterfaceGetBSDName(interface); - if ((ifName == NULL) || (interfacePrivate->store == NULL)) { + if (ifName == NULL) { _SCErrorSet(kSCStatusInvalidArgument); - return FALSE; + return (FALSE); } + control = interfacePrivate->IPMonitorControl; + if (control == NULL) { + control = IPMonitorControlCreate(); + if (control == NULL) { + _SCErrorSet(kSCStatusFailed); + return (FALSE); + } + interfacePrivate->IPMonitorControl = control; + } + return IPMonitorControlSetInterfacePrimaryRank(control, + ifName, + newRank); +} +#else // !TARGET_IPHONE_SIMULATOR - session = interfacePrivate->store; +SCNetworkServicePrimaryRank +SCNetworkInterfaceGetPrimaryRank(SCNetworkInterfaceRef interface) +{ + return (kSCNetworkServicePrimaryRankDefault); +} - ok = __rank_to_str(newRank, &rankStr); - if (!ok) { - _SCErrorSet(kSCStatusInvalidArgument); - return FALSE; +Boolean +SCNetworkInterfaceSetPrimaryRank(SCNetworkInterfaceRef interface, + SCNetworkServicePrimaryRank newRank) +{ + _SCErrorSet(kSCStatusInvalidArgument); + return (FALSE); +} + +#endif // !TARGET_IPHONE_SIMULATOR + + +__private_extern__ +CFArrayRef // SCNetworkInterfaceRef +__SCNetworkInterfaceCopyStoredWithPreferences (SCPreferencesRef ni_prefs) +{ + CFMutableArrayRef interfaceList = NULL; + CFArrayRef if_list; + SCNetworkInterfaceRef interfaceNamer = NULL; + CFStringRef defaultNetworkInterfacePath = NULL; + + /* initialize runtime */ + pthread_once(&initialized, __SCNetworkInterfaceInitialize); + + if (ni_prefs == NULL) { + defaultNetworkInterfacePath = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS); + ni_prefs = SCPreferencesCreate(NULL, CFSTR("SCNetworkInterface"), defaultNetworkInterfacePath); } - path = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, - kSCDynamicStoreDomainState, - ifName, - kSCEntNetService); + if_list = SCPreferencesGetValue(ni_prefs, INTERFACES); - entity = SCDynamicStoreCopyValue(session, path); - if (entity != NULL) { - if (!isA_CFDictionary(entity)) { - CFRelease(entity); - _SCErrorSet(kSCStatusFailed); - goto done; + if (isA_CFArray(if_list) != NULL) { + CFIndex i; + CFIndex n = CFArrayGetCount(if_list); + + interfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + for (i = 0; i < n; i++) { + CFDictionaryRef dict; + + dict = CFArrayGetValueAtIndex(if_list, i); + if (isA_CFDictionary(dict) != NULL) { + interfaceNamer = __SCNetworkInterfaceCreateWithStorageEntity(NULL, dict, ni_prefs); + + if (interfaceNamer != NULL) { + CFArrayAppendValue(interfaceList, interfaceNamer); + CFRelease(interfaceNamer); + } + } } - newEntity = CFDictionaryCreateMutableCopy(NULL, 0, entity); - CFRelease(entity); - } else { - newEntity = CFDictionaryCreateMutable(NULL, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); } - if (rankStr != NULL) { - CFDictionarySetValue(newEntity, kSCPropNetServicePrimaryRank, rankStr); - } else { - CFDictionaryRemoveValue(newEntity, kSCPropNetServicePrimaryRank); + if (defaultNetworkInterfacePath != NULL) { + CFRelease(defaultNetworkInterfacePath); + // prefs were created in the function, and hence need to be released + CFRelease(ni_prefs); } + return interfaceList; +} - if (CFDictionaryGetCount(newEntity) > 0) { - ok = SCDynamicStoreSetValue(session, path, newEntity); - } else { - ok = SCDynamicStoreRemoveValue(session, path); + +__private_extern__ +Boolean +__SCNetworkInterfaceSaveStoredWithPreferences(SCPreferencesRef prefs, CFArrayRef interfacesToSave) +{ + CFStringRef defaultNetworkInterfacePath = NULL; + Boolean success = FALSE; + + if (prefs == NULL) { // TODO: Get the default preferences on the system + defaultNetworkInterfacePath = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS); + prefs = SCPreferencesCreate(NULL, CFSTR("SCNetworkInterface"), defaultNetworkInterfacePath); } - CFRelease(newEntity); + if (isA_CFArray(interfacesToSave) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("interfacesToSave is NULL or not of correct type")); + goto done; + } + SCPreferencesSetValue(prefs, INTERFACES, interfacesToSave); + success = TRUE; +done: + if (defaultNetworkInterfacePath != NULL) { + CFRelease(defaultNetworkInterfacePath); + // prefs were created in the function, and hence need to be released + CFRelease(prefs); + } - done : + return success; +} - if (path != NULL) CFRelease(path); - return ok; +__private_extern__ +SCNetworkInterfaceRef +__SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(CFAllocatorRef allocator, SCPreferencesRef ni_prefs, CFStringRef bsdName) +{ + CFArrayRef if_list; + SCNetworkInterfaceRef interface = NULL; + CFStringRef defaultNetworkInterfacePath; + + /* initialize runtime */ + pthread_once(&initialized, __SCNetworkInterfaceInitialize); + + if (ni_prefs == NULL) { + defaultNetworkInterfacePath = CFStringCreateWithFormat(allocator, NULL, CFSTR("%@/%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS); + ni_prefs = SCPreferencesCreate(allocator, CFSTR("SCNetworkInterface"), defaultNetworkInterfacePath); + CFRelease(defaultNetworkInterfacePath); + } + else { + CFRetain(ni_prefs); + } + + if_list = SCPreferencesGetValue(ni_prefs, INTERFACES); + + if (isA_CFArray(if_list) != NULL) { + CFIndex idx; + CFIndex count = CFArrayGetCount(if_list); + + for (idx = 0; idx < count; idx++) { + CFDictionaryRef dict; + CFStringRef tmp_bsdName; + + dict = CFArrayGetValueAtIndex(if_list, idx); + if (isA_CFDictionary(dict) == NULL) { + continue; + } + + tmp_bsdName = CFDictionaryGetValue(dict, CFSTR(kSCNetworkInterfaceBSDName)); + if (tmp_bsdName == NULL) { + continue; + } + if (CFEqual(bsdName, tmp_bsdName) == TRUE) { + interface = __SCNetworkInterfaceCreateWithStorageEntity(allocator, dict, ni_prefs); + break; + } + } + } + + CFRelease(ni_prefs); + return interface; +} + +__private_extern__ +CFDictionaryRef +__SCNetworkInterfaceCreateMappingUsingBSDName(CFArrayRef interfaces) +{ + CFMutableDictionaryRef mappingBSDToInterface = NULL; + CFStringRef bsdName = NULL; + SCNetworkInterfaceRef interface = NULL; + CFIndex count; + + count = CFArrayGetCount(interfaces); + + if (count == 0) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateMappingUsingBSDName: Interface count is 0")); + return NULL; + } + mappingBSDToInterface = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + for (CFIndex idx = 0; idx < count; idx++) { + interface = (SCNetworkInterfaceRef) CFArrayGetValueAtIndex(interfaces, idx); + + bsdName = SCNetworkInterfaceGetBSDName(interface); + if (isA_CFString(bsdName) == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateMappingUsingBSDName: BSDName is NULL or not of the correct type")); + continue; + } + CFDictionaryAddValue(mappingBSDToInterface, bsdName, interface); + } + if (CFDictionaryGetCount(mappingBSDToInterface) == 0) { + CFRelease(mappingBSDToInterface); + mappingBSDToInterface = NULL; + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkInterfaceCreateMappingUsingBSDName: Setting mappingBSDToInterface to NULL since it doesn't contain any data")); + } + + return mappingBSDToInterface; } diff --git a/SystemConfiguration.fproj/SCNetworkMigration.c b/SystemConfiguration.fproj/SCNetworkMigration.c new file mode 100644 index 0000000..b56c246 --- /dev/null +++ b/SystemConfiguration.fproj/SCNetworkMigration.c @@ -0,0 +1,3683 @@ +/* + * Copyright (c) 2014 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +// +// SCNetworkMigration.c +// +// Created by Ashish Kulkarni on 11/19/13. +// +// + +#include +#include +#include +#include +#include +#include "SCPreferencesInternal.h" +#include +#include +#include +#include +#include +#include +#include + +#define BACK_TO_MY_MAC CFSTR("BackToMyMac") +#define BACK_TO_MY_MAC_DSIDS CFSTR("BackToMyMacDSIDs") +#define PREFS_DEFAULT_DIR_PLIST "/Library/Preferences/SystemConfiguration" +#define PREFS_DEFAULT_DIR_RELATIVE CFSTR("Library/Preferences/SystemConfiguration/") +#define PREFS_DEFAULT_CONFIG_PLIST "preferences.plist" +#define NETWORK_INTERFACES_PREFS_PLIST "NetworkInterfaces.plist" +#define NUM_MIGRATION_PATHS 2 +#define PLUGIN_ID CFSTR("System Migration") +#define PREFERENCES_PLIST_INDEX 0 +#define NETWORK_INTERFACES_PLIST_INDEX 1 + + +const CFStringRef kSCNetworkConfigurationMigrationActionKey = CFSTR("MigrationActionKey"); +const CFStringRef kSCNetworkConfigurationRepair = CFSTR("ConfigurationRepair"); +#if !TARGET_OS_IPHONE +static CFDictionaryRef +_SCNetworkMigrationCopyMappingBSDNameToBridgeServices(SCPreferencesRef prefs); + +static CFDictionaryRef +_SCNetworkMigrationCopyMappingBSDNameToBondServices(SCPreferencesRef prefs); + +static CFDictionaryRef +_SCNetworkMigrationCopyMappingBSDNameToVLANServices(SCPreferencesRef prefs); +#endif +static Boolean +_SCNetworkConfigurationIsInterfaceNamerMappable(SCNetworkInterfaceRef interface1, SCNetworkInterfaceRef interface2, Boolean bypassActive); + +static Boolean +_SCNetworkConfigurationMigrateConfiguration(CFURLRef sourceDir, CFURLRef targetDir); + +static void +_SCNetworkConfigurationCopyMigrationPathsWithBaseURL(CFURLRef baseURL, CFURLRef *prefs, CFURLRef *interfaces) +{ + if (baseURL != NULL) { + CFRetain(baseURL); + } + else { + baseURL = CFURLCreateFromFileSystemRepresentation(NULL, + (UInt8*)PREFS_DEFAULT_DIR_PLIST, + sizeof(PREFS_DEFAULT_DIR_PLIST), + TRUE); + } + + *prefs = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, + (UInt8*)PREFS_DEFAULT_CONFIG_PLIST, + sizeof(PREFS_DEFAULT_CONFIG_PLIST) - 1, + FALSE, baseURL); + + *interfaces = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, + (UInt8*)NETWORK_INTERFACES_PREFS_PLIST, + sizeof(NETWORK_INTERFACES_PREFS_PLIST) - 1, + FALSE, baseURL); + CFRelease(baseURL); + return; +} + +CFArrayRef +_SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options) +{ + CFURLRef interfaces; + CFMutableArrayRef migrationPaths = NULL; + CFURLRef prefs; + + if (getenv(INSTALL_ENVIRONMENT) != NULL) { + _sc_debug = 1; + } + _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(NULL, &prefs, &interfaces); + + migrationPaths = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFArrayInsertValueAtIndex(migrationPaths, PREFERENCES_PLIST_INDEX, prefs); + CFArrayInsertValueAtIndex(migrationPaths, NETWORK_INTERFACES_PLIST_INDEX, interfaces); + + CFRelease(prefs); + CFRelease(interfaces); + return migrationPaths; +} + +static Boolean +_SCNetworkConfigurationRemoveConfigurationFiles(CFURLRef configDir) +{ + + char configPathString[PATH_MAX]; + CFURLRef configPathURL = NULL; + char configNetworkInterfacesPathString[PATH_MAX]; + CFURLRef configNetworkInterfacesPathURL = NULL; + + _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(configDir, &configPathURL, &configNetworkInterfacesPathURL); + + if(CFURLGetFileSystemRepresentation(configPathURL, TRUE, (UInt8*)configPathString, sizeof(configPathString)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: configPathString is NULL")); + } + else { + if (remove(configPathString) != 0) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: Removing file failed from: %s. Error is %d"), configPathString, errno); + } + } + + if(CFURLGetFileSystemRepresentation(configNetworkInterfacesPathURL, TRUE, (UInt8*)configNetworkInterfacesPathString, sizeof(configNetworkInterfacesPathString)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: configNetwork")); + } + else { + if (remove(configNetworkInterfacesPathString) != 0) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationRemoveConfigurationFiles: Removing file failed from: %s. Error is %d"), configNetworkInterfacesPathString, errno); + } + } + + if (configPathURL != NULL) { + CFRelease(configPathURL); + } + if (configNetworkInterfacesPathURL != NULL) { + CFRelease(configNetworkInterfacesPathURL); + } + + return TRUE; +} + +static Boolean +SCNetworkConfigurationCopyConfigurationFiles(CFURLRef configDir, + CFURLRef targetDir) // TargetDir needs to exist +{ + errno_t error; + mode_t mode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; + char networkInterfacesPathString[PATH_MAX]; + CFURLRef networkInterfacesPathURL = NULL; + copyfile_state_t networkInterfacesState; + char preferencesPathString[PATH_MAX]; + CFURLRef preferencesPathURL = NULL; + Boolean removeTargetFiles = FALSE; + copyfile_state_t state; + Boolean success = FALSE; + char targetNetworkInterfacesPathString[PATH_MAX]; + CFURLRef targetNetworkInterfacesPathURL = NULL; + char targetPathString[PATH_MAX]; + CFURLRef targetPathURL = NULL; + + _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(targetDir, &targetPathURL, &targetNetworkInterfacesPathURL); + + if (CFURLGetFileSystemRepresentation(targetPathURL, TRUE, (UInt8*)targetPathString, sizeof(targetPathString)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: targetPathString is NULL")); + goto done; + } + + if (CFURLGetFileSystemRepresentation(targetNetworkInterfacesPathURL, TRUE, (UInt8*)targetNetworkInterfacesPathString, sizeof(targetNetworkInterfacesPathString)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: targetNetworkInterfacesPathString is NULL")); + goto done; + } + + if (configDir == NULL) { + removeTargetFiles = TRUE; + success = TRUE; + goto done; + } + _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(configDir, &preferencesPathURL, &networkInterfacesPathURL); + + if (CFURLGetFileSystemRepresentation(preferencesPathURL, TRUE, (UInt8*)preferencesPathString, sizeof(preferencesPathString)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: preferencesPathString is NULL")); + goto done; + } + + + if (CFURLGetFileSystemRepresentation(networkInterfacesPathURL, TRUE, (UInt8*)networkInterfacesPathString, sizeof(networkInterfacesPathString)) == FALSE) { + SCLog(_sc_debug, LOG_DEBUG, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: networkInterfacePathString is NULL")); + goto done; + } + + state = copyfile_state_alloc(); + if ((error = copyfile(preferencesPathString, targetPathString, state, COPYFILE_ALL)) != 0) { + SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: Copying failed from:%s to %s. Error is %d"), preferencesPathString, targetPathString, errno); + copyfile_state_free(state); + removeTargetFiles = TRUE; + goto done; + } + copyfile_state_free(state); + chmod(targetPathString, mode); + + networkInterfacesState = copyfile_state_alloc(); + if ((error = copyfile(networkInterfacesPathString, targetNetworkInterfacesPathString, networkInterfacesState, COPYFILE_ALL)) != 0) { + SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkConfigurationCopyConfigurationFiles: Copying failed from:%s to %s. Error is %d"), networkInterfacesPathString, targetNetworkInterfacesPathString, errno); + copyfile_state_free(networkInterfacesState); + removeTargetFiles = TRUE; + goto done; + } + copyfile_state_free(networkInterfacesState); + chmod(targetNetworkInterfacesPathString, mode); + + success = TRUE; +done: + if (removeTargetFiles == TRUE) { + _SCNetworkConfigurationRemoveConfigurationFiles(targetDir); + } + if (preferencesPathURL != NULL) { + CFRelease(preferencesPathURL); + } + if (networkInterfacesPathURL != NULL) { + CFRelease(networkInterfacesPathURL); + } + if (targetPathURL != NULL) { + CFRelease(targetPathURL); + } + if (targetNetworkInterfacesPathURL != NULL) { + CFRelease(targetNetworkInterfacesPathURL); + } + return success; +} + + +/* ----------------------------------------------------------------------------- + Create directories and intermediate directories as required. + ----------------------------------------------------------------------------- */ +static Boolean +_SCNetworkConfigurationMakePathIfNeeded(CFURLRef pathURL) +{ + char *c; + mode_t newmask; + char path[PATH_MAX]; + char thepath[PATH_MAX]; + CFIndex slen=0; + struct stat sb; + Boolean success = FALSE; + + if (CFURLGetFileSystemRepresentation(pathURL, TRUE, (UInt8 *)path, sizeof(path)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMakePathIfNeeded: Could not get character array from target string")); + return success; + } + SCLog(TRUE, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMakePathIfNeeded: Creating path: %s"), path); + + newmask = S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH; + + slen = strlen(path); + + strlcpy( thepath, path, slen+1); + c = thepath; + if ( *c == '/' ) + c++; + for( ; !success; c++){ + if ( (*c == '/') || ( *c == '\0' )){ + if ( *c == '\0' ) + success = TRUE; + else + *c = '\0'; + if ( mkdir( thepath, newmask) ){ + if ( errno == EEXIST || errno == EISDIR){ + if ( stat(thepath, &sb) < 0){ + printf("stat returned value < 0\n"); + break; + } + } else { + printf("received error: %s\n", strerror(errno)); + break; + } + } + *c = '/'; + } + } + return success; +} + +static SCPreferencesRef +__SCNetworkCreateDefaultPref(CFStringRef prefsID) +{ + SCPreferencesRef prefs; + SCNetworkSetRef currentSet; + CFStringRef model; + + prefs = SCPreferencesCreate(NULL, PLUGIN_ID, prefsID); + if (prefs == NULL) { + return NULL; + } + + currentSet = SCNetworkSetCopyCurrent(prefs); + if (currentSet == NULL) { + CFBundleRef bundle; + CFStringRef setName = NULL; + + currentSet = SCNetworkSetCreate(prefs); + bundle = _SC_CFBundleGet(); + if (bundle != NULL) { + setName = CFBundleCopyLocalizedString(bundle, + CFSTR("DEFAULT_SET_NAME"), + CFSTR("Automatic"), + NULL); + } + SCNetworkSetSetName(currentSet, (setName != NULL) ? setName : CFSTR("Automatic")); + SCNetworkSetSetCurrent(currentSet); + if (setName != NULL) { + CFRelease(setName); + } + } + SCNetworkSetEstablishDefaultConfiguration(currentSet); + CFRelease(currentSet); + + model = SCPreferencesGetValue(prefs, MODEL); + if (model == NULL) { + model = _SC_hw_model(FALSE); + SCPreferencesSetValue(prefs, MODEL, model); + } + + return prefs; +} + +__private_extern__ +SCPreferencesRef +__SCNetworkCreateDefaultNIPrefs(CFStringRef prefsID) +{ + CFMutableArrayRef interfaces = NULL; + CFStringRef model; + CFArrayRef networkInterfaces; + SCPreferencesRef ni_prefs; + CFComparisonResult res; + + + networkInterfaces = __SCNetworkInterfaceCopyAll_IONetworkInterface(); + + if (networkInterfaces == NULL) { + return NULL; + } + if (prefsID == NULL) { + prefsID = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), PREFS_DEFAULT_DIR, NETWORK_INTERFACES_PREFS); + } + else { + CFRetain(prefsID); + } + + ni_prefs = SCPreferencesCreate(NULL, PLUGIN_ID , prefsID); + CFRelease(prefsID); + + if (ni_prefs == NULL) { + goto done; + } + + interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex idx = 0; idx < CFArrayGetCount(networkInterfaces); idx++) { + CFIndex idx2 = 0; + CFNumberRef if_type; + CFNumberRef if_unit; + SCNetworkInterfaceRef interface = CFArrayGetValueAtIndex(networkInterfaces, idx); + CFDictionaryRef interfaceEntity = __SCNetworkInterfaceCopyStorageEntity(interface); + + if (interfaceEntity == NULL) { + continue; + } + + if_type = _SCNetworkInterfaceGetIOInterfaceType(interface); + if_unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface); + + if ((if_type == NULL) || (if_unit == NULL)) { + CFRelease(interfaceEntity); + continue; + } + + for (idx2 = 0; idx2 < CFArrayGetCount(interfaces); idx2++) { + CFNumberRef db_type; + CFNumberRef db_unit; + CFDictionaryRef dict = CFArrayGetValueAtIndex(interfaces, idx2); + + db_type = CFDictionaryGetValue(dict, CFSTR(kIOInterfaceType)); + db_unit = CFDictionaryGetValue(dict, CFSTR(kIOInterfaceUnit)); + res = CFNumberCompare(if_type, db_type, NULL); + if (res == kCFCompareLessThan + || (res == kCFCompareEqualTo + && (CFNumberCompare(if_unit, db_unit, NULL) == kCFCompareLessThan))) { + break; + } + } + + CFArrayInsertValueAtIndex(interfaces, idx2, interfaceEntity); + CFRelease(interfaceEntity); + + } + SCPreferencesSetValue(ni_prefs, INTERFACES, interfaces); + + model = SCPreferencesGetValue(ni_prefs, MODEL); + if (model == NULL) { + model = _SC_hw_model(FALSE); + SCPreferencesSetValue(ni_prefs, MODEL, model); + } +done: + if (interfaces != NULL) { + CFRelease(interfaces); + } + if (networkInterfaces != NULL) { + CFRelease(networkInterfaces); + } + + return ni_prefs; +} + + +/* + * _SCNetworkConfigurationPerformMigration will migrate configuration between source and destination systems + */ +CF_RETURNS_RETAINED +CFArrayRef +_SCNetworkConfigurationPerformMigration(CFURLRef sourceDir, CFURLRef currentDir, CFURLRef targetDir, CFDictionaryRef options) +{ + CFURLRef currentDirConfig = NULL; + CFURLRef currentSystemPath = NULL; + Boolean migrationComplete = FALSE; + CFArrayRef paths = NULL; + Boolean removeTargetOnFailure = FALSE; + CFURLRef sourceDirConfig = NULL; + CFURLRef targetDirConfig = NULL; + + if (getenv(INSTALL_ENVIRONMENT) != NULL) { + _sc_debug = 1; + } + + // Both sourceDir and currentDir cannot be NULL because NULL value indicates using current system + if (sourceDir == NULL && currentDir == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Both sourceDir and currentDir are NULL")); + goto done; + } + + currentSystemPath = CFURLCreateWithString(NULL, + PREFS_DEFAULT_DIR, + NULL); + + // if either of the sourceDir or currentDir are NULL, then populate it with current system path + if (sourceDir == NULL) { + sourceDirConfig = CFRetain(currentSystemPath); + } + else { + sourceDirConfig = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, sourceDir); + } + + if (currentDir != NULL) { + currentDirConfig = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, currentDir); + } + // If the targetDir is not provided then migration will take place in currentDir + if (targetDir == NULL) { + targetDirConfig = CFRetain(currentSystemPath); + } + else { + targetDirConfig = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, targetDir); + } + // Source directory cannot be the same as Target Directory + if (CFEqual(sourceDirConfig, targetDirConfig)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Source directory cannot be the same as target directory")); + goto done; + } + + if ((currentDirConfig == NULL) || (CFEqual(currentDirConfig, targetDirConfig) == FALSE)) { + if (_SCNetworkConfigurationMakePathIfNeeded(targetDirConfig) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Could not create target directory as expected")); + goto done; + } + + if (SCNetworkConfigurationCopyConfigurationFiles(currentDirConfig, targetDirConfig) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: Could not copy configuration files from %@ to %@"), + currentDirConfig, targetDirConfig); + } + else if (currentDirConfig != NULL) { + removeTargetOnFailure = TRUE; // Configuration files were copied over to target directory + // If migration failed, then we should remove those configuration + // files since current directory and target directory are not + // the same + } + } + + // If both source and current configurations point to current system, then no migration needs to be done. + if ((currentDirConfig != NULL) && (CFEqual(sourceDirConfig, currentDirConfig) == TRUE)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationPerformMigration: both source and current configurations point to same path ... No migration needs to be done")); + migrationComplete = TRUE; + } + else { + migrationComplete = _SCNetworkConfigurationMigrateConfiguration(sourceDirConfig, targetDirConfig); + } + SCLog(TRUE, LOG_NOTICE, CFSTR("Migration %s"), migrationComplete ? "complete" : "failed"); + if (migrationComplete == TRUE) { + paths = _SCNetworkConfigurationCopyMigrationPaths(NULL); + } + else { + // If migration fails, then remove configuration files from target config if they are + // copied from the current directory + if (removeTargetOnFailure == TRUE) { + _SCNetworkConfigurationRemoveConfigurationFiles(targetDirConfig); + } + } +done: + if (currentDirConfig != NULL) { + CFRelease(currentDirConfig); + } + if (currentSystemPath != NULL) { + CFRelease(currentSystemPath); + } + if (sourceDirConfig != NULL) { + CFRelease(sourceDirConfig); + } + if (targetDirConfig != NULL) { + CFRelease(targetDirConfig); + } + return paths; +} + +static Boolean +_SCNetworkConfigurationMigrateIsFilePresent(CFURLRef filePath) +{ + Boolean fileExists = false; + char filePathStr[PATH_MAX]; + int statResult = 0; + struct stat statStruct = {0, }; + + if (filePath == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateIsFilePresent: filePath is NULL")); + goto done; + } + + if (CFURLGetFileSystemRepresentation(filePath, TRUE, (UInt8*) filePathStr, sizeof(filePathStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateIsFilePresent: Couldn't get file system representation\n")); + goto done; + } + + statResult = stat(filePathStr, &statStruct); + + if (statResult == 0) { + fileExists = TRUE; + } +done: + return fileExists; +} + +static Boolean +__SCNetworkConfigurationMigrateConfigurationFilesPresent(CFURLRef baseURL, CFArrayRef* migrationPaths) +{ + Boolean configFilesPresent = FALSE; + CFIndex count; + CFURLRef filePath = NULL; + CFURLRef interfaces; + CFMutableArrayRef migrationPathsMutable = NULL; + CFURLRef prefs; + + if (baseURL == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("__SCNetworkConfigurationMigrateConfigurationFilesPresent: baseURL is NULL")); + goto done; + } + + _SCNetworkConfigurationCopyMigrationPathsWithBaseURL(baseURL, &prefs, &interfaces); + + migrationPathsMutable = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + CFArrayInsertValueAtIndex(migrationPathsMutable, PREFERENCES_PLIST_INDEX, prefs); + CFArrayInsertValueAtIndex(migrationPathsMutable, NETWORK_INTERFACES_PLIST_INDEX, interfaces); + + CFRelease(prefs); + CFRelease(interfaces); + + *migrationPaths = migrationPathsMutable; + + if ((*migrationPaths == NULL) || + ((count = CFArrayGetCount(*migrationPaths)) == 0)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("__SCNetworkConfigurationMigrateConfigurationFilesPresent: migrationPath is NULL or number of elements in migrationPath array is 0")); + goto done; + } + + for (CFIndex idx = 0; idx < count; idx++) { + filePath = CFArrayGetValueAtIndex(*migrationPaths, idx); + if (_SCNetworkConfigurationMigrateIsFilePresent(filePath) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("__SCNetworkConfigurationMigrateConfigurationFilesPresent: File not present: %@"), filePath); + goto done; + } + } + + configFilesPresent = TRUE; // all necessary configuration files present +done: + return configFilesPresent; +} + + +static CFMutableArrayRef +_SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences (SCPreferencesRef ni_prefs, Boolean isBuiltin) +{ + CFIndex count = 0; + SCNetworkInterfaceRef interface; + CFArrayRef interfaceList = NULL; + CFMutableArrayRef resultInterfaceList = NULL; + + interfaceList = __SCNetworkInterfaceCopyStoredWithPreferences(ni_prefs); + if (interfaceList == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences: interfaceList is NULL")); + goto done; + } + + count = CFArrayGetCount(interfaceList); + if (count > 0) { + resultInterfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + + for (CFIndex i = 0; i < count; i++) { + interface = CFArrayGetValueAtIndex(interfaceList, i); + + if (_SCNetworkInterfaceIsBuiltin(interface) == isBuiltin) { + CFArrayAppendValue(resultInterfaceList, interface); + } + } + +done: + if (interfaceList != NULL) { + CFRelease(interfaceList); + } + return resultInterfaceList; +} + +static CFMutableDictionaryRef +_SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType(SCPreferencesRef ni_prefs) +{ + CFNumberRef cfMaxUnit; + CFIndex count = 0; + CFArrayRef ifList = NULL; + SCNetworkInterfaceRef interface; + CFMutableDictionaryRef InterfaceTypeToMaxUnitMapping = NULL; + CFNumberRef type; + CFNumberRef unit; + + ifList = __SCNetworkInterfaceCopyStoredWithPreferences(ni_prefs); + + if (ifList == NULL) { + SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType: ifList is NULL")); + return 0; + } + + InterfaceTypeToMaxUnitMapping = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + count = CFArrayGetCount(ifList); + + for (CFIndex idx = 0; idx < count; idx++) { + cfMaxUnit = NULL; + interface = CFArrayGetValueAtIndex(ifList, idx); + + if (isA_SCNetworkInterface(interface) == NULL) { + continue; + } + + type = _SCNetworkInterfaceGetIOInterfaceType(interface); + + if (isA_CFNumber(type) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType: type is NULL")); + continue; + } + + if (CFDictionaryContainsKey(InterfaceTypeToMaxUnitMapping, type) == FALSE) { + int temp = 0; + cfMaxUnit = CFNumberCreate(NULL, kCFNumberIntType, &temp); + CFDictionaryAddValue(InterfaceTypeToMaxUnitMapping, type, cfMaxUnit); + CFRelease(cfMaxUnit); + } + + if (cfMaxUnit == NULL) { + cfMaxUnit = CFDictionaryGetValue(InterfaceTypeToMaxUnitMapping, type); + } + + unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface); + + if (isA_CFNumber(unit) == NULL) { + continue; + } + + if (CFNumberCompare(unit, cfMaxUnit, NULL) == kCFCompareGreaterThan) { + CFDictionarySetValue(InterfaceTypeToMaxUnitMapping, type, unit); + } + } + if (ifList != NULL) { + CFRelease(ifList); + } + return InterfaceTypeToMaxUnitMapping; +} + +static CFMutableDictionaryRef +_SCNetworkConfigurationCopyBuiltinMapping (SCPreferencesRef sourcePrefs, SCPreferencesRef targetPrefs) +{ + CFMutableDictionaryRef builtinMapping = NULL; + CFIndex sourceBuiltinInterfaceCount = 0; + CFMutableArrayRef sourceBuiltinInterfaces = NULL; + SCNetworkInterfaceRef sourceInterface; + CFIndex targetBuiltinInterfaceCount = 0; + CFMutableArrayRef targetBuiltinInterfaces = NULL; + SCNetworkInterfaceRef targetInterface; + + sourceBuiltinInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(sourcePrefs, TRUE); + if (isA_CFArray(sourceBuiltinInterfaces) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyBuiltinMapping: sourceBuiltinInterfaces is NULL")); + goto done; + } + sourceBuiltinInterfaceCount = CFArrayGetCount(sourceBuiltinInterfaces); + + targetBuiltinInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(targetPrefs, TRUE); + if (isA_CFArray(targetBuiltinInterfaces) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyBuiltinMapping: targetBuiltinInterfaces is NULL")); + goto done; + } + targetBuiltinInterfaceCount = CFArrayGetCount(targetBuiltinInterfaces); + + // Builtin Mapping will try to map all source interfaces into target interfaces + for (CFIndex idx = 0; idx < sourceBuiltinInterfaceCount; idx++) { + sourceInterface = CFArrayGetValueAtIndex(sourceBuiltinInterfaces, idx); + for (CFIndex idx2 = 0; idx2 < targetBuiltinInterfaceCount; idx2++) { + targetInterface = CFArrayGetValueAtIndex(targetBuiltinInterfaces, idx2); + + if (_SCNetworkConfigurationIsInterfaceNamerMappable(sourceInterface, targetInterface, FALSE) == TRUE) { + if (builtinMapping == NULL) { + builtinMapping = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + CFDictionaryAddValue(builtinMapping, sourceInterface, targetInterface); + CFArrayRemoveValueAtIndex(targetBuiltinInterfaces, idx2); + break; + } + } + targetBuiltinInterfaceCount = CFArrayGetCount(targetBuiltinInterfaces); + } + +done: + if (sourceBuiltinInterfaces != NULL) { + CFRelease(sourceBuiltinInterfaces); + } + if (targetBuiltinInterfaces != NULL) { + CFRelease(targetBuiltinInterfaces); + } + return builtinMapping; +} + +static CFMutableDictionaryRef +_SCNetworkConfigurationCopyExternalInterfaceMapping (SCPreferencesRef sourcePref, SCPreferencesRef targetPrefs) +{ + CFNumberRef cfMaxTargetUnit = NULL; + CFNumberRef currentInterfaceUnit = NULL; + CFMutableDictionaryRef externalMapping = NULL; + CFMutableDictionaryRef InterfaceTypeToMaxUnitMapping = NULL; + int maxTargetUnit; + int newTargetUnit; + CFIndex sourceExternalInterfaceCount = 0; + CFMutableArrayRef sourceExternalInterfaces = NULL; + SCNetworkInterfaceRef sourceInterface = NULL; + CFIndex targetExternalInterfaceCount = 0; + CFMutableArrayRef targetExternalInterfaces = NULL; + SCNetworkInterfaceRef targetInterface = NULL; + CFNumberRef type; + + sourceExternalInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(sourcePref, FALSE); + if (isA_CFArray(sourceExternalInterfaces) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: sourceExternalInterfaces is NULL")); + goto done; + } + sourceExternalInterfaceCount = CFArrayGetCount(sourceExternalInterfaces); + + if (sourceExternalInterfaceCount == 0) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: sourceExternalInterfaceCount is 0")); + goto done; + } + + targetExternalInterfaces = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(targetPrefs, FALSE); + if (isA_CFArray(targetExternalInterfaces) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: targetExternalInterfaces is NULL")); + goto done; + } + + InterfaceTypeToMaxUnitMapping = _SCNetworkInterfaceStorageCopyMaxUnitPerInterfaceType(targetPrefs); + externalMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + // Map all external interfaces which exist in both source and target + for (CFIndex idx = 0; idx < sourceExternalInterfaceCount; idx++) { + sourceInterface = CFArrayGetValueAtIndex(sourceExternalInterfaces, idx); + targetExternalInterfaceCount = CFArrayGetCount(targetExternalInterfaces); + currentInterfaceUnit = NULL; + + for (CFIndex idx2 = 0; idx2 < targetExternalInterfaceCount; idx2++) { + targetInterface = CFArrayGetValueAtIndex(targetExternalInterfaces, idx2); + + if (_SCNetworkConfigurationIsInterfaceNamerMappable(sourceInterface, targetInterface, TRUE) == TRUE) { + CFDictionaryAddValue(externalMapping, sourceInterface, targetInterface); + CFArrayRemoveValueAtIndex(targetExternalInterfaces, idx2); + break; + } + } + + if (CFDictionaryContainsKey(externalMapping, sourceInterface) == FALSE) { + // Create new mappings for external source interfaces which don't exist in the target + type = _SCNetworkInterfaceGetIOInterfaceType(sourceInterface); + + cfMaxTargetUnit = CFDictionaryGetValue(InterfaceTypeToMaxUnitMapping, type); + if (cfMaxTargetUnit != NULL) { + CFNumberGetValue(cfMaxTargetUnit, kCFNumberIntType, &maxTargetUnit); + newTargetUnit = maxTargetUnit + 1; + } + else { + newTargetUnit = 0; + } + + cfMaxTargetUnit = CFNumberCreate(NULL, kCFNumberIntType, &newTargetUnit); + CFDictionarySetValue(InterfaceTypeToMaxUnitMapping, type, cfMaxTargetUnit); + + targetInterface = (SCNetworkInterfaceRef)__SCNetworkInterfaceCreateCopy(NULL, sourceInterface, NULL, NULL); + + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCopyExternalInterfaceMapping: sourceInterface: %p, target Interface: %p"), sourceInterface, targetInterface); + + currentInterfaceUnit = _SCNetworkInterfaceGetIOInterfaceUnit(targetInterface); + + if ((isA_CFNumber(currentInterfaceUnit) == NULL) || + (CFEqual(currentInterfaceUnit, cfMaxTargetUnit) == FALSE)) { + // Update the interface unit + __SCNetworkInterfaceSetIOInterfaceUnit(targetInterface, cfMaxTargetUnit); + } + + CFDictionaryAddValue(externalMapping, sourceInterface, targetInterface); + + CFRelease(targetInterface); + targetInterface = NULL; + CFRelease(cfMaxTargetUnit); + cfMaxTargetUnit = NULL; + } + } +done: + if (sourceExternalInterfaces != NULL) { + CFRelease(sourceExternalInterfaces); + } + if (targetExternalInterfaces != NULL) { + CFRelease(targetExternalInterfaces); + } + if (InterfaceTypeToMaxUnitMapping != NULL) { + CFRelease(InterfaceTypeToMaxUnitMapping); + } + return externalMapping; +} +static Boolean +__SCNetworkConfigurationInterfaceNameIsEquiv(CFStringRef interfaceName1, CFStringRef interfaceName2); + +static Boolean +_SCNetworkConfigurationIsInterfaceNamerMappable(SCNetworkInterfaceRef interface1, SCNetworkInterfaceRef interface2, Boolean bypassActive) +{ + Boolean interface1IsBuiltin; + CFStringRef interface1Prefix; + CFStringRef interface1Type; + CFStringRef interface1UserDefinedName; + Boolean interface2IsBuiltin; + CFStringRef interface2Prefix; + CFStringRef interface2Type; + CFStringRef interface2UserDefinedName; + + if (interface1 == interface2) { + // No work needs to be done + return TRUE; + } + interface1IsBuiltin = _SCNetworkInterfaceIsBuiltin(interface1); + interface2IsBuiltin = _SCNetworkInterfaceIsBuiltin(interface2); + + interface1UserDefinedName = SCNetworkInterfaceGetLocalizedDisplayName(interface1); + interface2UserDefinedName = SCNetworkInterfaceGetLocalizedDisplayName(interface2); + + interface1Type = SCNetworkInterfaceGetInterfaceType(interface1); + interface2Type = SCNetworkInterfaceGetInterfaceType(interface2); + + interface1Prefix = _SCNetworkInterfaceGetIOInterfaceNamePrefix(interface1); + interface2Prefix = _SCNetworkInterfaceGetIOInterfaceNamePrefix(interface2); + + // Check if have same builtin values. + // Check if User Defined name matches + // Check if SCNetwork Interface Type matches + + if (interface1IsBuiltin != interface2IsBuiltin) { + return FALSE; + } + + if (_SC_CFEqual(interface1Type, interface2Type) == FALSE) { + return FALSE; + } + + if (_SC_CFEqual(interface1Prefix, interface2Prefix) == FALSE) { + return FALSE; + } + + if (_SC_CFEqual(interface1UserDefinedName, interface2UserDefinedName) == FALSE) { + // Checking if we have a mismatch because of the name Ethernet and Ethernet 1 + // Checking if we have a mismatch because of the name Airport and WiFi + if ((interface1IsBuiltin == TRUE) && + (interface2IsBuiltin == TRUE) && + (__SCNetworkConfigurationInterfaceNameIsEquiv(interface1UserDefinedName, interface2UserDefinedName) == TRUE)) { + return TRUE; + } + return FALSE; + } + return TRUE; +} + +static Boolean +__SCNetworkConfigurationInterfaceNameIsEquiv(CFStringRef interfaceName1, CFStringRef interfaceName2) +{ + CFStringRef interfaceArray[] = { CFSTR("iPhone"), CFSTR("iPad"), CFSTR("iPod"), CFSTR("AppleTV") }; + const int interfaceCount = sizeof(interfaceArray) / sizeof(CFStringRef); + CFStringRef portSuffix = CFSTR(", Port 1"); + + if ((isA_CFString(interfaceName1) != NULL) && + (isA_CFString(interfaceName2) != NULL)) { + if (CFEqual(interfaceName1, interfaceName2) == FALSE) { + // Check if we are looking at the WiFi interface + if ((CFEqual(interfaceName1, CFSTR("AirPort")) || + (CFEqual(interfaceName1, CFSTR("Wi-Fi")))) && + (CFEqual(interfaceName2, CFSTR("AirPort")) || + (CFEqual(interfaceName2, CFSTR("Wi-Fi"))))) { + return TRUE; + } + + if (((CFEqual(interfaceName1, CFSTR("Ethernet"))) || + (CFEqual(interfaceName1, CFSTR("Ethernet 1")))) && + ((CFEqual(interfaceName2, CFSTR("Ethernet"))) || + (CFEqual(interfaceName2, CFSTR("Ethernet 1"))))) { + return TRUE; + } + + if (((CFStringHasSuffix(interfaceName1, portSuffix) == TRUE) && + (CFStringCompareWithOptions(interfaceName1, interfaceName2, CFRangeMake(0, (CFStringGetLength(interfaceName1) - CFStringGetLength(portSuffix))), 0) == kCFCompareEqualTo)) || + ((CFStringHasSuffix(interfaceName2, portSuffix) == TRUE) && + (CFStringCompareWithOptions(interfaceName2, interfaceName1, CFRangeMake(0, (CFStringGetLength(interfaceName2) - CFStringGetLength(portSuffix))), 0) == kCFCompareEqualTo))) { + return TRUE; + } + + for (CFIndex idx = 0; idx < interfaceCount; idx++) { + CFStringRef tempInterfaceName = interfaceArray[idx]; + if ((CFEqual(interfaceName1, tempInterfaceName) == TRUE || + __SCNetworkInterfaceMatchesName(interfaceName1, tempInterfaceName) == TRUE) && + (CFEqual(interfaceName2, tempInterfaceName) == TRUE || + __SCNetworkInterfaceMatchesName(interfaceName2, tempInterfaceName) == TRUE)) { + return TRUE; + } + } + } + else { + return TRUE; + } + } + + return FALSE; +} + +typedef struct { + CFDictionaryRef interfaceMapping; + CFMutableArrayRef interfacesMissingServices; +} SCNetworkConfigurationMissingServiceContext; + +typedef struct { + CFDictionaryRef bsdNameToBridgeServices; // Mapping of BSD Name to SCBridgeInterfaceRef + CFDictionaryRef bsdNameToBondServices; // Mapping of BSD Name to SCBondInterfaceRef + CFDictionaryRef bsdNameToVLANServices; // Mapping of BSD Name to SCVLANInterfaceRef + CFDictionaryRef interfaceMapping; + Boolean* isValid; + CFMutableArrayRef interfaceToBeRemoved; // SCNetworkInterfaceRef. Services containing the interface will be removed + CFMutableArrayRef interfaceToBeReplaced;// SCNetworkInterfaceRef. Services containing the interface will be replaced with default service + Boolean repair; +} SCNetworkConfigurationValidityContext; + +static void +_SCNetworkConfigurationValidateInterface (const void *key, const void *value, void *context) +{ + CFStringRef bsdName = (CFStringRef)key; + SCNetworkConfigurationValidityContext *ctx = (SCNetworkConfigurationValidityContext*)context; + CFDictionaryRef bsdNameToBridgeServices = ctx->bsdNameToBridgeServices; + CFDictionaryRef bsdNameToBondServices = ctx->bsdNameToBondServices; + CFDictionaryRef bsdNameToVLANServices = ctx->bsdNameToVLANServices; + SCNetworkInterfaceRef interface = NULL; + CFDictionaryRef interfaceMapping = ctx->interfaceMapping; + CFStringRef interfaceUserDefinedName = NULL; + Boolean repair = ctx->repair; + SCNetworkInterfaceRef serviceInterface = (SCNetworkInterfaceRef)value; + CFStringRef serviceInterfaceUserDefinedName = NULL; + CFMutableArrayRef interfaceToBeRemoved = ctx->interfaceToBeRemoved; + CFMutableArrayRef interfaceToBeReplaced = ctx->interfaceToBeReplaced; + + // No work needs to be done if we have already made determination that configuration somewhere is not valid, + // or we don't intend to repair invalid configuration. + if ((*ctx->isValid == FALSE) && (repair == FALSE)) { + return; + } + + // There is no interface present for the service + interface = CFDictionaryGetValue(interfaceMapping, bsdName); + if (interface == NULL) { + if ((((bsdNameToBridgeServices != NULL) && (CFDictionaryContainsKey(bsdNameToBridgeServices, bsdName) == FALSE))) && + (((bsdNameToBondServices != NULL) && (CFDictionaryContainsKey(bsdNameToBondServices, bsdName) == FALSE))) && + (((bsdNameToVLANServices != NULL) && (CFDictionaryContainsKey(bsdNameToVLANServices, bsdName) == FALSE)))) { + // Not a virtual interface + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationValidateInterface: There is no real interface with bsd name: %@ for service"), bsdName); + + if (repair == TRUE) { + CFArrayAppendValue(interfaceToBeRemoved, serviceInterface); + } + *ctx->isValid = FALSE; + } + return; + } + + // TODO: Need to compare between both SCNetworkInterfaceRefs + interfaceUserDefinedName = __SCNetworkInterfaceGetUserDefinedName(interface); + serviceInterfaceUserDefinedName = __SCNetworkInterfaceGetUserDefinedName(serviceInterface); + + if (__SCNetworkConfigurationInterfaceNameIsEquiv(interfaceUserDefinedName, serviceInterfaceUserDefinedName) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationValidateInterface: Interface user defined name: %@ doesn't match service interface user defined name: %@"), interfaceUserDefinedName, serviceInterfaceUserDefinedName); + *ctx->isValid = FALSE; + // Add service interface to the interfaceToBeReplaced list + if (isA_CFArray(interfaceToBeReplaced) != NULL) { + CFArrayAppendValue(interfaceToBeReplaced, interface); + } + if (isA_CFArray(interfaceToBeRemoved) != NULL) { + CFArrayAppendValue(interfaceToBeRemoved, serviceInterface); + } + return; + } +} + +static void +_SCNetworkConfigurationCollectMissingService(const void *key, const void *value, void *context) +{ + CFStringRef bsdName = (CFStringRef)key; + SCNetworkConfigurationMissingServiceContext *ctx = (SCNetworkConfigurationMissingServiceContext*)context; + SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)value; + CFMutableArrayRef interfacesMissingServices = ctx->interfacesMissingServices; + CFDictionaryRef serviceInterfaceMapping = ctx->interfaceMapping; + + if ((isA_SCNetworkInterface(interface) == NULL) || + (_SCNetworkInterfaceIsBuiltin(interface) == FALSE)) { + return; + } + + // Check if services have mapping for the BSD name of the interface + if (CFDictionaryContainsKey(serviceInterfaceMapping, bsdName) == FALSE) { + CFArrayAppendValue(interfacesMissingServices, interface); // Adding interface since the corresponding service seems to be missing + } +} + +static Boolean +_SCNetworkConfigurationCreateBuiltinInterfaceServices(SCPreferencesRef pref, + SCPreferencesRef ni_pref) +{ + SCNetworkConfigurationMissingServiceContext context; + SCNetworkInterfaceRef interface = NULL; + CFArrayRef interfaces = NULL; + CFMutableArrayRef interfacesWithoutService = NULL; + CFDictionaryRef mappingBSDNameToInterface = NULL; + CFDictionaryRef mappingServiceBSDNameToInterface = NULL; + CFIndex missingServiceCount = 0; + Boolean success = FALSE; + + interfaces = __SCNetworkInterfaceCopyStoredWithPreferences(ni_pref); + if (interfaces == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCreateBuiltinInterfaceServices: interfaces is NULL or not of the correct type")); + goto done; + } + + mappingBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces); + CFRelease(interfaces); + if (isA_CFDictionary(mappingBSDNameToInterface) == NULL) { + goto done; + } + + interfaces = __SCNetworkServiceCopyAllInterfaces(pref); + if (interfaces == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCreateBuiltinInterfaceServices: interfaces is NULL for configPref or not of the correct type")); + goto done; + } + mappingServiceBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces); + CFRelease(interfaces); + if (isA_CFDictionary(mappingServiceBSDNameToInterface) == NULL) { + goto done; + } + + interfacesWithoutService = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + context.interfaceMapping = mappingServiceBSDNameToInterface; + context.interfacesMissingServices = interfacesWithoutService; + + CFDictionaryApplyFunction(mappingBSDNameToInterface, _SCNetworkConfigurationCollectMissingService, &context); + missingServiceCount = CFArrayGetCount(interfacesWithoutService); + + success = TRUE; + + for (CFIndex idx = 0; idx < missingServiceCount; idx++) { + interface = CFArrayGetValueAtIndex(interfacesWithoutService, idx); + + if (__SCNetworkServiceCreate(pref, interface, NULL) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCreateBuiltinInterfaceServices: Could not add service for interface: %@"), interface); + success = FALSE; + } + } +done: + if (mappingBSDNameToInterface != NULL) { + CFRelease(mappingBSDNameToInterface); + } + if (mappingServiceBSDNameToInterface != NULL) { + CFRelease(mappingServiceBSDNameToInterface); + } + if (interfacesWithoutService != NULL) { + CFRelease(interfacesWithoutService); + } + + return success; +} + +static void +add_default_service(const void *value, void *context) +{ + SCNetworkSetRef currentSet = NULL; + SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)value; + SCPreferencesRef prefs = (SCPreferencesRef)context; + SCNetworkServiceRef service; + + service = SCNetworkServiceCreate(prefs, interface); + + if (service == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: Could not create new service")); + goto done; + } + + if (SCNetworkServiceEstablishDefaultConfiguration(service) == FALSE) { + SCNetworkServiceRemove(service); + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: SCNetworkServiceEstablishDefaultConfiguration failed")); + goto done; + } + + // Add Service to current set + currentSet = SCNetworkSetCopyCurrent(prefs); + if (currentSet == NULL) { + SCNetworkServiceRemove(service); + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: Could not find current set")); + goto done; + } + + if (SCNetworkSetAddService(currentSet, service) == FALSE) { + SCNetworkServiceRemove(service); + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_default_service: Could not add service to current set")); + goto done; + } +done: + if (service != NULL) { + CFRelease(service); + } + if (currentSet != NULL) { + CFRelease(currentSet); + } +} + +static void +remove_service(const void *value, void *context) +{ + SCNetworkInterfaceRef interface; + SCNetworkServiceRef service = (SCNetworkServiceRef)value; + CFArrayRef toBeRemoved = (CFArrayRef)context; + + interface = SCNetworkServiceGetInterface(service); + + if (CFArrayContainsValue(toBeRemoved, CFRangeMake(0, CFArrayGetCount(toBeRemoved)), interface)) { + SCNetworkServiceRemove(service); + } +} + +static void +_SCNetworkConfigurationSaveOldConfiguration(SCPreferencesRef prefs) +{ + CFAbsoluteTime absoluteTime; + CFCalendarRef currentCalendar; + int day; + int hour; + CFStringRef keyList[] = { + kSCPrefCurrentSet, + MODEL, + kSCPrefNetworkServices, + kSCPrefSets, + kSCPrefSystem, + kSCPrefVirtualNetworkInterfaces + }; + CFIndex keyListCount; + int minute; + int month; + int second; + int year; + + currentCalendar = CFCalendarCopyCurrent(); + absoluteTime = CFAbsoluteTimeGetCurrent(); + + if (CFCalendarDecomposeAbsoluteTime(currentCalendar, absoluteTime, "yMdHms", + &year, &month, &day, &hour, &minute, &second) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationSaveOldConfiguration: Cannot decompose absolute time")); + } + keyListCount = (CFIndex)sizeof(keyList)/sizeof(CFStringRef); + + for (CFIndex idx = 0; idx < keyListCount; idx++) { + CFStringRef newKey; + CFTypeRef value = SCPreferencesGetValue(prefs, keyList[idx]); + + if (value != NULL) { + newKey = CFStringCreateWithFormat(NULL, NULL, + CFSTR("%d-%d-%d %d:%d:%d : %@"), + year, month, day, hour, + minute, second, keyList[idx]); + SCPreferencesSetValue(prefs, newKey, value); + CFRelease(newKey); + } + } + CFRelease(currentCalendar); +} + +static Boolean +_SCNetworkConfigurationRepairUsingPreferences(SCPreferencesRef prefs, + CFArrayRef interfaceToBeRemoved, + CFArrayRef interfaceToBeReplaced) +{ + CFIndex removeCount; + CFIndex replaceCount; + CFArrayRef serviceList; + + removeCount = CFArrayGetCount(interfaceToBeRemoved); + replaceCount = CFArrayGetCount(interfaceToBeReplaced); + if (removeCount == 0 && + replaceCount == 0) { + // We don't have any information to repair + return FALSE; + } + // Backup current preferences before making changes + _SCNetworkConfigurationSaveOldConfiguration(prefs); + + serviceList = SCNetworkServiceCopyAll(prefs); + CFArrayApplyFunction(serviceList, CFRangeMake(0, CFArrayGetCount(serviceList)), remove_service, (void*)interfaceToBeRemoved); + + CFArrayApplyFunction(interfaceToBeReplaced, CFRangeMake(0, replaceCount), add_default_service, (void*)prefs); + CFRelease(serviceList); + return TRUE; +} + +static void +validate_bridge(const void *value, void *context) +{ + SCBridgeInterfaceRef bridge = (SCBridgeInterfaceRef) value; + CFArrayRef memberInterfaces = SCBridgeInterfaceGetMemberInterfaces(bridge); + CFMutableArrayRef memberInterfacesMutable = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + SCPreferencesRef ni_prefs = (SCPreferencesRef)context; + + for (CFIndex idx = 0; idx < CFArrayGetCount(memberInterfaces); idx++) { + CFStringRef bsdName; + SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)CFArrayGetValueAtIndex(memberInterfaces, idx); + SCNetworkInterfaceRef memberInterface; + + bsdName = SCNetworkInterfaceGetBSDName(interface); + if (bsdName == NULL) { + continue; + } + + // Check if member interface is present + memberInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, bsdName); + if (memberInterface != NULL) { + CFArrayAppendValue(memberInterfacesMutable, memberInterface); + CFRelease(memberInterface); + } + } + + if (CFArrayGetCount(memberInterfacesMutable) == 0) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("validate_bridge: Removing invalid bridge configuration: %@"), bridge); + SCBridgeInterfaceRemove(bridge); + } + else { + SCBridgeInterfaceSetMemberInterfaces(bridge, memberInterfacesMutable); + } + CFRelease(memberInterfacesMutable); +} +#if !TARGET_OS_IPHONE +static void +validate_bond(const void *value, void *context) +{ + SCBondInterfaceRef bond = (SCBondInterfaceRef)value; + CFArrayRef memberInterfaces = SCBondInterfaceGetMemberInterfaces(bond); + CFMutableArrayRef memberInterfacesMutable = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + SCPreferencesRef ni_prefs = (SCPreferencesRef)context; + + for (CFIndex idx = 0; idx < CFArrayGetCount(memberInterfaces); idx++) { + CFStringRef bsdName; + SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)CFArrayGetValueAtIndex(memberInterfaces, idx); + SCNetworkInterfaceRef memberInterface; + + bsdName = SCNetworkInterfaceGetBSDName(interface); + if (bsdName == NULL) { + continue; + } + + // Check if member interface is present + memberInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, bsdName); + if (memberInterface != NULL) { + CFArrayAppendValue(memberInterfacesMutable, memberInterface); + CFRelease(memberInterface); + } + } + + if (CFArrayGetCount(memberInterfacesMutable) == 0) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("validate_bond: Removing invalid bond configuration: %@"), bond); + SCBondInterfaceRemove(bond); + } + else { + SCBondInterfaceSetMemberInterfaces(bond, memberInterfacesMutable); + } + CFRelease(memberInterfacesMutable); +} +#endif + +static void +validate_vlan(const void *value, void *context) +{ + CFStringRef bsdName; + SCNetworkInterfaceRef interface; + Boolean isValid = TRUE; + SCPreferencesRef ni_prefs = (SCPreferencesRef)context; + SCNetworkInterfaceRef physicalInterface; + SCVLANInterfaceRef vlan = (SCVLANInterfaceRef)value; + + physicalInterface = SCVLANInterfaceGetPhysicalInterface(vlan); + bsdName = SCNetworkInterfaceGetBSDName(physicalInterface); + + if (bsdName == NULL) { + isValid = FALSE; + goto done; + } + + // Check if the physical interface is present + interface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, bsdName); + if (interface == NULL) { + isValid = FALSE; + goto done; + } + CFRelease(interface); + +done: + if (isValid == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("validate_vlan: Removing invalid VLAN configuration: %@"), vlan); + SCVLANInterfaceRemove(vlan); + } +} + +static Boolean +_SCNetworkConfigurationCheckValidityUsingPreferences(SCPreferencesRef prefs, + SCPreferencesRef ni_prefs, + CFDictionaryRef options) +{ + CFArrayRef allServices = NULL; + CFArrayRef allSets = NULL; + CFDictionaryRef bsdNameToBridgeServices = NULL; + CFDictionaryRef bsdNameToBondServices = NULL; + CFDictionaryRef bsdNameToVLANServices = NULL; + SCNetworkConfigurationValidityContext context; + CFArrayRef interfaces = NULL; + Boolean isValid = TRUE; + CFDictionaryRef mappingBSDNameToInterface = NULL; + CFDictionaryRef mappingServiceBSDNameToInterface = NULL; + Boolean repairConfiguration = FALSE; + CFArrayRef setServiceOrder = NULL; + CFArrayRef setServices = NULL; + CFMutableArrayRef interfaceToBeRemoved = NULL; + CFMutableArrayRef interfaceToBeReplaced = NULL; + + + if ((isA_CFDictionary(options) != NULL)) { + CFBooleanRef repair = CFDictionaryGetValue(options, kSCNetworkConfigurationRepair); + if (isA_CFBoolean(repair) != NULL) { + repairConfiguration = CFBooleanGetValue(repair); + } + } + + /* + Check the validity by: + 1) Comparing if the interfaces names mentioned in NetworkInterfaces.plist and preferences.plist match + Use the functions + CFDictionaryRef + __SCNetworkInterfaceCreateMappingUsingBSDName(SCPreferencesRef prefs); + */ + interfaces = __SCNetworkInterfaceCopyStoredWithPreferences(ni_prefs); + if (isA_CFArray(interfaces) == NULL) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: interfaces is NULL or not of the correct type")); + goto done; + } + mappingBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces); + CFRelease(interfaces); + if (isA_CFDictionary(mappingBSDNameToInterface) == NULL) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: mappingBSDNameToInterface is NULL")); + goto done; + } + + interfaces = __SCNetworkServiceCopyAllInterfaces(prefs); + if (isA_CFArray(interfaces) == NULL) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: interfaces is NULL for configPref or not of the correct type")); + goto done; + } + mappingServiceBSDNameToInterface = __SCNetworkInterfaceCreateMappingUsingBSDName(interfaces); + CFRelease(interfaces); + if (isA_CFDictionary(mappingServiceBSDNameToInterface) == NULL) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: mappingServiceBSDNameToInterface is NULL")); + goto done; + } + + if (repairConfiguration) { + interfaceToBeRemoved = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + interfaceToBeReplaced = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); +#if !TARGET_OS_IPHONE + bsdNameToBridgeServices = _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(prefs); + bsdNameToBondServices = _SCNetworkMigrationCopyMappingBSDNameToBondServices(prefs); + bsdNameToVLANServices = _SCNetworkMigrationCopyMappingBSDNameToVLANServices(prefs); +#endif + } + context.interfaceMapping = mappingBSDNameToInterface; + context.isValid = &isValid; + context.interfaceToBeRemoved = interfaceToBeRemoved; + context.interfaceToBeReplaced = interfaceToBeReplaced; + context.bsdNameToBridgeServices = bsdNameToBridgeServices; + context.bsdNameToBondServices = bsdNameToBondServices; + context.bsdNameToVLANServices = bsdNameToVLANServices; + context.repair = repairConfiguration; + + CFDictionaryApplyFunction(mappingServiceBSDNameToInterface, _SCNetworkConfigurationValidateInterface, &context); + + if (isValid == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: Found mismatch between interface names in NetworkInterfaces.plist and preferences.plist")); + if (repairConfiguration) { + isValid = _SCNetworkConfigurationRepairUsingPreferences(prefs, interfaceToBeRemoved, interfaceToBeReplaced); + if (isValid == FALSE) { + goto done; + } + // Save the changes if repair fixed an invalid configuration + if (SCPreferencesCommitChanges(prefs) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("Failed to commit changes from the repaired configuration")); + } + } + else { + goto done; + } + } + /* + + 2) Check if all the network services mentioned in the SCNetworkSet are actually present in the SCNetworkService array + */ + + allServices = SCNetworkServiceCopyAll(prefs); + if (isA_CFArray(allServices) == NULL) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: allServices is NULL")); + goto done; + } + + allSets = SCNetworkSetCopyAll(prefs); + if (isA_CFArray(allSets) == NULL) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: allSets is NULL")); + goto done; + } + + for (CFIndex idx = 0; ((idx < CFArrayGetCount(allSets)) && isValid); idx++) { + SCNetworkSetRef set = CFArrayGetValueAtIndex(allSets, idx); + + if (isA_SCNetworkSet(set) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: set is NULL")); + continue; + } + setServices = SCNetworkSetCopyServices(set); + if (setServices == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: setServices is NULL")); + continue; + } + for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(setServices); idx2++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(setServices, idx2); + + if (CFArrayContainsValue(allServices, CFRangeMake(0, CFArrayGetCount(allServices)), service) == FALSE) { + isValid = FALSE; + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidityUsingPreferences: All network services in the network set are not present in SCNetworkService array")); + break; + } + } + if (isValid == FALSE) { + break; + } + + /* + 3) Check if service IDs in service order do exist in the SET + */ + setServiceOrder = SCNetworkSetGetServiceOrder(set); + if (setServiceOrder != NULL) { + for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(setServiceOrder); idx2++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(setServiceOrder, idx2); + if ((CFArrayContainsValue(setServiceOrder, CFRangeMake(0, CFArrayGetCount(setServiceOrder)), service) == FALSE) && + (CFArrayContainsValue(allServices, CFRangeMake(0, CFArrayGetCount(allServices)), service) == FALSE)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("Service: %@ is not present in the service order for set %@"), service, set); + break; + } + } + } + if (setServices != NULL) { + CFRelease(setServices); + setServices = NULL; + } + } + + /* + 4) Check if the virtual network interfaces have valid member interfaces + */ + CFArrayRef bridges = SCBridgeInterfaceCopyAll(prefs); + if (bridges != NULL) { + CFArrayApplyFunction(bridges, CFRangeMake(0, CFArrayGetCount(bridges)), validate_bridge, (void*)ni_prefs); + CFRelease(bridges); + } +#if !TARGET_OS_IPHONE + CFArrayRef bonds = SCBondInterfaceCopyAll(prefs); + if (bonds != NULL) { + CFArrayApplyFunction(bonds, CFRangeMake(0, CFArrayGetCount(bonds)), validate_bond, (void*)ni_prefs); + CFRelease(bonds); + } +#endif + CFArrayRef vlans = SCVLANInterfaceCopyAll(prefs); + if (vlans != NULL) { + CFArrayApplyFunction(vlans, CFRangeMake(0, CFArrayGetCount(vlans)), validate_vlan, (void*)ni_prefs); + CFRelease(vlans); + } + + +done: + if (mappingBSDNameToInterface != NULL) { + CFRelease(mappingBSDNameToInterface); + } + if (mappingServiceBSDNameToInterface != NULL) { + CFRelease(mappingServiceBSDNameToInterface); + } + if (allServices != NULL) { + CFRelease(allServices); + } + if (allSets != NULL) { + CFRelease(allSets); + } + if (bsdNameToBridgeServices != NULL) { + CFRelease(bsdNameToBridgeServices); + } + if (bsdNameToBondServices != NULL) { + CFRelease(bsdNameToBondServices); + } + if (bsdNameToVLANServices != NULL) { + CFRelease(bsdNameToVLANServices); + } + if (setServices != NULL) { + CFRelease(setServices); + } + if (interfaceToBeRemoved != NULL) { + CFRelease(interfaceToBeRemoved); + } + if (interfaceToBeReplaced != NULL) { + CFRelease(interfaceToBeReplaced); + } + return isValid; +} + +Boolean +_SCNetworkConfigurationCheckValidity(CFURLRef configDir, CFDictionaryRef options) +{ + CFURLRef baseURL = NULL; + CFURLRef configNetworkInterfaceFile = NULL; + CFStringRef configNetworkInterfaceFileString = NULL; + SCPreferencesRef configNetworkInterfacePref = NULL; + SCPreferencesRef configPref = NULL; + CFURLRef configPreferenceFile = NULL; + CFStringRef configPreferencesFileString = NULL; + CFArrayRef configurationFiles = NULL; + Boolean isValid = FALSE; + char networkInterfaceStr[PATH_MAX]; + char prefsStr[PATH_MAX]; + + if (configDir == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidity: Migration files not found in directory: %@"), ((configDir == NULL) ? CFSTR("NULL") : CFURLGetString(configDir))); + goto done; + } + baseURL = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, + kCFURLPOSIXPathStyle, TRUE, configDir); + + configPreferenceFile = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)PREFS_DEFAULT_CONFIG_PLIST, sizeof(PREFS_DEFAULT_CONFIG_PLIST), FALSE, baseURL); + configNetworkInterfaceFile = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)NETWORK_INTERFACES_PREFS_PLIST, sizeof(NETWORK_INTERFACES_PREFS_PLIST), FALSE, baseURL); + + if (CFURLGetFileSystemRepresentation(configPreferenceFile, TRUE, (UInt8*)prefsStr, sizeof(prefsStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidity: Could not extract preferences information")); + goto done; + } + if (CFURLGetFileSystemRepresentation(configNetworkInterfaceFile, TRUE, (UInt8*)networkInterfaceStr, sizeof(networkInterfaceStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCheckValidity: Could not extract network interface information")); + goto done; + } + + configPreferencesFileString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), prefsStr); + configNetworkInterfaceFileString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), networkInterfaceStr); + + configPref = SCPreferencesCreate(NULL, + PLUGIN_ID, + configPreferencesFileString); + + configNetworkInterfacePref = SCPreferencesCreate(NULL, + PLUGIN_ID, + configNetworkInterfaceFileString); + if ((configPref == NULL) || (configNetworkInterfacePref == NULL)) { + goto done; + } + + // This function compares preferences.plist and NetworkInterfaces.plist and verifies if the values are correct + // Checking interface mismatch for validity + isValid = _SCNetworkConfigurationCheckValidityUsingPreferences(configPref, configNetworkInterfacePref, options); + +done: + if (baseURL != NULL) { + CFRelease(baseURL); + } + if (configurationFiles != NULL) { + CFRelease(configurationFiles); + } + if (configPreferencesFileString != NULL) { + CFRelease(configPreferencesFileString); + } + if (configNetworkInterfaceFileString != NULL) { + CFRelease(configNetworkInterfaceFileString); + } + if (configPref != NULL) { + CFRelease(configPref); + } + if (configNetworkInterfacePref != NULL) { + CFRelease(configNetworkInterfacePref); + } + if (configPreferenceFile != NULL) { + CFRelease(configPreferenceFile); + } + if (configNetworkInterfaceFile != NULL) { + CFRelease(configNetworkInterfaceFile); + } + return isValid; +} + + +typedef struct { + CFMutableArrayRef externalInterfaceList; + CFMutableArrayRef networkInterfaceList; +} SCExternalMappingContext; + +static void +_SCNetworkConfigurationCollectInterfaceStorageEntity(const void *key, const void *value, void *context) +{ + SCExternalMappingContext* ctx = context; + CFDictionaryRef interface_entity = NULL; + SCNetworkInterfaceRef targetInterface = (SCNetworkInterfaceRef)value; + + if (CFArrayContainsValue(ctx->externalInterfaceList, CFRangeMake(0, CFArrayGetCount(ctx->externalInterfaceList)), targetInterface) == TRUE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationCollectInterfaceStorageEntity: Target Interface %@ already exists, thus do no add it to NetworkInterfaces.plist"), targetInterface); + return; // If the target interface already exists then do not add it to NetworkInterfaces.plist + } + interface_entity = __SCNetworkInterfaceCopyStorageEntity(targetInterface); + + if (interface_entity != NULL) { + CFArrayAppendValue(ctx->networkInterfaceList, interface_entity); + CFRelease(interface_entity); + } +} + +static CFArrayRef // CFDictionaryRef +_SCNetworkMigrationCreateNetworkInterfaceArray(SCPreferencesRef ni_prefs, CFDictionaryRef externalMapping) +{ + SCExternalMappingContext context; + CFIndex count = 0; + CFMutableArrayRef externalInterfaceList = NULL; + CFArrayRef if_list = NULL; + CFDictionaryRef interface_entity = NULL; + CFMutableArrayRef networkInterfaceList = NULL; + + if (ni_prefs == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateNetworkInterfaceArray: ni_prefs are NULL")); + return NULL; + } + + if_list = SCPreferencesGetValue(ni_prefs, INTERFACES); + + if ((isA_CFArray(if_list) == NULL) || + ((count = CFArrayGetCount(if_list)) == 0)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateNetworkInterfaceArray: if_list is NULL or interface count is 0")); + return NULL; + } + + networkInterfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + // Keep the same builtin and external interfaces + for (CFIndex idx = 0; idx < count; idx++) { + interface_entity = CFArrayGetValueAtIndex(if_list, idx); + if (isA_CFDictionary(interface_entity) == NULL) { + continue; + } + CFArrayAppendValue(networkInterfaceList, interface_entity); + } + + if (isA_CFDictionary(externalMapping) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateNetworkInterfaceArray: externalMapping is NULL or not of the correct type")); + goto done; + } + // Add any new external interfaces found + externalInterfaceList = _SCNetworkInterfaceCopyInterfacesFilteredByBuiltinWithPreferences(ni_prefs, FALSE); + context.externalInterfaceList = externalInterfaceList; + context.networkInterfaceList = networkInterfaceList; + + CFDictionaryApplyFunction(externalMapping, _SCNetworkConfigurationCollectInterfaceStorageEntity, &context); + +done: + if (externalInterfaceList != NULL) { + CFRelease(externalInterfaceList); + } + return networkInterfaceList; +} + +static void +SCNetworkMigrationMapSourceToTargetName(const void *key, const void *value, void *context) +{ + SCNetworkInterfaceRef interfaceKey = (SCNetworkInterfaceRef)key; + SCNetworkInterfaceRef interfaceValue = (SCNetworkInterfaceRef)value; + CFMutableDictionaryRef mapping = (CFMutableDictionaryRef)context; + CFStringRef sourceBSDName = NULL; + CFStringRef targetBSDName = NULL; + + sourceBSDName = SCNetworkInterfaceGetBSDName(interfaceKey); + if (isA_CFString(sourceBSDName) == NULL) { + return; + } + + targetBSDName = SCNetworkInterfaceGetBSDName(interfaceValue); + if (isA_CFString(targetBSDName) == NULL) { + return; + } + + if (CFDictionaryContainsKey(mapping, sourceBSDName) == FALSE) { + CFDictionaryAddValue(mapping, sourceBSDName, targetBSDName); + } + return; +} + +static CFDictionaryRef +_SCNetworkMigrationCreateBSDNameMapping(CFDictionaryRef internalMapping, CFDictionaryRef externalMapping) +{ + CFMutableDictionaryRef bsdNameMapping = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + + if ((internalMapping == NULL) && externalMapping == NULL) { + goto done; + } + + if (internalMapping != NULL) { + CFDictionaryApplyFunction(internalMapping, SCNetworkMigrationMapSourceToTargetName, bsdNameMapping); + } + + if (externalMapping != NULL) { + CFDictionaryApplyFunction(externalMapping, SCNetworkMigrationMapSourceToTargetName, bsdNameMapping); + } + +done: + return bsdNameMapping; +} + +typedef struct { + CFMutableArrayRef mutableServiceArray; + SCPreferencesRef prefs; +} SCNetworkServiceArrayCopyContext; + +static CFDictionaryRef +_SCNetworkMigrationCreateServiceSetMapping(SCPreferencesRef prefs) +{ + CFMutableDictionaryRef serviceSetMapping = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + SCNetworkServiceRef service = NULL; + CFArrayRef services = NULL; + CFMutableArrayRef setList = NULL; + CFArrayRef sets = NULL; + + services = SCNetworkServiceCopyAll(prefs); + if (services == NULL) { + goto done; + } + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + service = CFArrayGetValueAtIndex(services, idx); + + if (CFDictionaryContainsKey(serviceSetMapping, service) == FALSE) { + setList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFDictionaryAddValue(serviceSetMapping, service, setList); + CFRelease(setList); + } + } + CFRelease(services); + + sets = SCNetworkSetCopyAll(prefs); + if (sets == NULL) { + goto done; + } + + for (CFIndex idx = 0; idx < CFArrayGetCount(sets); idx++) { + SCNetworkSetRef set = CFArrayGetValueAtIndex(sets, idx); + services = SCNetworkSetCopyServices(set); + + for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(services); idx2++) { + service = CFArrayGetValueAtIndex(services, idx2); + setList = (CFMutableArrayRef)CFDictionaryGetValue(serviceSetMapping, service); + if (setList != NULL) { + CFArrayAppendValue(setList, set); + } + } + CFRelease(services); + } + +done: + if (sets != NULL) { + CFRelease(sets); + } + return serviceSetMapping; +} + +static CFDictionaryRef +_SCNetworkMigrationCreateSetMapping(SCPreferencesRef sourcePrefs, + SCPreferencesRef targetPrefs) +{ + SCNetworkSetRef currentSourceSet = NULL; + CFMutableDictionaryRef setMapping = NULL; + CFStringRef setName; + CFArrayRef sourceSets = NULL; + CFArrayRef targetSets = NULL; + CFMutableArrayRef targetSetsMutable = NULL; + + sourceSets = SCNetworkSetCopyAll(sourcePrefs); + targetSets = SCNetworkSetCopyAll(targetPrefs); + + if (sourceSets == NULL || + targetSets == NULL) { + goto done; + } + targetSetsMutable = CFArrayCreateMutableCopy(NULL, 0, targetSets); + + setMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + currentSourceSet = SCNetworkSetCopyCurrent(sourcePrefs); + + for (CFIndex idx = 0; idx < CFArrayGetCount(sourceSets); idx++) { + SCNetworkSetRef sourceSet = CFArrayGetValueAtIndex(sourceSets, idx); + CFIndex targetCount = CFArrayGetCount(targetSetsMutable); + SCNetworkSetRef targetSet; + + setName = SCNetworkSetGetName(sourceSet); + if (targetCount > 0) { + targetSet = CFArrayGetValueAtIndex(targetSetsMutable, 0); + CFRetain(targetSet); + CFArrayRemoveValueAtIndex(targetSetsMutable, 0); + } + else { + targetSet = SCNetworkSetCreate(targetPrefs); + } + + SCNetworkSetSetName(targetSet, setName); + CFDictionaryAddValue(setMapping, sourceSet, targetSet); + + if (CFEqual(sourceSet, currentSourceSet) == TRUE) { + SCNetworkSetSetCurrent(targetSet); + } + CFRelease(targetSet); + } + +done: + if (sourceSets != NULL) { + CFRelease(sourceSets); + } + if (targetSets != NULL) { + CFRelease(targetSets); + } + if (targetSetsMutable != NULL) { + CFRelease(targetSetsMutable); + } + if (currentSourceSet != NULL) { + CFRelease(currentSourceSet); + } + return setMapping; +} + +// This function finds the mapping between source and target preferences (SCNetworkServicesRef -> SCNetworkServicesRef) +// If there is no mapping found between source and target preferences, then the CFBooleanRef value indicating no value is found is stored (SCNetworkServicesRef -> kCFBooleanFalse) +static CFDictionaryRef +_SCNetworkMigrationCreateServiceMappingUsingBSDMapping(SCPreferencesRef sourcePrefs, + SCPreferencesRef targetPrefs, + CFDictionaryRef bsdNameMapping) +{ + CFStringRef bsdNameMapTarget = NULL; + CFMutableDictionaryRef serviceMapping = NULL; // Mapping of services between source and target configurations + CFStringRef sourceBSDName = NULL; + CFIndex sourceCount = 0; + SCNetworkInterfaceRef sourceInterface = NULL; + CFStringRef sourceInterfaceSubType = NULL; // Check interface type and subtype to be able to transfer VPN + CFStringRef sourceInterfaceType = NULL; + CFArrayRef sourceSCNetworkServices = NULL; + CFMutableArrayRef sourceSCNetworkServicesMutable = NULL; // Source SCNetworkServiceRef mutable array + SCNetworkServiceRef sourceService = NULL; + CFStringRef targetBSDName = NULL; + CFIndex targetCount = 0; // Count of Source and Target Services + SCNetworkInterfaceRef targetInterface = NULL; + CFStringRef targetInterfaceSubType = NULL; // services during migration + CFStringRef targetInterfaceType = NULL; + CFArrayRef targetSCNetworkServices = NULL; + CFMutableArrayRef targetSCNetworkServicesMutable = NULL; // Target SCNetworkServiceRef mutable array + SCNetworkServiceRef targetService = NULL; + + // We need BSD Mapping to successfully create service mapping + if (bsdNameMapping == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: BSD Name Mapping is NULL")); + goto done; + } + sourceSCNetworkServices = SCNetworkServiceCopyAll(sourcePrefs); + if (isA_CFArray(sourceSCNetworkServices) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: sourceSCNetworkServices is NULL or not of the correct CFType")); + goto done; + } + targetSCNetworkServices = SCNetworkServiceCopyAll(targetPrefs); + if (isA_CFArray(targetSCNetworkServices) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetSCNetworkServices is NULL or not of the correct CFType")); + goto done; + } + + sourceCount = CFArrayGetCount(sourceSCNetworkServices); + + sourceSCNetworkServicesMutable = CFArrayCreateMutableCopy(NULL, 0, sourceSCNetworkServices); + targetSCNetworkServicesMutable = CFArrayCreateMutableCopy(NULL, 0, targetSCNetworkServices); + + serviceMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + for (CFIndex idx = 0; idx < sourceCount; idx++) { + sourceBSDName = NULL; + sourceService = NULL; + sourceInterface = NULL; + sourceInterfaceType = NULL; + sourceInterfaceSubType = NULL; + bsdNameMapTarget = NULL; + + targetCount = CFArrayGetCount(targetSCNetworkServicesMutable); + sourceService = (SCNetworkServiceRef) CFArrayGetValueAtIndex(sourceSCNetworkServicesMutable, idx); + + sourceInterface = SCNetworkServiceGetInterface(sourceService); + + if (sourceInterface == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: sourceInterface is NULL or not of the correct type")); + continue; + } + + sourceInterfaceType = __SCNetworkInterfaceGetEntityType(sourceInterface); + if ((isA_CFString(sourceInterfaceType) != NULL) && + ((CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeVPN) == TRUE) || + (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypePPP) == TRUE))) { + sourceInterfaceSubType = __SCNetworkInterfaceGetEntitySubType(sourceInterface); + if (isA_CFString(sourceInterfaceSubType) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: sourceInterfaceSubType is NULL or not of the correct type")); + continue; + } + } + else if (((isA_CFString(sourceInterfaceType) != NULL) && + (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeIPSec) == FALSE) && + (CFEqual(sourceInterfaceType, kSCValNetInterfaceType6to4) == FALSE) && + (CFEqual(sourceInterfaceType, kSCValNetInterfaceTypeLoopback) == FALSE)) || + (isA_CFString(sourceInterfaceType) == NULL)) { + sourceBSDName = SCNetworkInterfaceGetBSDName(sourceInterface); + if ((isA_CFString(sourceBSDName) == NULL) || + (CFDictionaryContainsKey(bsdNameMapping, sourceBSDName)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: bsdNameMapping doesn't contain sourceBSDName: %@"), (sourceBSDName == NULL) ? CFSTR("NULL") : sourceBSDName); + continue; + } + + bsdNameMapTarget = CFDictionaryGetValue(bsdNameMapping, sourceBSDName); + if (isA_CFString(bsdNameMapTarget) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: bsdNameMapTarget is NULL or not of the correct CFType")); + continue; + } + } + // Find the bsd name in target service + for (CFIndex idx2 = 0; idx2 < targetCount; idx2++) { + targetService = NULL; + targetInterface = NULL; + targetBSDName = NULL; + targetInterfaceType = NULL; + targetInterfaceSubType = NULL; + + targetService = (SCNetworkServiceRef) CFArrayGetValueAtIndex(targetSCNetworkServicesMutable, idx2); + + targetInterface = SCNetworkServiceGetInterface(targetService); + if (targetInterface == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetInterface is NULL or not of the correct type")); + continue; + } + SCLog(_sc_debug, LOG_NOTICE, CFSTR("targetInterface: %@"), targetInterface); + if (sourceBSDName != NULL) { + targetBSDName = SCNetworkInterfaceGetBSDName(targetInterface); + if (isA_CFString(targetBSDName) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetBSDName is NULL or not of the correct type")); + continue; + } + + if (CFEqual(targetBSDName, bsdNameMapTarget) == TRUE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: Removing target BSD Name: %@"), targetBSDName); + CFDictionaryAddValue(serviceMapping, sourceService, targetService); + CFArrayRemoveValueAtIndex(targetSCNetworkServicesMutable, idx2); + break; + } + } + else { + // Source Interface Type should be VPN + targetInterfaceType = __SCNetworkInterfaceGetEntityType(targetInterface); + if ((isA_CFString(targetInterfaceType) == NULL) || + ((CFEqual(targetInterfaceType, kSCValNetInterfaceTypeVPN) == FALSE) && + (CFEqual(targetInterfaceType, kSCValNetInterfaceTypePPP) == FALSE))) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetInterfaceType is NULL or not of the correct type : %@"), (targetInterfaceType != NULL) ? targetInterfaceType : CFSTR("NULL")); + continue; + } + targetInterfaceSubType = __SCNetworkInterfaceGetEntitySubType(targetInterface); + if (isA_CFString(targetInterfaceSubType) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: targetInterfaceSubType is NULL or not of the correct type: %@"), (targetInterfaceSubType != NULL) ? targetInterfaceSubType : CFSTR("NULL")); + continue; + } + + // Check if the target interface type and the target interface sub type match + if ((CFEqual(targetInterfaceType, sourceInterfaceType) == TRUE) && + (CFEqual(targetInterfaceSubType, sourceInterfaceSubType) == TRUE)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: Removing target BSD Name: %@ for VPN"), targetBSDName); + CFDictionaryAddValue(serviceMapping, sourceService, targetService); + CFArrayRemoveValueAtIndex(targetSCNetworkServicesMutable, idx2); + break; + } + } + } + // Check if sourceService has found a mapping or not, if not the create a NULL mapping to indicate + // the this service needs to be added and not replaced + if (CFDictionaryContainsKey(serviceMapping, sourceService) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationCreateServiceMappingUsingBSDMapping: Service needs to be added: %@"), sourceService); + CFDictionaryAddValue(serviceMapping, sourceService, kCFBooleanFalse); + } + } +done: + if (sourceSCNetworkServices != NULL) { + CFRelease(sourceSCNetworkServices); + } + if (targetSCNetworkServices != NULL) { + CFRelease(targetSCNetworkServices); + } + if (sourceSCNetworkServicesMutable != NULL) { + CFRelease(sourceSCNetworkServicesMutable); + } + if (targetSCNetworkServicesMutable != NULL) { + CFRelease(targetSCNetworkServicesMutable); + } + return serviceMapping; +} + +typedef struct { + SCPreferencesRef targetPrefs; + CFDictionaryRef bsdMapping; + CFDictionaryRef setMapping; + CFDictionaryRef serviceSetMapping; +} ServiceMigrationContext; + +// value can be: +// SCNetworkServiceRef: if target service needs replacement +// CFBooleanRef: if target service is not present +static void +ServiceMigrationAddOrReplace(const void *key, const void *value, void *context) +{ + CFDictionaryRef bsdMapping = NULL; + ServiceMigrationContext *ctx = (ServiceMigrationContext*)context; + CFDictionaryRef setMapping; + CFDictionaryRef sourceServiceSetMapping; + SCNetworkServiceRef sourceService = (SCNetworkServiceRef)key; + SCPreferencesRef targetPrefs = NULL; + SCNetworkServiceRef targetService = (SCNetworkServiceRef)value; + + targetPrefs = ctx->targetPrefs; + bsdMapping = ctx->bsdMapping; + setMapping = ctx->setMapping; + sourceServiceSetMapping = ctx->serviceSetMapping; + + if (isA_SCNetworkService(targetService) != NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("ServiceMigrationAddOrReplace: Removing target service: %@"), targetService); + SCNetworkServiceRemove(targetService); + } + SCLog(_sc_debug, LOG_NOTICE, CFSTR("ServiceMigrationAddOrReplace: Adding service with %@"), sourceService); + if (__SCNetworkServiceMigrateNew(targetPrefs, sourceService, bsdMapping, setMapping, sourceServiceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("Could not Add Service: %@"), sourceService); + } +} + +static Boolean +_SCNetworkMigrationDoServiceMigration(SCPreferencesRef sourcePrefs, SCPreferencesRef targetPrefs, + CFDictionaryRef serviceMapping, CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, CFDictionaryRef serviceSetMapping) +{ + ServiceMigrationContext context; + Boolean success = FALSE; + + if ((sourcePrefs == NULL) || + (targetPrefs == NULL) || + (isA_CFDictionary(serviceMapping) == NULL) || + (isA_CFDictionary(bsdMapping) == NULL)) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoServiceMigration: targetPrefs or serviceMapping or bsdMapping is NULL")); + goto done; + } + context.targetPrefs = targetPrefs; + context.bsdMapping = bsdMapping; + context.setMapping = setMapping; + context.serviceSetMapping = serviceSetMapping; + + CFDictionaryApplyFunction(serviceMapping, ServiceMigrationAddOrReplace, &context); + + success = TRUE; +done: + return success; +} + +static Boolean +_SCNetworkMigrationDoSystemMigration(SCPreferencesRef sourcePrefs, SCPreferencesRef targetPrefs) +{ + CFStringEncoding nameEncoding; + CFStringRef computerName; + CFStringRef hostname; + CFStringRef localHostname; + CFDictionaryRef btmm = NULL; + CFDictionaryRef btmmDSID = NULL; + CFStringRef btmmDSIDPath; + CFStringRef btmmPath; + + + if ((sourcePrefs == NULL) || + (targetPrefs == NULL)) { + return FALSE; + } + + hostname = SCPreferencesGetHostName(sourcePrefs); + if (hostname != NULL) { + SCPreferencesSetHostName(targetPrefs, hostname); + } + + localHostname = _SCPreferencesCopyLocalHostName(sourcePrefs); + if (localHostname != NULL) { + SCPreferencesSetLocalHostName(targetPrefs, localHostname); + CFRelease(localHostname); + } + + computerName = _SCPreferencesCopyComputerName(sourcePrefs, &nameEncoding); + + if (computerName != NULL) { + SCPreferencesSetComputerName(targetPrefs, computerName, nameEncoding); + CFRelease(computerName); + } + + btmmPath = CFStringCreateWithFormat(NULL, NULL, + CFSTR("/%@/%@/%@"), + kSCPrefSystem, + kSCCompNetwork, + BACK_TO_MY_MAC); + btmm = SCPreferencesPathGetValue(sourcePrefs, btmmPath); + + if (btmm != NULL) { + SCPreferencesPathSetValue(targetPrefs, btmmPath, btmm); + } + CFRelease(btmmPath); + + btmmDSIDPath = CFStringCreateWithFormat(NULL, NULL, + CFSTR("/%@/%@/%@"), + kSCPrefSystem, + kSCCompNetwork, + BACK_TO_MY_MAC_DSIDS); + + btmmDSID = SCPreferencesPathGetValue(sourcePrefs, btmmDSIDPath); + if (btmmDSID != NULL) { + SCPreferencesPathSetValue(targetPrefs, btmmDSIDPath, btmmDSID); + } + CFRelease(btmmDSIDPath); + + return TRUE; +} +#if !TARGET_OS_IPHONE + +typedef struct { + CFMutableArrayRef interfaceList; + SCPreferencesRef ni_prefs; + CFDictionaryRef bsdMapping; +} SCVirtualInterfaceMemberListContext; + +typedef struct { + SCPreferencesRef prefs; + SCPreferencesRef ni_prefs; + CFDictionaryRef bsdMapping; + CFDictionaryRef virtualBSDMapping; + CFDictionaryRef mappingBSDNameToService; + CFDictionaryRef setMapping; + CFDictionaryRef serviceSetMapping; +} SCVirtualInterfaceContext; + +static void +add_virtual_interface(const void *value, void *context) +{ + SCVirtualInterfaceMemberListContext *ctx = (SCVirtualInterfaceMemberListContext*)context; + CFMutableArrayRef interfaceList = ctx->interfaceList; + CFDictionaryRef bsdMapping = ctx->bsdMapping; + CFStringRef oldInterfaceBSDName = (CFStringRef)value; + SCNetworkInterfaceRef newInterface; + CFStringRef newInterfaceBSDName; + + SCLog(_sc_debug, LOG_NOTICE, CFSTR("old interface BSD name is %@"), oldInterfaceBSDName); + newInterfaceBSDName = CFDictionaryGetValue(bsdMapping, oldInterfaceBSDName); + if (newInterfaceBSDName == NULL) { + return; + } + + SCLog(_sc_debug, LOG_NOTICE, CFSTR("new interface BSD name is %@"), newInterfaceBSDName); + newInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ctx->ni_prefs, newInterfaceBSDName); + + if (newInterface != NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("Adding interface to interfaceList: %@"), newInterface); + CFArrayAppendValue(interfaceList, newInterface); + CFRelease(newInterface); + } + return; +} + +static void +add_target_bridge(const void *key, const void *value, void *context) +{ + CFStringRef bridgeName; + CFDictionaryRef bridgeOptions; + SCVirtualInterfaceContext *ctx = (SCVirtualInterfaceContext*)context; + CFDictionaryRef bridgeBSDNameMapping = ctx->virtualBSDMapping; + CFDictionaryRef bsdNameToServiceMapping = ctx->mappingBSDNameToService; + SCVirtualInterfaceMemberListContext memberListContext; + CFMutableArrayRef newInterfaceList; + SCBridgeInterfaceRef newBridge; + SCBridgeInterfaceRef oldBridge = (SCBridgeInterfaceRef)key; + CFStringRef oldBSDName; + CFArrayRef oldInterfaceList = (CFArrayRef)value; + CFArrayRef oldServiceList; + SCPreferencesRef prefs = ctx->prefs; + CFDictionaryRef serviceSetMapping = ctx->serviceSetMapping; + CFDictionaryRef setMapping = ctx->setMapping; + + newInterfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + memberListContext.bsdMapping = ctx->bsdMapping; + memberListContext.interfaceList = newInterfaceList; + memberListContext.ni_prefs = ctx->ni_prefs; + + CFArrayApplyFunction(oldInterfaceList, CFRangeMake(0, CFArrayGetCount(oldInterfaceList)), add_virtual_interface, &memberListContext); + + newBridge = SCBridgeInterfaceCreate(prefs); + + if (__SCBridgeInterfaceSetMemberInterfaces(newBridge, newInterfaceList) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bridge: Adding Member Interfaces failed")); + } + CFRelease(newInterfaceList); + + bridgeOptions = SCBridgeInterfaceGetOptions(oldBridge); + if (bridgeOptions != NULL) { + SCBridgeInterfaceSetOptions(newBridge, bridgeOptions); + } + + bridgeName = SCNetworkInterfaceGetLocalizedDisplayName(oldBridge); + + if (bridgeName != NULL) { + SCBridgeInterfaceSetLocalizedDisplayName(newBridge, bridgeName); + } + + oldBSDName = SCNetworkInterfaceGetBSDName(oldBridge); + if (oldBSDName == NULL) { + goto done; + } + + oldServiceList = CFDictionaryGetValue(bsdNameToServiceMapping, oldBSDName); + if (oldServiceList == NULL) { + goto done; + } + + for (CFIndex idx = 0; idx < CFArrayGetCount(oldServiceList); idx++) { + SCNetworkServiceRef oldService = CFArrayGetValueAtIndex(oldServiceList, idx); + if (__SCNetworkServiceMigrateNew(prefs, oldService, bridgeBSDNameMapping, setMapping, serviceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bridge: Could not migrate service: %@"), oldService); + } + } +done: + CFRelease(newBridge); +} + +static void +_SCNetworkMigrationRemoveBridgeServices(SCPreferencesRef prefs) +{ + CFArrayRef services = SCNetworkServiceCopyAll(prefs); + + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx); + SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service); + CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface); + + if ((bsdName != NULL) && + SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBridge) { + SCLog(TRUE, LOG_NOTICE, CFSTR("_SCNetworkMigrationRemoveBridgeServices: Removing services: %@"), service); + SCNetworkServiceRemove(service); + } + } + CFRelease(services); +} + + +static CFDictionaryRef +_SCNetworkMigrationCopyMappingBSDNameToBridgeServices(SCPreferencesRef prefs) +{ + CFArrayRef services = SCNetworkServiceCopyAll(prefs); + CFMutableDictionaryRef bridgeServices = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx); + SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service); + CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface); + + if ((bsdName != NULL) && + SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBridge) { + CFMutableArrayRef serviceList; + if (CFDictionaryContainsKey(bridgeServices, bsdName) == FALSE) { + serviceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFDictionaryAddValue(bridgeServices, bsdName, serviceList); + CFRelease(serviceList); + } + serviceList = (CFMutableArrayRef)CFDictionaryGetValue(bridgeServices, bsdName); + CFArrayAppendValue(serviceList, service); + } + } + CFRelease(services); + return bridgeServices; +} + + +static Boolean +_SCNetworkMigrationDoBridgeMigration (SCPreferencesRef sourcePrefs, + SCPreferencesRef sourceNIPrefs, + SCPreferencesRef targetPrefs, + SCPreferencesRef targetNIPrefs, + CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, + CFDictionaryRef serviceSetMapping) +{ + CFArrayRef allSourceBridges; + CFArrayRef allTargetBridges; + SCBridgeInterfaceRef bridge; + CFMutableDictionaryRef bridgeInterfaceMapping = NULL; + CFMutableDictionaryRef bridgeMapping; + CFDictionaryRef bsdNameToBridgeServices; + SCVirtualInterfaceContext context; + CFIndex count = 0; + Boolean success = FALSE; + + allSourceBridges = SCBridgeInterfaceCopyAll(sourcePrefs); + allTargetBridges = SCBridgeInterfaceCopyAll(targetPrefs); + + bsdNameToBridgeServices = _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(sourcePrefs); + + bridgeInterfaceMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + bridgeMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + // Create Bridge Interface Mapping + for (CFIndex idx = 0; idx < CFArrayGetCount(allSourceBridges); idx++) { + bridge = CFArrayGetValueAtIndex(allSourceBridges, idx); + CFArrayRef bridgeMembers = SCBridgeInterfaceGetMemberInterfaces(bridge); + CFMutableArrayRef interfaceList; + + interfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(bridgeMembers); idx2++) { + CFStringRef interfaceName = NULL; + SCNetworkInterfaceRef interface = NULL; + + interface = CFArrayGetValueAtIndex(bridgeMembers, idx2); + interfaceName = SCNetworkInterfaceGetBSDName(interface); + + if (CFDictionaryContainsKey(bsdMapping, interfaceName) == TRUE) { + CFStringRef bridgeNewName = CFStringCreateWithFormat(NULL, NULL, CFSTR("bridge%ld"), count); + CFDictionaryAddValue(bridgeMapping, interfaceName, bridgeNewName); + CFArrayAppendValue(interfaceList, interfaceName); + CFRelease(bridgeNewName); + count++; + } + } + if (CFArrayGetCount(interfaceList) > 0) { + CFDictionaryAddValue(bridgeInterfaceMapping, bridge, interfaceList); + } + CFRelease(interfaceList); + } + // Remove bridge services from target + _SCNetworkMigrationRemoveBridgeServices(targetPrefs); + + // Remove Target Bridges + for (CFIndex idx = 0; idx < CFArrayGetCount(allTargetBridges); idx++) { + bridge = CFArrayGetValueAtIndex(allTargetBridges, idx); + if (SCBridgeInterfaceRemove(bridge) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoBridgeMigration: Could not remove bridge: %@"), bridge); + goto done; + } + } + + context.prefs = targetPrefs; + context.ni_prefs = targetNIPrefs; + context.bsdMapping = bsdMapping; + context.virtualBSDMapping = bridgeMapping; + context.mappingBSDNameToService = bsdNameToBridgeServices; + context.setMapping = setMapping; + context.serviceSetMapping = serviceSetMapping; + + // Add Bridge configurations at the target using mapping + CFDictionaryApplyFunction(bridgeInterfaceMapping, add_target_bridge, &context); + + success = TRUE; +done: + CFRelease(allSourceBridges); + CFRelease(allTargetBridges); + CFRelease(bridgeInterfaceMapping); + CFRelease(bridgeMapping); + CFRelease(bsdNameToBridgeServices); + return success; +} + + +static void +add_target_bond(const void *key, const void *value, void *context) +{ + CFNumberRef bondMode; + CFStringRef bondName; + CFDictionaryRef bondOptions; + SCVirtualInterfaceContext *ctx = (SCVirtualInterfaceContext*)context; + CFDictionaryRef bondBSDNameMapping = ctx->virtualBSDMapping; + CFDictionaryRef bsdNameToServiceMapping = ctx->mappingBSDNameToService; + SCVirtualInterfaceMemberListContext memberListContext; + CFMutableArrayRef newInterfaceList; + SCBondInterfaceRef newBond; + SCBondInterfaceRef oldBond = (SCBondInterfaceRef)key; + CFStringRef oldBSDName; + CFArrayRef oldInterfaceList = (CFArrayRef)value; + CFArrayRef oldServiceList; + SCPreferencesRef prefs = ctx->prefs; + CFDictionaryRef serviceSetMapping = ctx->serviceSetMapping; + CFDictionaryRef setMapping = ctx->setMapping; + + newInterfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + memberListContext.bsdMapping = ctx->bsdMapping; + memberListContext.interfaceList = newInterfaceList; + memberListContext.ni_prefs = ctx->ni_prefs; + + CFArrayApplyFunction(oldInterfaceList, CFRangeMake(0, CFArrayGetCount(oldInterfaceList)), add_virtual_interface, &memberListContext); + + newBond = SCBondInterfaceCreate(prefs); + if (__SCBondInterfaceSetMemberInterfaces(newBond, newInterfaceList) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bond: Adding member interface failed.")); + } + CFRelease(newInterfaceList); + + bondOptions = SCBondInterfaceGetOptions(oldBond); + if (bondOptions != NULL) { + SCBondInterfaceSetOptions(newBond, bondOptions); + } + + bondName = SCNetworkInterfaceGetLocalizedDisplayName(oldBond); + if (bondName != NULL) { + SCBondInterfaceSetLocalizedDisplayName(newBond, bondName); + } + + bondMode = SCBondInterfaceGetMode(oldBond); + if (bondMode != NULL) { + SCBondInterfaceSetMode(newBond, bondMode); + } + oldBSDName = SCNetworkInterfaceGetBSDName(oldBond); + if (oldBSDName == NULL) { + goto done; + } + + oldServiceList = CFDictionaryGetValue(bsdNameToServiceMapping, oldBSDName); + if (oldServiceList == NULL) { + goto done; + } + + for (CFIndex idx = 0; idx < CFArrayGetCount(oldServiceList); idx++) { + SCNetworkServiceRef oldService = CFArrayGetValueAtIndex(oldServiceList, idx); + if (__SCNetworkServiceMigrateNew(prefs, oldService, bondBSDNameMapping, setMapping, serviceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_bond: Could not migrate service: %@"), oldService); + } + } +done: + CFRelease(newBond); +} + +static void +_SCNetworkMigrationRemoveBondServices(SCPreferencesRef prefs) +{ + CFArrayRef services = SCNetworkServiceCopyAll(prefs); + + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx); + SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service); + CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface); + + if ((bsdName != NULL) && + SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBond) { + SCNetworkServiceRemove(service); + } + } + CFRelease(services); +} + + +static CFDictionaryRef +_SCNetworkMigrationCopyMappingBSDNameToBondServices(SCPreferencesRef prefs) +{ + CFArrayRef services = SCNetworkServiceCopyAll(prefs); + CFMutableDictionaryRef bondServices = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx); + SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service); + CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface); + + if ((bsdName != NULL) && + SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeBond) { + CFMutableArrayRef serviceList; + if (CFDictionaryContainsKey(bondServices, bsdName) == FALSE) { + serviceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFDictionaryAddValue(bondServices, bsdName, serviceList); + CFRelease(serviceList); + } + serviceList = (CFMutableArrayRef)CFDictionaryGetValue(bondServices, bsdName); + CFArrayAppendValue(serviceList, service); + } + } + CFRelease(services); + return bondServices; +} + + +static Boolean +_SCNetworkMigrationDoBondMigration (SCPreferencesRef sourcePrefs, + SCPreferencesRef sourceNIPrefs, + SCPreferencesRef targetPrefs, + SCPreferencesRef targetNIPrefs, + CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, + CFDictionaryRef serviceSetMapping) +{ + CFArrayRef allSourceBonds; + CFArrayRef allTargetBonds; + SCBondInterfaceRef bond; + CFMutableDictionaryRef bondInterfaceMapping = NULL; + CFMutableDictionaryRef bondMapping; + CFDictionaryRef bsdNameToBondServices; + SCVirtualInterfaceContext context; + CFIndex count = 0; + Boolean success = FALSE; + + allSourceBonds = SCBondInterfaceCopyAll(sourcePrefs); + allTargetBonds = SCBondInterfaceCopyAll(targetPrefs); + + bsdNameToBondServices = _SCNetworkMigrationCopyMappingBSDNameToBondServices(sourcePrefs); + + bondInterfaceMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + bondMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + // Create Bond Interface mapping + for (CFIndex idx = 0; idx < CFArrayGetCount(allSourceBonds); idx++) { + bond = CFArrayGetValueAtIndex(allSourceBonds, idx); + CFArrayRef bondMembers = SCBondInterfaceGetMemberInterfaces(bond); + CFMutableArrayRef interfaceList; + + interfaceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + for (CFIndex idx2 = 0; idx2 < CFArrayGetCount(bondMembers); idx2++) { + CFStringRef interfaceName; + SCNetworkInterfaceRef interface; + + interface = CFArrayGetValueAtIndex(bondMembers, idx2); + interfaceName = SCNetworkInterfaceGetBSDName(interface); + + if (CFDictionaryContainsKey(bsdMapping, interfaceName) == TRUE) { + CFStringRef bondNewName = CFStringCreateWithFormat(NULL, NULL, CFSTR("bond%ld"), count); + CFDictionaryAddValue(bondMapping, interfaceName, bondNewName); + CFArrayAppendValue(interfaceList, interfaceName); + CFRelease(bondNewName); + count++; + } + } + if (CFArrayGetCount(interfaceList) > 0) { + CFDictionaryAddValue(bondInterfaceMapping, bond, interfaceList); + } + CFRelease(interfaceList); + } + // Remove bond services from target + _SCNetworkMigrationRemoveBondServices(targetPrefs); + + // Remove Target Bonds + for (CFIndex idx = 0; idx < CFArrayGetCount(allTargetBonds); idx++) { + bond = CFArrayGetValueAtIndex(allTargetBonds, idx); + if (SCBondInterfaceRemove(bond) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoBondMigration: Could not remove bond: %@"), bond); + goto done; + } + } + + context.prefs = targetPrefs; + context.ni_prefs = targetNIPrefs; + context.bsdMapping = bsdMapping; + context.virtualBSDMapping = bondMapping; + context.mappingBSDNameToService = bsdNameToBondServices; + context.setMapping = setMapping; + context.serviceSetMapping = serviceSetMapping; + + // Add Bond configurations at the target using mapping + CFDictionaryApplyFunction(bondInterfaceMapping, add_target_bond, &context); + + success = TRUE; +done: + CFRelease(allSourceBonds); + CFRelease(allTargetBonds); + CFRelease(bondInterfaceMapping); + CFRelease(bondMapping); + CFRelease(bsdNameToBondServices); + return success; +} + +static void +add_target_vlan(const void *value, void *context) +{ + CFDictionaryRef bsdMapping; + SCVirtualInterfaceContext *ctx = (SCVirtualInterfaceContext*)context; + CFDictionaryRef bsdNameToServiceMapping = ctx->mappingBSDNameToService; + SCPreferencesRef prefs = ctx->prefs; + SCVLANInterfaceRef newVLAN = NULL; + SCNetworkInterfaceRef newPhysicalInterface = NULL; + CFStringRef newPhysicalInterfaceName; + SCVLANInterfaceRef oldVLAN = (SCVLANInterfaceRef)value; + CFStringRef oldBSDName; + SCNetworkInterfaceRef oldPhysicalInterface; + CFStringRef oldPhysicalInterfaceName; + SCNetworkServiceRef oldService; + CFArrayRef oldServiceList; + CFDictionaryRef serviceSetMapping = ctx->serviceSetMapping; + CFDictionaryRef setMapping = ctx->setMapping; + CFDictionaryRef vlanBSDMapping = ctx->virtualBSDMapping; + CFNumberRef vlanTag; + CFStringRef vlanName; + CFDictionaryRef vlanOptions; + + bsdMapping = ctx->bsdMapping; + oldPhysicalInterface = SCVLANInterfaceGetPhysicalInterface(oldVLAN); + + if (oldPhysicalInterface == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: oldPhysicalInterface is NULL")); + goto done; + } + oldPhysicalInterfaceName = SCNetworkInterfaceGetBSDName(oldPhysicalInterface); + + if (oldPhysicalInterfaceName == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: oldPhysicalInterfaceName is NULL")); + goto done; + } + + newPhysicalInterfaceName = CFDictionaryGetValue(bsdMapping, oldPhysicalInterfaceName); + if (newPhysicalInterfaceName == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: newPhysicalInterfaceName is NULL")); + goto done; + } + newPhysicalInterface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ctx->ni_prefs, newPhysicalInterfaceName); + if (newPhysicalInterface == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: newPhysicalInterface is NULL")); + goto done; + } + + vlanTag = SCVLANInterfaceGetTag(oldVLAN); + if (vlanTag == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: vlanTag is NULL")); + goto done; + } + + newVLAN = SCVLANInterfaceCreate(prefs, newPhysicalInterface, vlanTag); + if (newVLAN == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: Could not create newVLAN")); + } + + vlanName = SCNetworkInterfaceGetLocalizedDisplayName(oldVLAN); + if (vlanName != NULL) { + SCVLANInterfaceSetLocalizedDisplayName(newVLAN, vlanName); + } + + vlanOptions = SCVLANInterfaceGetOptions(oldVLAN); + if (vlanOptions != NULL) { + SCVLANInterfaceSetOptions(newVLAN, vlanOptions); + } + oldBSDName = SCNetworkInterfaceGetBSDName(oldVLAN); + + if (oldBSDName == NULL) { + goto done; + } + + oldServiceList = CFDictionaryGetValue(bsdNameToServiceMapping, oldBSDName); + if (oldServiceList == NULL) { + goto done; + } + + for (CFIndex idx = 0; idx < CFArrayGetCount(oldServiceList); idx++) { + oldService = CFArrayGetValueAtIndex(oldServiceList, idx); + if (__SCNetworkServiceMigrateNew(prefs, oldService, vlanBSDMapping, setMapping, serviceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("add_target_vlan: Could not migrate service: %@"), oldService); + } + } + +done: + if (newPhysicalInterface != NULL) { + CFRelease(newPhysicalInterface); + } + if (newVLAN != NULL) { + CFRelease(newVLAN); + } +} + +static void +_SCNetworkMigrationRemoveVLANServices(SCPreferencesRef prefs) +{ + CFArrayRef services = SCNetworkServiceCopyAll(prefs); + + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx); + SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service); + CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface); + + if ((bsdName != NULL) && + SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeVLAN) { + SCNetworkServiceRemove(service); + } + } + + CFRelease(services); +} + + +static CFDictionaryRef +_SCNetworkMigrationCopyMappingBSDNameToVLANServices(SCPreferencesRef prefs) +{ + CFArrayRef services = SCNetworkServiceCopyAll(prefs); + CFMutableDictionaryRef vlanServices = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + for (CFIndex idx = 0; idx < CFArrayGetCount(services); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(services, idx); + SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service); + CFStringRef bsdName = SCNetworkInterfaceGetBSDName(interface); + + if ((bsdName != NULL) && + SCNetworkInterfaceGetInterfaceType(interface) == kSCNetworkInterfaceTypeVLAN) { + CFMutableArrayRef serviceList; + if (CFDictionaryContainsKey(vlanServices, bsdName) == FALSE) { + serviceList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFDictionaryAddValue(vlanServices, bsdName, serviceList); + CFRelease(serviceList); + } + serviceList = (CFMutableArrayRef)CFDictionaryGetValue(vlanServices, bsdName); + CFArrayAppendValue(serviceList, service); + } + } + CFRelease(services); + return vlanServices; +} + +static Boolean +_SCNetworkMigrationDoVLANMigration (SCPreferencesRef sourcePrefs, + SCPreferencesRef sourceNIPrefs, + SCPreferencesRef targetPrefs, + SCPreferencesRef targetNIPrefs, + CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, + CFDictionaryRef serviceSetMapping) +{ + CFArrayRef allSourceVLAN; + CFArrayRef allTargetVLAN; + SCVirtualInterfaceContext context; + CFIndex count = 0; + Boolean success = FALSE; + SCVLANInterfaceRef vlan; + CFMutableArrayRef vlanList; + CFMutableDictionaryRef vlanMapping; + CFDictionaryRef bsdNameToVLANServices; + + allSourceVLAN = SCVLANInterfaceCopyAll(sourcePrefs); + allTargetVLAN = SCVLANInterfaceCopyAll(targetPrefs); + + bsdNameToVLANServices = _SCNetworkMigrationCopyMappingBSDNameToVLANServices(sourcePrefs); + + vlanList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + vlanMapping = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + + for (CFIndex idx = 0; idx < CFArrayGetCount(allSourceVLAN); idx++) { + vlan = CFArrayGetValueAtIndex(allSourceVLAN, idx); + CFStringRef vlanBSDName = SCNetworkInterfaceGetBSDName(vlan); + SCNetworkInterfaceRef physicalInterface = SCVLANInterfaceGetPhysicalInterface(vlan); + CFStringRef physicalInterfaceName; + + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVLANMigration: physical interface is %@"), physicalInterface); + + physicalInterfaceName = SCNetworkInterfaceGetBSDName(physicalInterface); + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVLANMigration: Physical Interface name is %@"), physicalInterfaceName); + + // Add VLAN to be migrated if the mapping between interfaces exists + if (CFDictionaryContainsKey(bsdMapping, physicalInterfaceName) == TRUE) { + CFStringRef vlanNewName = CFStringCreateWithFormat(NULL, NULL, CFSTR("vlan%ld"), count); + CFDictionaryAddValue(vlanMapping, vlanBSDName, vlanNewName); + CFArrayAppendValue(vlanList, vlan); + CFRelease(vlanNewName); + count++; + } + } + // Remove vlan services from target + _SCNetworkMigrationRemoveVLANServices(targetPrefs); + + // Remove Target VLANs + for (CFIndex idx = 0; idx < CFArrayGetCount(allTargetVLAN); idx++) { + vlan = CFArrayGetValueAtIndex(allTargetVLAN, idx); + if (SCVLANInterfaceRemove(vlan) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVLANMigration: Could not remove VLAN: %@"), vlan); + goto done; + } + } + + context.prefs = targetPrefs; + context.ni_prefs = targetNIPrefs; + context.bsdMapping = bsdMapping; + context.virtualBSDMapping = vlanMapping; + context.mappingBSDNameToService = bsdNameToVLANServices; + context.setMapping = setMapping; + context.serviceSetMapping = serviceSetMapping; + + // Add VLAN configurations at the target using vlanList + CFArrayApplyFunction(vlanList, CFRangeMake(0, CFArrayGetCount(vlanList)), add_target_vlan, &context); + + success = TRUE; +done: + CFRelease(allSourceVLAN); + CFRelease(allTargetVLAN); + CFRelease(vlanList); + CFRelease(vlanMapping); + CFRelease(bsdNameToVLANServices); + return success; +} + +static Boolean +_SCNetworkMigrationDoVirtualNetworkInterfaceMigration(SCPreferencesRef sourcePrefs, + SCPreferencesRef sourceNIPrefs, + SCPreferencesRef targetPrefs, + SCPreferencesRef targetNIPrefs, + CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, + CFDictionaryRef serviceSetMapping) +{ + // Handle Bridges + if (_SCNetworkMigrationDoBridgeMigration(sourcePrefs, sourceNIPrefs, + targetPrefs, targetNIPrefs, + bsdMapping, setMapping, serviceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: Bridge migration failed")); + } + + // Handle Bonds + if (_SCNetworkMigrationDoBondMigration(sourcePrefs, sourceNIPrefs, + targetPrefs, targetNIPrefs, + bsdMapping, setMapping, serviceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: Bond migration failed")); + } + + // Handle VLANs + if (_SCNetworkMigrationDoVLANMigration(sourcePrefs, sourceNIPrefs, + targetPrefs, targetNIPrefs, + bsdMapping, setMapping, serviceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: VLAN migration failed")); + } + return TRUE; +} +#endif + +typedef struct { + SCPreferencesRef prefs; + CFArrayRef serviceOrder; + CFMutableArrayRef serviceListMutable; + Boolean* success; +} migrated_service_context; + +static void +create_migrated_order(const void *value, void *context) +{ + migrated_service_context *ctx = (migrated_service_context*)context; + CFMutableArrayRef migratedServiceOrder = ctx->serviceListMutable; + CFArrayRef targetServiceOrder = ctx->serviceOrder; + CFStringRef migratedServiceID = (CFStringRef)value; + Boolean *success = ctx->success; + + if (*success == FALSE) { + return; + } + // Preserving the service order in the source configuration for the services + // which were migrated into the target configuration + for (CFIndex idx = 0; idx < CFArrayGetCount(targetServiceOrder); idx++) { + CFStringRef targetServiceID = CFArrayGetValueAtIndex(targetServiceOrder, idx); + if (CFEqual(migratedServiceID, targetServiceID) == TRUE) { + CFArrayAppendValue(migratedServiceOrder, migratedServiceID); + return; + } + } +} + +static void +create_non_migrated_service_list(const void *value, void *context) +{ + migrated_service_context *ctx = (migrated_service_context*)context; + CFArrayRef migratedServiceOrder = ctx->serviceOrder; + CFMutableArrayRef nonMigratedService = ctx->serviceListMutable; + SCPreferencesRef prefs = ctx->prefs; + SCNetworkServiceRef service; + Boolean *success = ctx->success; + CFStringRef targetServiceID = (CFStringRef)value; + + if (*success == FALSE) { + return; + } + // Adding all services not present in migratedServiceOrder into nonMigrated service + for (CFIndex idx = 0; idx < CFArrayGetCount(migratedServiceOrder); idx++) { + CFStringRef migratedServiceID = CFArrayGetValueAtIndex(migratedServiceOrder, idx); + + if (CFEqual(targetServiceID, migratedServiceID) == TRUE) { + return; + } + } + service = SCNetworkServiceCopy(prefs, targetServiceID); + if (service == NULL) { + *success = FALSE; + return; + } + + CFArrayAppendValue(nonMigratedService, service); + CFRelease(service); +} + +static void +preserve_service_order(const void *key, const void *value, void *context) +{ + migrated_service_context migrated_context; + CFMutableArrayRef migratedServiceOrder; + migrated_service_context non_migrated_context; + CFMutableArrayRef nonMigratedServices; + SCNetworkSetRef sourceSet = (SCNetworkSetRef)key; + CFArrayRef sourceServiceOrder = NULL; + Boolean *success = (Boolean*)context; + SCNetworkSetRef targetSet = (SCNetworkSetRef)value; + SCNetworkSetPrivateRef targetPrivate = (SCNetworkSetPrivateRef)targetSet; + CFArrayRef targetServiceOrder = NULL; + + if (*success == FALSE) { + return; + } + migratedServiceOrder = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + nonMigratedServices = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + sourceServiceOrder = SCNetworkSetGetServiceOrder(sourceSet); + if (sourceServiceOrder == NULL) { + goto done; + } + targetServiceOrder = SCNetworkSetGetServiceOrder(targetSet); + if (targetServiceOrder == NULL) { + goto done; + } + + migrated_context.prefs = NULL; + migrated_context.serviceOrder = targetServiceOrder; + migrated_context.serviceListMutable = migratedServiceOrder; + migrated_context.success = success; + + // Creating a list of service IDs which were migrated in the target set + // while maintaining the service order or the source set + CFArrayApplyFunction(sourceServiceOrder, CFRangeMake(0, CFArrayGetCount(sourceServiceOrder)), create_migrated_order, &migrated_context); + + if (success == FALSE) { + goto done; + } + + non_migrated_context.prefs = targetPrivate->prefs; + non_migrated_context.serviceOrder = migratedServiceOrder; + non_migrated_context.serviceListMutable = nonMigratedServices; + non_migrated_context.success = success; + + // Creating a list of all the services which were not migrated from the source set to the + // target set + CFArrayApplyFunction(targetServiceOrder, CFRangeMake(0, CFArrayGetCount(targetServiceOrder)), create_non_migrated_service_list, &non_migrated_context); + + // Remove non migrated service + for (CFIndex idx = 0; idx < CFArrayGetCount(nonMigratedServices); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(nonMigratedServices, idx); + SCNetworkSetRemoveService(targetSet, service); + } + // Set migrated service order + SCNetworkSetSetServiceOrder(targetSet, migratedServiceOrder); + + // Add non migrated services + for (CFIndex idx = 0; idx < CFArrayGetCount(nonMigratedServices); idx++) { + SCNetworkServiceRef service = CFArrayGetValueAtIndex(nonMigratedServices, idx); + SCNetworkSetAddService(targetSet, service); + } + +done: + CFRelease(migratedServiceOrder); + CFRelease(nonMigratedServices); + return; + +} + +static Boolean +_SCNetworkMigrationDoServiceOrderMigration(SCPreferencesRef sourcePrefs, + SCPreferencesRef targetPrefs, + CFDictionaryRef setMapping) +{ + Boolean success = TRUE; + + if (isA_CFDictionary(setMapping) == NULL) { + success = FALSE; + goto done; + } + + CFDictionaryApplyFunction(setMapping, preserve_service_order, &success); +done: + return success; +} + + +// This is a function that looks at source and target network configuration +// and determines what network configurations can be transferred from source to +// target +static Boolean +_SCNetworkConfigurationMigrateConfiguration(CFURLRef sourceDir, CFURLRef targetDir) +{ + CFDictionaryRef bsdNameMapping = NULL; // Mapping between BSD name and SCNetworkInterfaceRef to help with mapping services + CFMutableDictionaryRef builtinMapping = NULL; // Mapping between builtin interfaces between source and target configurations: (SCNetworkInterfaceRef -> SCNetworkInterfaceRef) + CFMutableDictionaryRef externalMapping = NULL; // Mapping between external interfaces between source and target configurations: (SCNetworkInterfaceRef -> SCNetworkInterfaceRef) + Boolean migrationSuccess = FALSE; + CFArrayRef newTargetNetworkInterfaceEntity = NULL; // Array of Interface Entity which used to create new target interfaces created during migration + CFDictionaryRef serviceMapping = NULL; // Mapping between services of source to target. (SCNetworkServicesRef -> SCNetworkServicesRef) + CFDictionaryRef setMapping = NULL; + CFDictionaryRef sourceServiceSetMapping = NULL; + CFArrayRef sourceConfigurationFiles = NULL; // Path to the source configuration files which need to be migrated + CFURLRef sourceNetworkInterfaceFile = NULL; // Source CFURLRef for preferences.plist and NetworkInterfaces.plist + char sourceNetworkInterfaceFileStr[PATH_MAX]; + CFStringRef sourceNetworkInterfaceFileString = NULL; // Source CFStringRef for preferences.plist and NetworkInterfaces.plist + SCPreferencesRef sourceNetworkInterfacePrefs = NULL; // Source SCPreferencesRef for preferences.plist and NetworkInterfaces.plist + CFURLRef sourcePreferencesFile = NULL; + char sourcePreferencesFileStr[PATH_MAX]; + CFStringRef sourcePreferencesFileString = NULL; + SCPreferencesRef sourcePrefs = NULL; + CFArrayRef targetConfigurationFiles = NULL; // Path to the target configuration files where migration will take place to + Boolean targetConfigurationFilesPresent; + CFURLRef targetNetworkInterfaceFile = NULL; // Target CFURLRef for preferences.plist and NetworkInterfaces.plist + char targetNetworkInterfaceFileStr[PATH_MAX]; + CFStringRef targetNetworkInterfaceFileString = NULL; // Target CFStringRef for preferences.plist and NetworkInterfaces.plist + SCPreferencesRef targetNetworkInterfacePrefs = NULL; // Target SCPreferencesRef for preferences.plist and NetworkInterfaces.plist + CFURLRef targetPreferencesFile = NULL; + char targetPreferencesFileStr[PATH_MAX]; + CFStringRef targetPreferencesFileString = NULL; + SCPreferencesRef targetPrefs = NULL; + CFMutableDictionaryRef validityOptions = NULL; + + // Check if configuration files exist in sourceDir + if (__SCNetworkConfigurationMigrateConfigurationFilesPresent(sourceDir, &sourceConfigurationFiles) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: sourceDir: (%@) doesn't contain configuration files"), sourceDir); + goto done; + } + + sourcePreferencesFile = CFArrayGetValueAtIndex(sourceConfigurationFiles, PREFERENCES_PLIST_INDEX); + if (CFURLGetFileSystemRepresentation(sourcePreferencesFile, TRUE, (UInt8*)sourcePreferencesFileStr, sizeof(sourcePreferencesFileStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), sourcePreferencesFile); + goto done; + } + + sourceNetworkInterfaceFile = CFArrayGetValueAtIndex(sourceConfigurationFiles, NETWORK_INTERFACES_PLIST_INDEX); + if (CFURLGetFileSystemRepresentation(sourceNetworkInterfaceFile, TRUE, (UInt8*)sourceNetworkInterfaceFileStr, sizeof(sourceNetworkInterfaceFileStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), sourceNetworkInterfaceFile); + goto done; + } + + sourcePreferencesFileString = CFStringCreateWithCString(NULL, sourcePreferencesFileStr, kCFStringEncodingUTF8); + sourceNetworkInterfaceFileString = CFStringCreateWithCString(NULL, sourceNetworkInterfaceFileStr, kCFStringEncodingUTF8); + + sourcePrefs = SCPreferencesCreate(NULL, PLUGIN_ID, sourcePreferencesFileString); + sourceNetworkInterfacePrefs = SCPreferencesCreate(NULL, PLUGIN_ID, sourceNetworkInterfaceFileString); + if ((sourcePrefs == NULL) || (sourceNetworkInterfacePrefs == NULL)) { + goto done; + } + + if ((targetConfigurationFilesPresent = __SCNetworkConfigurationMigrateConfigurationFilesPresent(targetDir, &targetConfigurationFiles)) == FALSE) { + if (targetConfigurationFiles == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: targetConfigurationFiles is NULL")); + goto done; + } + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: targetDir: (%@) doesn't contain configuration files ... Need to create default configuration"), targetDir); + } + + targetPreferencesFile = CFArrayGetValueAtIndex(targetConfigurationFiles, PREFERENCES_PLIST_INDEX); + if (CFURLGetFileSystemRepresentation(targetPreferencesFile, TRUE, (UInt8*)targetPreferencesFileStr, sizeof(targetPreferencesFileStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), targetPreferencesFile); + goto done; + } + targetNetworkInterfaceFile = CFArrayGetValueAtIndex(targetConfigurationFiles, NETWORK_INTERFACES_PLIST_INDEX); + if (CFURLGetFileSystemRepresentation(targetNetworkInterfaceFile, TRUE, (UInt8*)targetNetworkInterfaceFileStr, sizeof(targetNetworkInterfaceFileStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Cannot get file system representation for url: %@"), targetNetworkInterfaceFile); + goto done; + } + + targetPreferencesFileString = CFStringCreateWithCString(NULL, targetPreferencesFileStr, kCFStringEncodingUTF8); + targetNetworkInterfaceFileString = CFStringCreateWithCString(NULL, targetNetworkInterfaceFileStr, kCFStringEncodingUTF8); + + if (targetConfigurationFilesPresent == TRUE) { + targetPrefs = SCPreferencesCreate(NULL, PLUGIN_ID, targetPreferencesFileString); + targetNetworkInterfacePrefs = SCPreferencesCreate(NULL, PLUGIN_ID, targetNetworkInterfaceFileString); + if ((targetPrefs == NULL) || (targetNetworkInterfacePrefs == NULL)) { + goto done; + } + } + else { + targetPrefs = __SCNetworkCreateDefaultPref(targetPreferencesFileString); + targetNetworkInterfacePrefs = __SCNetworkCreateDefaultNIPrefs(targetNetworkInterfaceFileString); + + if (targetPrefs == NULL || + targetNetworkInterfacePrefs == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Could not create default configuration.")); + goto done; + } + } + validityOptions = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionaryAddValue(validityOptions, kSCNetworkConfigurationRepair, kCFBooleanTrue); + + SCLog(_sc_debug, LOG_NOTICE, CFSTR("sourcePreferenceFileString: %@\n sourceNetworkInterfaceFileString:%@\n targetPreferencesFileString:%@\ntargetNetworkInterfaceFileString:%@"), sourcePreferencesFileString, sourceNetworkInterfaceFileString, + targetPreferencesFileString, targetNetworkInterfaceFileString); + + // Setting Bypass Interface to avoid looking at system interfaces + __SCPreferencesSetLimitSCNetworkConfiguration(sourcePrefs, TRUE); + __SCPreferencesSetLimitSCNetworkConfiguration(targetPrefs, TRUE); + + // Create services for builtin interfaces at source if they don't exist + (void)_SCNetworkConfigurationCreateBuiltinInterfaceServices(sourcePrefs, sourceNetworkInterfacePrefs); + // Checking validity of the source and destination preferences before continuing + if (_SCNetworkConfigurationCheckValidityUsingPreferences(sourcePrefs, + sourceNetworkInterfacePrefs, + validityOptions) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Source configuration is not valid")); + goto skipServiceMigration; + } + // Only call this function if configuration files were not created by default + if (targetConfigurationFilesPresent == TRUE) { + // Create services for builtin interfaces at target if they don't exist + (void)_SCNetworkConfigurationCreateBuiltinInterfaceServices(targetPrefs, targetNetworkInterfacePrefs); + if (_SCNetworkConfigurationCheckValidityUsingPreferences(targetPrefs, + targetNetworkInterfacePrefs, + validityOptions) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Target configuration is not valid")); + goto skipServiceMigration; + } + } + + builtinMapping = _SCNetworkConfigurationCopyBuiltinMapping(sourceNetworkInterfacePrefs, targetNetworkInterfacePrefs); + externalMapping = _SCNetworkConfigurationCopyExternalInterfaceMapping(sourceNetworkInterfacePrefs, targetNetworkInterfacePrefs); + + /* + TODO: + Now builtin and external interface mapping is complete, work needs to be done on updating the preferences.plist and NetworkInterface.plist. + + Also, work needs to be done to check the validity of the data in preferences in source and target destinations, and after migration + */ + + newTargetNetworkInterfaceEntity = _SCNetworkMigrationCreateNetworkInterfaceArray(targetNetworkInterfacePrefs, externalMapping); + if (isA_CFArray(newTargetNetworkInterfaceEntity) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: newTargetNetworkInterfaceEntity is NULL or not of correct type")); + goto done; + } + // Write new interface mapping to NetworkInterfaces.plist + if (__SCNetworkInterfaceSaveStoredWithPreferences(targetNetworkInterfacePrefs, newTargetNetworkInterfaceEntity) == FALSE) + { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: SCNetworkInterfaceSaveStoreWithPreferences failed to update NetworkInterface.plist")); + goto done; + } + // Create BSD Name Mapping to facilitate mapping of services + bsdNameMapping = _SCNetworkMigrationCreateBSDNameMapping(builtinMapping, externalMapping); + + if (isA_CFDictionary(bsdNameMapping) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: BSD Name Mapping is NULL")); + goto done; + } + SCLog(_sc_debug, LOG_NOTICE, CFSTR("BSD Name Mapping: %@"), bsdNameMapping); + serviceMapping = _SCNetworkMigrationCreateServiceMappingUsingBSDMapping(sourcePrefs, targetPrefs, bsdNameMapping); + + if (isA_CFDictionary(serviceMapping) == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Service Mapping is NULL")); + goto done; + } + SCLog(_sc_debug, LOG_NOTICE, CFSTR("Service Mapping: %@"), serviceMapping); + + setMapping = _SCNetworkMigrationCreateSetMapping(sourcePrefs, targetPrefs); + sourceServiceSetMapping = _SCNetworkMigrationCreateServiceSetMapping(sourcePrefs); + + // Perform the migration of services + if (_SCNetworkMigrationDoServiceMigration(sourcePrefs, targetPrefs, + serviceMapping, bsdNameMapping, + setMapping, sourceServiceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: SCNetworkMigrationDoServiceMigration failed to complete successfully")); + goto done; + } + +#if !TARGET_OS_IPHONE + // Migrating Virtual Network Interface + if (_SCNetworkMigrationDoVirtualNetworkInterfaceMigration(sourcePrefs, sourceNetworkInterfacePrefs, + targetPrefs, targetNetworkInterfacePrefs, + bsdNameMapping, setMapping, sourceServiceSetMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: _SCNetworkMigrationDoVirtualNetworkInterfaceMigration failed to complete successfully")); + } +#endif + // Migrate Service Order + if (_SCNetworkMigrationDoServiceOrderMigration(sourcePrefs, targetPrefs, setMapping) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: _SCNetworkMigrationDoServiceOrderMigration failed to complete successfully")); + } + +skipServiceMigration: + // Migrating System Information + if (_SCNetworkMigrationDoSystemMigration(sourcePrefs, targetPrefs) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: _SCNetworkMigrationDoSystemMigration failed to complete successfully")); + } + + if (_SCNetworkConfigurationCheckValidityUsingPreferences(targetPrefs, targetNetworkInterfacePrefs, NULL) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Migrated configuration is not valid")); + goto done; + } + if (SCPreferencesCommitChanges(targetPrefs) == FALSE) { + SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Error commiting targetPrefs, %s"), SCErrorString(SCError())); + goto done; + } + + if (SCPreferencesCommitChanges(targetNetworkInterfacePrefs) == FALSE) { + SCLog(TRUE, LOG_ERR, CFSTR("_SCNetworkConfigurationMigrateConfiguration: Error commiting targetNetworkInterfacePrefs, %s"), SCErrorString(SCError())); + goto done; + } + migrationSuccess = TRUE; + +done: + if (setMapping != NULL) { + CFRelease(setMapping); + } + if (sourceServiceSetMapping != NULL) { + CFRelease(sourceServiceSetMapping); + } + if (sourceConfigurationFiles != NULL) { + CFRelease(sourceConfigurationFiles); + } + if (targetConfigurationFiles != NULL) { + CFRelease(targetConfigurationFiles); + } + if (sourcePreferencesFileString != NULL) { + CFRelease(sourcePreferencesFileString); + } + if (sourceNetworkInterfaceFileString != NULL) { + CFRelease(sourceNetworkInterfaceFileString); + } + if (targetPreferencesFileString != NULL) { + CFRelease(targetPreferencesFileString); + } + if (targetNetworkInterfaceFileString != NULL) { + CFRelease(targetNetworkInterfaceFileString); + } + if (newTargetNetworkInterfaceEntity != NULL) { + CFRelease(newTargetNetworkInterfaceEntity); + } + if (builtinMapping != NULL) { + CFRelease(builtinMapping); + } + if (externalMapping != NULL) { + CFRelease(externalMapping); + } + if (bsdNameMapping != NULL) { + CFRelease(bsdNameMapping); + } + if (serviceMapping != NULL) { + CFRelease(serviceMapping); + } + if (targetPrefs != NULL) { + CFRelease(targetPrefs); + } + if (sourcePrefs != NULL) { + CFRelease(sourcePrefs); + } + if (sourceNetworkInterfacePrefs != NULL) { + CFRelease(sourceNetworkInterfacePrefs); + } + if (targetNetworkInterfacePrefs != NULL) { + CFRelease(targetNetworkInterfacePrefs); + } + if (validityOptions != NULL) { + CFRelease(validityOptions); + } + return migrationSuccess; +} + +#define N_QUICK 64 + +static Boolean +_SCNetworkMigrationAreServicesIdentical( SCPreferencesRef configPref, SCPreferencesRef expectedConfigPref) +{ + const void * expected_vals_q[N_QUICK]; + const void ** expected_vals = expected_vals_q; + CFMutableArrayRef expectedServiceArray = NULL; + CFIndex expectedServiceArrayCount = 0; + CFDictionaryRef expectedServiceDict = NULL; + CFIndex expectedServiceDictCount = 0; + CFDictionaryRef expectedServiceEntity = 0; + Boolean foundMatch = FALSE; + CFMutableArrayRef serviceArray = NULL; + CFIndex serviceArrayCount = 0; + CFDictionaryRef serviceDict = NULL; + CFIndex serviceDictCount = 0; + CFDictionaryRef serviceEntity = NULL; + Boolean success = FALSE; + const void * vals_q[N_QUICK]; + const void ** vals = vals_q; + + serviceDict = SCPreferencesGetValue(configPref, kSCPrefNetworkServices); + if (isA_CFDictionary(serviceDict) == NULL) { + goto done; + } + serviceDictCount = CFDictionaryGetCount(serviceDict); + + expectedServiceDict = SCPreferencesGetValue(expectedConfigPref, kSCPrefNetworkServices); + if (isA_CFDictionary(expectedServiceDict) == NULL) { + goto done; + } + expectedServiceDictCount = CFDictionaryGetCount(expectedServiceDict); + + if (serviceDictCount != expectedServiceDictCount) { + goto done; + } + + if (serviceDictCount > (sizeof(vals_q) / sizeof(CFTypeRef))) { + vals = CFAllocatorAllocate(NULL, serviceDictCount * sizeof(CFPropertyListRef), 0); + } + + CFDictionaryGetKeysAndValues(serviceDict, NULL, vals); + serviceArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex idx=0; idx < serviceDictCount; idx++) { + serviceEntity = vals[idx]; + if (isA_CFDictionary(serviceEntity) == FALSE) { + continue; + } + CFArrayAppendValue(serviceArray, serviceEntity); + } + + serviceArrayCount = CFArrayGetCount(serviceArray); + + if (expectedServiceDictCount > (sizeof(expected_vals_q) / sizeof(CFTypeRef))) { + expected_vals = CFAllocatorAllocate(NULL, expectedServiceDictCount, 0); + } + + CFDictionaryGetKeysAndValues(expectedServiceDict, NULL, expected_vals); + expectedServiceArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex idx = 0; idx < expectedServiceDictCount; idx++) { + serviceEntity = expected_vals[idx]; + + if (isA_CFDictionary(serviceEntity) == FALSE) { + continue; + } + CFArrayAppendValue(expectedServiceArray, serviceEntity); + } + expectedServiceArrayCount = CFArrayGetCount(expectedServiceArray); + + if (serviceArrayCount != expectedServiceArrayCount) { + goto done; + } + + for (CFIndex idx = 0; idx < expectedServiceArrayCount; idx++) { + foundMatch = FALSE; + expectedServiceEntity = CFArrayGetValueAtIndex(expectedServiceArray, idx); + serviceArrayCount = CFArrayGetCount(serviceArray); + + for (CFIndex idx2 = 0; idx2 < serviceArrayCount; idx2++) { + serviceEntity = CFArrayGetValueAtIndex(serviceArray, idx2); + + if (CFEqual(expectedServiceEntity, serviceEntity) == TRUE) { + foundMatch = TRUE; + break; + } + } + + if (foundMatch == FALSE) { + break; + } + } + + success = foundMatch; +done: + if (vals != vals_q) { + CFAllocatorDeallocate(NULL, vals); + } + if (expected_vals != expected_vals_q) { + CFAllocatorDeallocate(NULL, expected_vals); + } + return success; +} + +static Boolean +_SCNetworkMigrationAreNetworkInterfaceConfigurationsIdentical (SCPreferencesRef configNetworkInterfacePref, SCPreferencesRef expectedNetworkInterfacePref) +{ + CFDictionaryRef expectedInterfaceEntity = NULL; + CFArrayRef expectedInterfaceList = NULL; + CFIndex expectedInterfaceListCount; + Boolean foundMatch = FALSE; + CFDictionaryRef interfaceEntity = NULL; + CFArrayRef interfaceList = NULL; + CFIndex interfaceListCount; + CFMutableArrayRef interfaceListMutable = NULL; + Boolean success = FALSE; + + interfaceList = SCPreferencesGetValue(configNetworkInterfacePref, INTERFACES); + if (isA_CFArray(interfaceList) == NULL) { + goto done; + } + interfaceListMutable = CFArrayCreateMutableCopy(NULL, 0, interfaceList); + interfaceListCount = CFArrayGetCount(interfaceListMutable); + + expectedInterfaceList = SCPreferencesGetValue(expectedNetworkInterfacePref, INTERFACES); + if (isA_CFArray(expectedInterfaceList) == NULL) { + goto done; + } + expectedInterfaceListCount = CFArrayGetCount(expectedInterfaceList); + + if (interfaceListCount != expectedInterfaceListCount) { + goto done; + } + + for (CFIndex idx = 0; idx < expectedInterfaceListCount; idx++) { + foundMatch = FALSE; + expectedInterfaceEntity = CFArrayGetValueAtIndex(expectedInterfaceList, idx); + interfaceListCount = CFArrayGetCount(interfaceListMutable); + + for (CFIndex idx2 = 0; idx2 < interfaceListCount; idx2++) { + interfaceEntity = CFArrayGetValueAtIndex(interfaceList, idx2); + if (CFEqual(expectedInterfaceEntity, interfaceEntity) == TRUE) { + foundMatch = TRUE; + break; + } + } + if (foundMatch == FALSE) { + break; + } + } + success = foundMatch; + +done: + if (interfaceListMutable != NULL) { + CFRelease(interfaceListMutable); + } + + return success; +} + +Boolean +_SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL, + CFURLRef expectedConfigurationURL) +{ + CFURLRef baseConfigURL = NULL; + CFURLRef baseExpectedConfigURL = NULL; + CFURLRef configPreferencesURL = NULL; + CFURLRef configNetworkInterfacesURL = NULL; + SCPreferencesRef configPref = NULL; + SCPreferencesRef configNetworkInterfacePref = NULL; + SCPreferencesRef expectedConfigPref = NULL; + SCPreferencesRef expectedNetworkInterfacePref = NULL; + CFURLRef expectedNetworkInterfaceURL = NULL; + CFURLRef expectedPreferencesURL = NULL; + Boolean isIdentical = FALSE; + CFStringRef networkInterfaceConfigString = NULL; + CFStringRef networkInterfaceExpectedString = NULL; + CFStringRef prefsConfigString = NULL; + CFStringRef prefsExpectedString = NULL; + char networkInterfaceConfigStr[PATH_MAX]; + char networkInterfaceExpectedStr[PATH_MAX]; + char prefsConfigStr[PATH_MAX]; + char prefsExpectedStr[PATH_MAX]; + + if (configurationURL == NULL || + expectedConfigurationURL == NULL) { + return FALSE; + } + baseConfigURL = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, configurationURL); + configPreferencesURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*) PREFS_DEFAULT_CONFIG_PLIST, sizeof(PREFS_DEFAULT_CONFIG_PLIST), FALSE, baseConfigURL); + + if (CFURLResourceIsReachable(configPreferencesURL, NULL) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: preferences.plist file is not present.")); + goto done; + } + + configNetworkInterfacesURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)NETWORK_INTERFACES_PREFS_PLIST, sizeof(NETWORK_INTERFACES_PREFS_PLIST), FALSE, baseConfigURL); + + if (CFURLResourceIsReachable(configNetworkInterfacesURL, NULL) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: NetworkInterfaces.plist file is not present.")); + goto done; + } + + if (CFURLGetFileSystemRepresentation(configPreferencesURL, TRUE, (UInt8*)prefsConfigStr, sizeof(prefsConfigStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract preferences information")); + goto done; + } + if (CFURLGetFileSystemRepresentation(configNetworkInterfacesURL, TRUE, (UInt8*)networkInterfaceConfigStr, sizeof(networkInterfaceConfigStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract network interfaces information")); + goto done; + } + + baseExpectedConfigURL = CFURLCreateWithFileSystemPathRelativeToBase(NULL, PREFS_DEFAULT_DIR_RELATIVE, kCFURLPOSIXPathStyle, TRUE, expectedConfigurationURL); + expectedPreferencesURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)PREFS_DEFAULT_CONFIG_PLIST, sizeof(PREFS_DEFAULT_CONFIG_PLIST), FALSE, baseExpectedConfigURL); + + if (CFURLResourceIsReachable(expectedPreferencesURL, NULL) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: preferences.plist file is not present in the expected configuration.")); + goto done; + } + + expectedNetworkInterfaceURL = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)NETWORK_INTERFACES_PREFS_PLIST, sizeof(NETWORK_INTERFACES_PREFS_PLIST), FALSE, baseExpectedConfigURL); + + if (CFURLResourceIsReachable(expectedNetworkInterfaceURL, NULL) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: NetworkInterfaces.plist file is not present in the expected configuration.")); + goto done; + } + + if (CFURLGetFileSystemRepresentation(expectedPreferencesURL, TRUE, (UInt8*)prefsExpectedStr, sizeof(prefsExpectedStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract preferences information")); + goto done; + } + if (CFURLGetFileSystemRepresentation(expectedNetworkInterfaceURL, TRUE, (UInt8*)networkInterfaceExpectedStr, sizeof(networkInterfaceExpectedStr)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: Could not extract network interfaces information")); + goto done; + } + + prefsConfigString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), prefsConfigStr); + networkInterfaceConfigString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), networkInterfaceConfigStr); + prefsExpectedString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), prefsExpectedStr); + networkInterfaceExpectedString = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), networkInterfaceExpectedStr); + + configPref = SCPreferencesCreate(NULL, PLUGIN_ID, prefsConfigString); + expectedConfigPref = SCPreferencesCreate(NULL, PLUGIN_ID, prefsExpectedString); + configNetworkInterfacePref = SCPreferencesCreate(NULL, PLUGIN_ID, networkInterfaceConfigString); + expectedNetworkInterfacePref = SCPreferencesCreate(NULL, PLUGIN_ID, networkInterfaceExpectedString); +done: + if (configPref == NULL || + expectedConfigPref == NULL || + configNetworkInterfacePref == NULL || + expectedNetworkInterfacePref == NULL) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("_SCNetworkMigrationAreConfigurationsIdentical: One of the preferences is NULL")); + isIdentical = FALSE; + } + else { + isIdentical = (_SCNetworkMigrationAreServicesIdentical(configPref, expectedConfigPref) && + _SCNetworkMigrationAreNetworkInterfaceConfigurationsIdentical(configNetworkInterfacePref, expectedNetworkInterfacePref)); + } + if (baseConfigURL != NULL) { + CFRelease(baseConfigURL); + } + if (configPreferencesURL != NULL) { + CFRelease(configPreferencesURL); + } + if (configNetworkInterfacesURL != NULL) { + CFRelease(configNetworkInterfacesURL); + } + if (baseExpectedConfigURL != NULL) { + CFRelease(baseExpectedConfigURL); + } + if (expectedPreferencesURL != NULL) { + CFRelease(expectedPreferencesURL); + } + if (expectedNetworkInterfaceURL != NULL) { + CFRelease(expectedNetworkInterfaceURL); + } + if (prefsConfigString != NULL) { + CFRelease(prefsConfigString); + } + if (networkInterfaceConfigString != NULL) { + CFRelease(networkInterfaceConfigString); + } + if (prefsExpectedString != NULL) { + CFRelease(prefsExpectedString); + } + if (networkInterfaceExpectedString != NULL) { + CFRelease(networkInterfaceExpectedString); + } + if (configPref != NULL) { + CFRelease(configPref); + } + if (expectedConfigPref != NULL) { + CFRelease(expectedConfigPref); + } + if (configNetworkInterfacePref != NULL) { + CFRelease(configNetworkInterfacePref); + } + if (expectedNetworkInterfacePref != NULL) { + CFRelease(expectedNetworkInterfacePref); + } + return isIdentical; +} + +CFArrayRef +_SCNetworkConfigurationCopyMigrationRemovePaths (CFArrayRef targetPaths, + CFURLRef targetDir) +{ + CFURLRef affectedURL; + char filePath[PATH_MAX]; + CFURLRef targetFile; + CFMutableArrayRef toBeRemoved = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex idx = 0; idx < CFArrayGetCount(targetPaths); idx++) { + affectedURL = CFArrayGetValueAtIndex(targetPaths, idx); + + if (CFURLGetFileSystemRepresentation(affectedURL, TRUE, (UInt8*)filePath, sizeof(filePath)) == FALSE) { + SCLog(_sc_debug, LOG_NOTICE, CFSTR("filesToBeRemoved: Could not get file system representation")); + continue; + } + targetFile = CFURLCreateFromFileSystemRepresentationRelativeToBase(NULL, (const UInt8*)filePath, + strnlen(filePath, sizeof(filePath)), FALSE, targetDir); + + if (CFURLResourceIsReachable(targetFile, NULL) == FALSE) { + CFArrayAppendValue(toBeRemoved, affectedURL); + } + CFRelease(targetFile); + } + // If number of files to be removed is 0, return NULL + if (CFArrayGetCount(toBeRemoved) == 0) { + CFRelease(toBeRemoved); + toBeRemoved = NULL; + } + return toBeRemoved; +} diff --git a/SystemConfiguration.fproj/SCNetworkReachability.c b/SystemConfiguration.fproj/SCNetworkReachability.c index efdae04..d327f9c 100644 --- a/SystemConfiguration.fproj/SCNetworkReachability.c +++ b/SystemConfiguration.fproj/SCNetworkReachability.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2003-2013 Apple Inc. All rights reserved. + * Copyright (c) 2003-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -57,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -74,15 +73,13 @@ #endif #include "SCNetworkConnectionInternal.h" - #include "SCNetworkReachabilityInternal.h" #include +#include + #include -#if defined(HAVE_IPSEC_STATUS) || defined(HAVE_VPN_STATUS) -#include -#endif // !defined(HAVE_IPSEC_STATUS) || defined(HAVE_VPN_STATUS) @@ -90,17 +87,25 @@ #define DEBUG_REACHABILITY_TYPE_NAME "create w/name" +#define DEBUG_REACHABILITY_TYPE_NAME_CLONE " > clone" #define DEBUG_REACHABILITY_TYPE_NAME_OPTIONS " + options" -#define DEBUG_REACHABILITY_TYPE_ADDRESS "create w/address" -#define DEBUG_REACHABILITY_TYPE_ADDRESS_OPTIONS " + options" +#define DEBUG_REACHABILITY_TYPE_ADDRESS "create w/address" +#define DEBUG_REACHABILITY_TYPE_ADDRESS_CLONE " > clone" +#define DEBUG_REACHABILITY_TYPE_ADDRESS_OPTIONS " + options" #define DEBUG_REACHABILITY_TYPE_ADDRESSPAIR "create w/address pair" +#define DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_CLONE " > clone" #define DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_OPTIONS " + options" -#define DNS_FLAGS_FORMAT "[%s%s%s%s]" +#define DEBUG_REACHABILITY_TYPE_PTR "create w/ptr" +#define DEBUG_REACHABILITY_TYPE_PTR_CLONE " > clone" +#define DEBUG_REACHABILITY_TYPE_PTR_OPTIONS " + options" + +#define DNS_FLAGS_FORMAT "[%s%s%s%s%s]" #define DNS_FLAGS_VALUES(t) t->dnsHaveV4 ? "4" : "", \ t->dnsHaveV6 ? "6" : "", \ + t->dnsHavePTR ? "P" : "", \ t->dnsHaveTimeout ? "T" : "", \ t->dnsHaveError ? "E" : "" @@ -128,18 +133,6 @@ static pthread_mutexattr_t lock_attr; } -#ifdef HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL -/* Libinfo SPI */ -mach_port_t -_getaddrinfo_interface_async_call(const char *nodename, - const char *servname, - const struct addrinfo *hints, - const char *interface, - getaddrinfo_async_callback callback, - void *context); -#endif // HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - - #define SCNETWORKREACHABILITY_TRIGGER_KEY CFSTR("com.apple.SCNetworkReachability:FORCE-CHANGE") @@ -149,8 +142,14 @@ _getaddrinfo_interface_async_call(const char *nodename, static CFStringRef __SCNetworkReachabilityCopyDescription (CFTypeRef cf); static void __SCNetworkReachabilityDeallocate (CFTypeRef cf); static void reachPerform (void *info); +static Boolean reachUpdate (SCNetworkReachabilityRef target); +static void +__SCNetworkReachabilityHandleChanges (SCDynamicStoreRef store, + CFArrayRef changedKeys, + void *info); + static Boolean __SCNetworkReachabilityScheduleWithRunLoop (SCNetworkReachabilityRef target, CFRunLoopRef runLoop, @@ -187,30 +186,15 @@ static const ReachabilityInfo NOT_REPORTED = { 0, 0xFFFFFFFF, 0, { 0 }, FALSE }; static int rtm_seq = 0; -static const struct addrinfo HINTS_DEFAULT = { -#ifdef AI_PARALLEL - .ai_flags = AI_ADDRCONFIG | AI_PARALLEL, -#else // AI_PARALLEL - .ai_flags = AI_ADDRCONFIG, -#endif // AI_PARALLEL -}; - - static const struct timeval TIME_ZERO = { 0, 0 }; static int dnsCount = 0; +static int dnsGeneration = 0; static DNSServiceRef dnsMain = NULL; -#ifdef USE_DNSSERVICEGETADDRINFO static CFMutableSetRef dnsUpdated = NULL; -#endif // USE_DNSSERVICEGETADDRINFO - -#ifdef HAVE_REACHABILITY_SERVER static Boolean D_serverBypass = FALSE; -#endif // HAVE_REACHABILITY_SERVER - -static Boolean D_nwiBypass = FALSE; @@ -218,7 +202,10 @@ static Boolean D_nwiBypass = FALSE; /* * Power capabilities (sleep/wake) */ -static IOPMSystemPowerStateCapabilities power_capabilities = kIOPMSytemPowerStateCapabilitiesMask; +#define POWER_CAPABILITIES_NETWORK ( kIOPMCapabilityCPU \ + | kIOPMCapabilityNetwork \ + | kIOPMCapabilityVideo) +static IOPMSystemPowerStateCapabilities power_capabilities = POWER_CAPABILITIES_NETWORK; #endif // !TARGET_OS_IPHONE @@ -238,7 +225,7 @@ _hn_changes_queue() static dispatch_queue_t q = NULL; dispatch_once(&once, ^{ - q = dispatch_queue_create("SCNetworkReachabilty.handleChanges", NULL); + q = dispatch_queue_create("SCNetworkReachability.handleChanges", NULL); }); return q; @@ -252,7 +239,7 @@ _hn_target_queue() static dispatch_queue_t q; dispatch_once(&once, ^{ - q = dispatch_queue_create("SCNetworkReachabilty.targetManagement", NULL); + q = dispatch_queue_create("SCNetworkReachability.targetManagement", NULL); }); return q; @@ -279,9 +266,9 @@ static Boolean dns_token_valid = FALSE; typedef enum { - dns_query_sync, dns_query_async, dns_query_mdns, + dns_query_mdns_timeout, } query_type; @@ -308,7 +295,8 @@ __mark_operation_end(SCNetworkReachabilityRef target, (void) gettimeofday(queryEnd, NULL); - if (!_sc_debug) { + if (!_sc_debug && + (query_type != dns_query_mdns_timeout)) { return; } @@ -319,17 +307,9 @@ __mark_operation_end(SCNetworkReachabilityRef target, timersub(queryEnd, queryStart, &queryElapsed); switch (query_type) { - #define QUERY_TIME__FMT "%d.%6.6d" + #define QUERY_TIME__FMT "%ld.%6.6d" #define QUERY_TIME__DIV 1 - case dns_query_sync : - SCLog(TRUE, LOG_INFO, - CFSTR("%ssync DNS complete%s (query time = " QUERY_TIME__FMT ")"), - targetPrivate->log_prefix, - found ? "" : ", host not found", - queryElapsed.tv_sec, - queryElapsed.tv_usec / QUERY_TIME__DIV); - break; case dns_query_async : SCLog(TRUE, LOG_INFO, CFSTR("%sasync DNS complete%s (query time = " QUERY_TIME__FMT ")"), @@ -347,6 +327,14 @@ __mark_operation_end(SCNetworkReachabilityRef target, queryElapsed.tv_usec / QUERY_TIME__DIV, DNS_FLAGS_VALUES(targetPrivate)); break; + case dns_query_mdns_timeout : + SCLog(TRUE, LOG_ERR, + CFSTR("%s[m]DNS query timeout (query time = " QUERY_TIME__FMT "), " DNS_FLAGS_FORMAT), + targetPrivate->log_prefix, + queryElapsed.tv_sec, + queryElapsed.tv_usec / QUERY_TIME__DIV, + DNS_FLAGS_VALUES(targetPrivate)); + break; } return; @@ -429,7 +417,7 @@ _storeInfo_queue() static dispatch_queue_t q; dispatch_once(&once, ^{ - q = dispatch_queue_create("SCNetworkReachabilty.storeInfo", NULL); + q = dispatch_queue_create("SCNetworkReachability.storeInfo", NULL); }); return q; @@ -539,8 +527,8 @@ ReachabilityStoreInfo_save(ReachabilityStoreInfoRef store_info) } -static Boolean -ReachabilityStoreInfo_fill(ReachabilityStoreInfoRef store_info) +static void +ReachabilityStoreInfo_keys(CFMutableArrayRef *fill_keys, CFMutableArrayRef *fill_patterns) { CFStringRef key; CFMutableArrayRef keys; @@ -639,7 +627,20 @@ ReachabilityStoreInfo_fill(ReachabilityStoreInfoRef store_info) CFRelease(pattern); + *fill_keys = keys; + *fill_patterns = patterns; + return; +} + + +static Boolean +ReachabilityStoreInfo_fill(ReachabilityStoreInfoRef store_info) +{ + CFMutableArrayRef keys; + CFMutableArrayRef patterns; + // get the SCDynamicStore info + ReachabilityStoreInfo_keys(&keys, &patterns); store_info->dict = SCDynamicStoreCopyMultiple(store_info->store, keys, patterns); CFRelease(keys); CFRelease(patterns); @@ -755,858 +756,213 @@ ReachabilityStoreInfo_update(ReachabilityStoreInfoRef store_info, #pragma mark - -#pragma mark Legacy Reachability Functions - to be deprecated. +#pragma mark Reachability engine -// Note: these can/should be removed when the iOS simulator will only -// be used on a system with the enhanced (with reachability -// flags) NWI content. -#pragma mark PPP info +#define ROUNDUP(a, size) \ + (((a) & ((size)-1)) ? (1 + ((a) | ((size)-1))) : (a)) +#define NEXT_SA(ap) (ap) = (struct sockaddr *) \ + ((caddr_t)(ap) + ((ap)->sa_len ? ROUNDUP((ap)->sa_len,\ + sizeof(uint32_t)) :\ + sizeof(uint32_t))) -static int -updatePPPStatus(ReachabilityStoreInfoRef store_info, - const struct sockaddr *sa, - const char *if_name, - SCNetworkReachabilityFlags *flags, - CFStringRef *ppp_server, - const char *log_prefix) +static void +get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info) { - CFIndex i; - CFStringRef ppp_if; - int sc_status = kSCStatusNoKey; - - if (!ReachabilityStoreInfo_update(store_info, NULL, sa->sa_family)) { - return kSCStatusReachabilityUnknown; - } + int i; - if (store_info->n <= 0) { - // if no services - return kSCStatusNoKey; + for (i = 0; i < RTAX_MAX; i++) { + if (addrs & (1 << i)) { + rti_info[i] = sa; + NEXT_SA(sa); + } else + rti_info[i] = NULL; } +} - // look for the [PPP] service which matches the provided interface - ppp_if = CFStringCreateWithCStringNoCopy(NULL, - if_name, - kCFStringEncodingASCII, - kCFAllocatorNull); +#define BUFLEN (sizeof(struct rt_msghdr) + 512) /* 8 * sizeof(struct sockaddr_in6) = 192 */ - for (i=0; i < store_info->n; i++) { - CFArrayRef components; - CFStringRef key; - CFNumberRef num; - CFDictionaryRef p_setup; - CFDictionaryRef p_state; - int32_t ppp_demand; - int32_t ppp_status; - CFStringRef service = NULL; - CFStringRef s_key = (CFStringRef) store_info->keys[i]; - CFDictionaryRef s_dict = (CFDictionaryRef)store_info->values[i]; - CFStringRef s_if; - if (!isA_CFString(s_key) || !isA_CFDictionary(s_dict)) { - continue; - } +typedef struct { + union { + char bytes[BUFLEN]; + struct rt_msghdr rtm; + } buf; + int error; + struct sockaddr *rti_info[RTAX_MAX]; + struct rt_msghdr *rtm; + struct sockaddr_dl *sdl; +} route_info, *route_info_p; - if (!CFStringHasSuffix(s_key, store_info->entity) || - !CFStringHasPrefix(s_key, kSCDynamicStoreDomainState)) { - continue; // if not an active IPv4 or IPv6 entity - } - s_if = CFDictionaryGetValue(s_dict, kSCPropInterfaceName); - if (!isA_CFString(s_if)) { - continue; // if no interface - } +/* + * route_get() + * returns zero if route exists and data returned, EHOSTUNREACH + * if no route, or errno for any other error. + */ +static int +route_get(const struct sockaddr *address, + unsigned int if_index, + route_info *info) +{ + int n; + int opt; + pid_t pid = getpid(); + int rsock; + struct sockaddr *sa; + int32_t seq = OSAtomicIncrement32Barrier(&rtm_seq); +#ifndef RTM_GET_SILENT +#warning Note: Using RTM_GET (and not RTM_GET_SILENT) + static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; + int sosize = 48 * 1024; +#endif - if (!CFEqual(ppp_if, s_if)) { - continue; // if not this interface - } + bzero(info, sizeof(*info)); - // extract the service ID, get the PPP "state" entity for - // the "Status", and get the PPP "setup" entity for the - // the "DialOnDemand" flag - components = CFStringCreateArrayBySeparatingStrings(NULL, s_key, CFSTR("/")); - if (CFArrayGetCount(components) != 5) { - CFRelease(components); - break; - } - service = CFArrayGetValueAtIndex(components, 3); - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - service, - kSCEntNetPPP); - p_state = CFDictionaryGetValue(store_info->dict, key); - CFRelease(key); - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service, - kSCEntNetPPP); - p_setup = CFDictionaryGetValue(store_info->dict, key); - CFRelease(key); - CFRelease(components); - - // ensure that this is a PPP service - if (!isA_CFDictionary(p_state)) { - break; - } + info->rtm = &info->buf.rtm; + info->rtm->rtm_msglen = sizeof(struct rt_msghdr); + info->rtm->rtm_version = RTM_VERSION; +#ifdef RTM_GET_SILENT + info->rtm->rtm_type = RTM_GET_SILENT; +#else + info->rtm->rtm_type = RTM_GET; +#endif + info->rtm->rtm_flags = RTF_STATIC|RTF_UP|RTF_HOST|RTF_GATEWAY; + info->rtm->rtm_addrs = RTA_DST|RTA_IFP; /* Both destination and device */ + info->rtm->rtm_pid = pid; + info->rtm->rtm_seq = seq; - sc_status = kSCStatusOK; + if (if_index != 0) { + info->rtm->rtm_flags |= RTF_IFSCOPE; + info->rtm->rtm_index = if_index; + } - *flags |= kSCNetworkReachabilityFlagsTransientConnection; + switch (address->sa_family) { + case AF_INET6: { + struct sockaddr_in6 *sin6; - // get PPP server - if (ppp_server != NULL) { - *ppp_server = CFDictionaryGetValue(s_dict, CFSTR("ServerAddress")); - *ppp_server = isA_CFString(*ppp_server); - if (*ppp_server != NULL) { - CFRetain(*ppp_server); + /* ALIGN: caller ensures that the address is aligned */ + sin6 = (struct sockaddr_in6 *)(void *)address; + if ((IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) || + IN6_IS_ADDR_MC_LINKLOCAL(&sin6->sin6_addr)) && + (sin6->sin6_scope_id != 0)) { + sin6->sin6_addr.s6_addr16[1] = htons(sin6->sin6_scope_id); + sin6->sin6_scope_id = 0; } - } - - // get PPP status - if (!CFDictionaryGetValueIfPresent(p_state, - kSCPropNetPPPStatus, - (const void **)&num) || - !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_status)) { break; } - switch (ppp_status) { - case PPP_RUNNING : - // if we're really UP and RUNNING - break; - case PPP_ONHOLD : - // if we're effectively UP and RUNNING - break; - case PPP_IDLE : - // if we're not connected at all - SCLog(_sc_debug, LOG_INFO, CFSTR("%s PPP link idle"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - case PPP_STATERESERVED : - // if we're not connected at all - SCLog(_sc_debug, LOG_INFO, CFSTR("%s PPP link idle, dial-on-traffic to connect"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - default : - // if we're in the process of [dis]connecting - SCLog(_sc_debug, LOG_INFO, CFSTR("%s PPP link, connection in progress"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - } - - // get PPP dial-on-traffic status - if (isA_CFDictionary(p_setup) && - CFDictionaryGetValueIfPresent(p_setup, - kSCPropNetPPPDialOnDemand, - (const void **)&num) && - isA_CFNumber(num) && - CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand) && - (ppp_demand != 0)) { - *flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; - if (ppp_status == PPP_IDLE) { - *flags |= kSCNetworkReachabilityFlagsInterventionRequired; - } - } - - break; } - CFRelease(ppp_if); - - return sc_status; -} + sa = (struct sockaddr *) (info->rtm + 1); + bcopy(address, sa, address->sa_len); + n = ROUNDUP(sa->sa_len, sizeof(uint32_t)); + info->rtm->rtm_msglen += n; + info->sdl = (struct sockaddr_dl *) ((void *)sa + n); + info->sdl->sdl_family = AF_LINK; + info->sdl->sdl_len = sizeof (struct sockaddr_dl); + n = ROUNDUP(info->sdl->sdl_len, sizeof(uint32_t)); + info->rtm->rtm_msglen += n; -static int -updatePPPAvailable(ReachabilityStoreInfoRef store_info, - const struct sockaddr *sa, - SCNetworkReachabilityFlags *flags, - const char *log_prefix) -{ - CFIndex i; - int sc_status = kSCStatusNoKey; +#ifndef RTM_GET_SILENT + pthread_mutex_lock(&lock); +#endif + rsock = socket(PF_ROUTE, SOCK_RAW, PF_ROUTE); + if (rsock == -1) { + int error = errno; - if (!ReachabilityStoreInfo_update(store_info, - NULL, - (sa != NULL) ? sa->sa_family : AF_INET)) { - return kSCStatusReachabilityUnknown; +#ifndef RTM_GET_SILENT + pthread_mutex_unlock(&lock); +#endif + SCLog(TRUE, LOG_ERR, CFSTR("socket(PF_ROUTE) failed: %s"), strerror(error)); + return error; } + opt = 1; + if (ioctl(rsock, FIONBIO, &opt) < 0) { + int error = errno; - if (store_info->n <= 0) { - // if no services - return kSCStatusNoKey; + (void)close(rsock); +#ifndef RTM_GET_SILENT + pthread_mutex_unlock(&lock); +#endif + SCLog(TRUE, LOG_ERR, CFSTR("ioctl(FIONBIO) failed: %s"), strerror(error)); + return error; } - // look for an available service which will provide connectivity - // for the requested address family. - - for (i = 0; i < store_info->n; i++) { - CFArrayRef components; - Boolean found = FALSE; - CFStringRef i_key; - CFDictionaryRef i_dict; - CFStringRef p_key; - CFDictionaryRef p_dict; - CFStringRef service; - CFStringRef s_key = (CFStringRef) store_info->keys[i]; - CFDictionaryRef s_dict = (CFDictionaryRef)store_info->values[i]; +#ifndef RTM_GET_SILENT + if (setsockopt(rsock, SOL_SOCKET, SO_RCVBUF, &sosize, sizeof(sosize)) == -1) { + int error = errno; - if (!isA_CFString(s_key) || !isA_CFDictionary(s_dict)) { - continue; - } + (void)close(rsock); + pthread_mutex_unlock(&lock); + SCLog(TRUE, LOG_ERR, CFSTR("setsockopt(SO_RCVBUF) failed: %s"), strerror(error)); + return error; + } +#endif - if (!CFStringHasSuffix(s_key, store_info->entity) || - !CFStringHasPrefix(s_key, kSCDynamicStoreDomainSetup)) { - continue; // if not an IPv4 or IPv6 entity - } + if (write(rsock, &info->buf, info->rtm->rtm_msglen) == -1) { + int error = errno; - // extract service ID - components = CFStringCreateArrayBySeparatingStrings(NULL, s_key, CFSTR("/")); - if (CFArrayGetCount(components) != 5) { - CFRelease(components); - continue; + (void)close(rsock); +#ifndef RTM_GET_SILENT + pthread_mutex_unlock(&lock); +#endif + if (error != ESRCH) { + SCLog(TRUE, LOG_ERR, CFSTR("write() failed: %s"), strerror(error)); + return error; } - service = CFArrayGetValueAtIndex(components, 3); - - // check for [non-VPN] PPP entity - p_key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service, - kSCEntNetPPP); - p_dict = CFDictionaryGetValue(store_info->dict, p_key); - CFRelease(p_key); - - i_key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service, - kSCEntNetInterface); - i_dict = CFDictionaryGetValue(store_info->dict, i_key); - CFRelease(i_key); - - if (isA_CFDictionary(p_dict) && - isA_CFDictionary(i_dict) && - CFDictionaryContainsKey(i_dict, kSCPropNetInterfaceDeviceName)) { - CFNumberRef num; - - // we have a PPP service for this address family - found = TRUE; - - *flags |= kSCNetworkReachabilityFlagsReachable; - *flags |= kSCNetworkReachabilityFlagsTransientConnection; - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; + return EHOSTUNREACH; + } - // get PPP dial-on-traffic status - num = CFDictionaryGetValue(p_dict, kSCPropNetPPPDialOnDemand); - if (isA_CFNumber(num)) { - int32_t ppp_demand; + /* + * Type, seq, pid identify our response. + * Routing sockets are broadcasters on input. + */ + while (TRUE) { + ssize_t n; - if (CFNumberGetValue(num, kCFNumberSInt32Type, &ppp_demand)) { - if (ppp_demand) { - *flags |= kSCNetworkReachabilityFlagsConnectionOnTraffic; - } - } - } + n = read(rsock, &info->buf, sizeof(info->buf)); + if (n == -1) { + int error = errno; - if (_sc_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s status = isReachable (after connect)"), - log_prefix); - SCLog(TRUE, LOG_INFO, CFSTR("%s service = %@"), - log_prefix, - service); + if (error == EINTR) { + continue; } - + (void)close(rsock); +#ifndef RTM_GET_SILENT + pthread_mutex_unlock(&lock); +#endif + SCLog(TRUE, LOG_ERR, + CFSTR("SCNetworkReachability: routing socket" + " read() failed: %s"), strerror(error)); + return error; } - - CFRelease(components); - - if (found) { - sc_status = kSCStatusOK; - break; + if ((info->rtm->rtm_type == RTM_GET) && + (info->rtm->rtm_seq == seq) && + (info->rtm->rtm_pid == pid)) { + break; } } - return sc_status; -} + (void)close(rsock); +#ifndef RTM_GET_SILENT + pthread_mutex_unlock(&lock); +#endif -#pragma mark VPN info + get_rtaddrs(info->rtm->rtm_addrs, sa, info->rti_info); +//#define LOG_RTADDRS +#ifdef LOG_RTADDRS + { + int i; -static int -updateVPNStatus(ReachabilityStoreInfoRef store_info, - const struct sockaddr *sa, - const char *if_name, - SCNetworkReachabilityFlags *flags, - CFStringRef *vpn_server, - const char *log_prefix) -{ - CFIndex i; - CFStringRef vpn_if; - int sc_status = kSCStatusNoKey; + SCLog(_sc_debug, LOG_DEBUG, CFSTR("rtm_flags = 0x%8.8x"), info->rtm->rtm_flags); - if (!ReachabilityStoreInfo_update(store_info, NULL, sa->sa_family)) { - return kSCStatusReachabilityUnknown; - } - - if (store_info->n <= 0) { - // if no services - return kSCStatusNoKey; - } - - // look for the [VPN] service which matches the provided interface - - vpn_if = CFStringCreateWithCStringNoCopy(NULL, - if_name, - kCFStringEncodingASCII, - kCFAllocatorNull); - - for (i=0; i < store_info->n; i++) { - CFArrayRef components; - CFStringRef key; - CFNumberRef num; - CFDictionaryRef p_state; - int32_t vpn_status; - CFStringRef service = NULL; - CFStringRef s_key = (CFStringRef) store_info->keys[i]; - CFDictionaryRef s_dict = (CFDictionaryRef)store_info->values[i]; - CFStringRef s_if; - - if (!isA_CFString(s_key) || !isA_CFDictionary(s_dict)) { - continue; - } - - if (!CFStringHasSuffix(s_key, store_info->entity) || - !CFStringHasPrefix(s_key, kSCDynamicStoreDomainState)) { - continue; // if not an active IPv4 or IPv6 entity - } - - s_if = CFDictionaryGetValue(s_dict, kSCPropInterfaceName); - if (!isA_CFString(s_if)) { - continue; // if no interface - } - - if (!CFEqual(vpn_if, s_if)) { - continue; // if not this interface - } - - // extract the service ID and get the VPN "state" entity for - // the "Status" - components = CFStringCreateArrayBySeparatingStrings(NULL, s_key, CFSTR("/")); - if (CFArrayGetCount(components) != 5) { - CFRelease(components); - break; - } - service = CFArrayGetValueAtIndex(components, 3); - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - service, - kSCEntNetVPN); - p_state = CFDictionaryGetValue(store_info->dict, key); - CFRelease(key); - CFRelease(components); - - // ensure that this is a VPN service - if (!isA_CFDictionary(p_state)) { - break; - } - - sc_status = kSCStatusOK; - - *flags |= kSCNetworkReachabilityFlagsTransientConnection; - - // get VPN server - if (vpn_server != NULL) { - *vpn_server = CFDictionaryGetValue(s_dict, CFSTR("ServerAddress")); - *vpn_server = isA_CFString(*vpn_server); - if (*vpn_server != NULL) { - CFRetain(*vpn_server); - } - } - - // get VPN status - if (!CFDictionaryGetValueIfPresent(p_state, - kSCPropNetVPNStatus, - (const void **)&num) || - !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &vpn_status)) { - break; - } -#ifdef HAVE_VPN_STATUS - switch (vpn_status) { - case VPN_RUNNING : - // if we're really UP and RUNNING - break; - case VPN_IDLE : - case VPN_LOADING : - case VPN_LOADED : - case VPN_UNLOADING : - // if we're not connected at all - SCLog(_sc_debug, LOG_INFO, CFSTR("%s VPN link idle"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - default : - // if we're in the process of [dis]connecting - SCLog(_sc_debug, LOG_INFO, CFSTR("%s VPN link, connection in progress"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - } -#endif // HAVE_VPN_STATUS - - break; - } - - CFRelease(vpn_if); - - return sc_status; -} - - -static int -updateVPNAvailable(ReachabilityStoreInfoRef store_info, - const struct sockaddr *sa, - SCNetworkReachabilityFlags *flags, - const char *log_prefix) -{ - CFIndex i; - int sc_status = kSCStatusNoKey; - - if (!ReachabilityStoreInfo_update(store_info, - NULL, - (sa != NULL) ? sa->sa_family : AF_INET)) { - return kSCStatusReachabilityUnknown; - } - - if (store_info->n <= 0) { - // if no services - return kSCStatusNoKey; - } - - // look for an available service which will provide connectivity - // for the requested address family. - - for (i = 0; i < store_info->n; i++) { - CFArrayRef components; - Boolean found = FALSE; - CFStringRef i_key; - CFDictionaryRef i_dict; - CFStringRef p_key; - CFDictionaryRef p_dict; - CFStringRef service; - CFStringRef s_key = (CFStringRef) store_info->keys[i]; - CFDictionaryRef s_dict = (CFDictionaryRef)store_info->values[i]; - - if (!isA_CFString(s_key) || !isA_CFDictionary(s_dict)) { - continue; - } - - if (!CFStringHasSuffix(s_key, store_info->entity) || - !CFStringHasPrefix(s_key, kSCDynamicStoreDomainSetup)) { - continue; // if not an IPv4 or IPv6 entity - } - - // extract service ID - components = CFStringCreateArrayBySeparatingStrings(NULL, s_key, CFSTR("/")); - if (CFArrayGetCount(components) != 5) { - CFRelease(components); - continue; - } - service = CFArrayGetValueAtIndex(components, 3); - - // check for VPN entity - p_key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service, - kSCEntNetVPN); - p_dict = CFDictionaryGetValue(store_info->dict, p_key); - CFRelease(p_key); - - i_key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - service, - kSCEntNetInterface); - i_dict = CFDictionaryGetValue(store_info->dict, i_key); - CFRelease(i_key); - - if (isA_CFDictionary(p_dict) && - isA_CFDictionary(i_dict) && - CFDictionaryContainsKey(i_dict, kSCPropNetInterfaceDeviceName)) { - // we have a VPN service for this address family - found = TRUE; - - *flags |= kSCNetworkReachabilityFlagsReachable; - *flags |= kSCNetworkReachabilityFlagsTransientConnection; - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - - if (_sc_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s status = isReachable (after connect)"), - log_prefix); - SCLog(TRUE, LOG_INFO, CFSTR("%s service = %@"), - log_prefix, - service); - } - - } - - CFRelease(components); - - if (found) { - sc_status = kSCStatusOK; - break; - } - } - - return sc_status; -} - - -#pragma mark IPSec info - - -static int -updateIPSecStatus(ReachabilityStoreInfoRef store_info, - const struct sockaddr *sa, - const char *if_name, - SCNetworkReachabilityFlags *flags, - CFStringRef *ipsec_server, - const char *log_prefix) -{ - CFIndex i; - CFStringRef ipsec_if; - int sc_status = kSCStatusNoKey; - - if (!ReachabilityStoreInfo_update(store_info, NULL, sa->sa_family)) { - return kSCStatusReachabilityUnknown; - } - - if (store_info->n <= 0) { - // if no services - return kSCStatusNoKey; - } - - // look for the [IPSec] service that matches the provided interface - - ipsec_if = CFStringCreateWithCStringNoCopy(NULL, - if_name, - kCFStringEncodingASCII, - kCFAllocatorNull); - - for (i=0; i < store_info->n; i++) { - CFArrayRef components; - CFStringRef key; - CFDictionaryRef i_state; - int32_t ipsec_status; - CFNumberRef num; - CFStringRef service = NULL; - CFStringRef s_key = (CFStringRef) store_info->keys[i]; - CFDictionaryRef s_dict = (CFDictionaryRef)store_info->values[i]; - CFStringRef s_if; - - if (!isA_CFString(s_key) || !isA_CFDictionary(s_dict)) { - continue; - } - - if (!CFStringHasSuffix(s_key, store_info->entity) || - !CFStringHasPrefix(s_key, kSCDynamicStoreDomainState)) { - continue; // if not an IPv4 or IPv6 entity - } - - s_if = CFDictionaryGetValue(s_dict, kSCPropInterfaceName); - if (!isA_CFString(s_if)) { - continue; // if no interface - } - - if (!CFEqual(ipsec_if, s_if)) { - continue; // if not this interface - } - - // extract the service ID, get the IPSec "state" entity for - // the "Status", and get the IPSec "setup" entity to confirm - // that we're looking at what we're expecting - components = CFStringCreateArrayBySeparatingStrings(NULL, s_key, CFSTR("/")); - if (CFArrayGetCount(components) != 5) { - CFRelease(components); - break; - } - service = CFArrayGetValueAtIndex(components, 3); - key = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - service, - kSCEntNetIPSec); - i_state = CFDictionaryGetValue(store_info->dict, key); - CFRelease(key); - CFRelease(components); - - // ensure that this is an IPSec service - if (!isA_CFDictionary(i_state)) { - break; - } - - sc_status = kSCStatusOK; - - *flags |= kSCNetworkReachabilityFlagsTransientConnection; - - // get IPSec server - if (ipsec_server != NULL) { - *ipsec_server = CFDictionaryGetValue(s_dict, CFSTR("ServerAddress")); - *ipsec_server = isA_CFString(*ipsec_server); - if (*ipsec_server != NULL) { - CFRetain(*ipsec_server); - } - } - - // get IPSec status - if (!CFDictionaryGetValueIfPresent(i_state, - kSCPropNetIPSecStatus, - (const void **)&num) || - !isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &ipsec_status)) { - break; - } -#ifdef HAVE_IPSEC_STATUS - switch (ipsec_status) { - case IPSEC_RUNNING : - // if we're really UP and RUNNING - break; - case IPSEC_IDLE : - // if we're not connected at all - SCLog(_sc_debug, LOG_INFO, CFSTR("%s IPSec link idle"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - default : - // if we're in the process of [dis]connecting - SCLog(_sc_debug, LOG_INFO, CFSTR("%s IPSec link, connection in progress"), - log_prefix); - *flags |= kSCNetworkReachabilityFlagsConnectionRequired; - break; - } -#endif // HAVE_IPSEC_STATUS - - break; - } - - CFRelease(ipsec_if); - - return sc_status; -} - - - - -#pragma mark - -#pragma mark Reachability engine - - -#define ROUNDUP(a, size) \ - (((a) & ((size)-1)) ? (1 + ((a) | ((size)-1))) : (a)) - -#define NEXT_SA(ap) (ap) = (struct sockaddr *) \ - ((caddr_t)(ap) + ((ap)->sa_len ? ROUNDUP((ap)->sa_len,\ - sizeof(uint32_t)) :\ - sizeof(uint32_t))) - -static void -get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info) -{ - int i; - - for (i = 0; i < RTAX_MAX; i++) { - if (addrs & (1 << i)) { - rti_info[i] = sa; - NEXT_SA(sa); - } else - rti_info[i] = NULL; - } -} - - -#define BUFLEN (sizeof(struct rt_msghdr) + 512) /* 8 * sizeof(struct sockaddr_in6) = 192 */ - - -typedef struct { - union { - char bytes[BUFLEN]; - struct rt_msghdr rtm; - } buf; - int error; - struct sockaddr *rti_info[RTAX_MAX]; - struct rt_msghdr *rtm; - struct sockaddr_dl *sdl; -} route_info, *route_info_p; - - -/* - * route_get() - * returns zero if route exists and data returned, EHOSTUNREACH - * if no route, or errno for any other error. - */ -static int -route_get(const struct sockaddr *address, - unsigned int if_index, - route_info *info) -{ - int n; - int opt; - pid_t pid = getpid(); - int rsock; - struct sockaddr *sa; - int32_t seq = OSAtomicIncrement32Barrier(&rtm_seq); -#ifndef RTM_GET_SILENT -#warning Note: Using RTM_GET (and not RTM_GET_SILENT) - static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; - int sosize = 48 * 1024; -#endif - - bzero(info, sizeof(*info)); - - info->rtm = &info->buf.rtm; - info->rtm->rtm_msglen = sizeof(struct rt_msghdr); - info->rtm->rtm_version = RTM_VERSION; -#ifdef RTM_GET_SILENT - info->rtm->rtm_type = RTM_GET_SILENT; -#else - info->rtm->rtm_type = RTM_GET; -#endif - info->rtm->rtm_flags = RTF_STATIC|RTF_UP|RTF_HOST|RTF_GATEWAY; - info->rtm->rtm_addrs = RTA_DST|RTA_IFP; /* Both destination and device */ - info->rtm->rtm_pid = pid; - info->rtm->rtm_seq = seq; - - if (if_index != 0) { - info->rtm->rtm_flags |= RTF_IFSCOPE; - info->rtm->rtm_index = if_index; - } - - switch (address->sa_family) { - case AF_INET6: { - struct sockaddr_in6 *sin6; - - /* ALIGN: caller ensures that the address is aligned */ - sin6 = (struct sockaddr_in6 *)(void *)address; - if ((IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6->sin6_addr)) && - (sin6->sin6_scope_id != 0)) { - sin6->sin6_addr.s6_addr16[1] = htons(sin6->sin6_scope_id); - sin6->sin6_scope_id = 0; - } - break; - } - } - - sa = (struct sockaddr *) (info->rtm + 1); - bcopy(address, sa, address->sa_len); - n = ROUNDUP(sa->sa_len, sizeof(uint32_t)); - info->rtm->rtm_msglen += n; - - info->sdl = (struct sockaddr_dl *) ((void *)sa + n); - info->sdl->sdl_family = AF_LINK; - info->sdl->sdl_len = sizeof (struct sockaddr_dl); - n = ROUNDUP(info->sdl->sdl_len, sizeof(uint32_t)); - info->rtm->rtm_msglen += n; - -#ifndef RTM_GET_SILENT - pthread_mutex_lock(&lock); -#endif - rsock = socket(PF_ROUTE, SOCK_RAW, PF_ROUTE); - if (rsock == -1) { - int error = errno; - -#ifndef RTM_GET_SILENT - pthread_mutex_unlock(&lock); -#endif - SCLog(TRUE, LOG_ERR, CFSTR("socket(PF_ROUTE) failed: %s"), strerror(error)); - return error; - } - opt = 1; - if (ioctl(rsock, FIONBIO, &opt) < 0) { - int error = errno; - - (void)close(rsock); -#ifndef RTM_GET_SILENT - pthread_mutex_unlock(&lock); -#endif - SCLog(TRUE, LOG_ERR, CFSTR("ioctl(FIONBIO) failed: %s"), strerror(error)); - return error; - } - -#ifndef RTM_GET_SILENT - if (setsockopt(rsock, SOL_SOCKET, SO_RCVBUF, &sosize, sizeof(sosize)) == -1) { - int error = errno; - - (void)close(rsock); - pthread_mutex_unlock(&lock); - SCLog(TRUE, LOG_ERR, CFSTR("setsockopt(SO_RCVBUF) failed: %s"), strerror(error)); - return error; - } -#endif - - if (write(rsock, &info->buf, info->rtm->rtm_msglen) == -1) { - int error = errno; - - (void)close(rsock); -#ifndef RTM_GET_SILENT - pthread_mutex_unlock(&lock); -#endif - if (error != ESRCH) { - SCLog(TRUE, LOG_ERR, CFSTR("write() failed: %s"), strerror(error)); - return error; - } - return EHOSTUNREACH; - } - - /* - * Type, seq, pid identify our response. - * Routing sockets are broadcasters on input. - */ - while (TRUE) { - int n; - - n = read(rsock, &info->buf, sizeof(info->buf)); - if (n == -1) { - int error = errno; - - if (error == EINTR) { - continue; - } - (void)close(rsock); -#ifndef RTM_GET_SILENT - pthread_mutex_unlock(&lock); -#endif - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability: routing socket" - " read() failed: %s"), strerror(error)); - return error; - } - if ((info->rtm->rtm_type == RTM_GET) && - (info->rtm->rtm_seq == seq) && - (info->rtm->rtm_pid == pid)) { - break; - } - } - - (void)close(rsock); -#ifndef RTM_GET_SILENT - pthread_mutex_unlock(&lock); -#endif - - get_rtaddrs(info->rtm->rtm_addrs, sa, info->rti_info); - -//#define LOG_RTADDRS -#ifdef LOG_RTADDRS - { - int i; - - SCLog(_sc_debug, LOG_DEBUG, CFSTR("rtm_flags = 0x%8.8x"), info->rtm->rtm_flags); - - if ((info->rti_info[RTAX_NETMASK] != NULL) && (info->rti_info[RTAX_DST] != NULL)) { - info->rti_info[RTAX_NETMASK]->sa_family = info->rti_info[RTAX_DST]->sa_family; - } + if ((info->rti_info[RTAX_NETMASK] != NULL) && (info->rti_info[RTAX_DST] != NULL)) { + info->rti_info[RTAX_NETMASK]->sa_family = info->rti_info[RTAX_DST]->sa_family; + } for (i = 0; i < RTAX_MAX; i++) { if (info->rti_info[i] != NULL) { @@ -1636,15 +992,44 @@ route_get(const struct sockaddr *address, return 0; } + +static void +log_address(const char *str, + const struct sockaddr *sa, + unsigned int if_index, + const char *log_prefix) +{ + char addr[128]; + char if_name[IFNAMSIZ + 1]; + + _SC_sockaddr_to_string(sa, addr, sizeof(addr)); + + if ((if_index != 0) && + (if_indextoname(if_index, &if_name[1]) != NULL)) { + if_name[0] = '%'; + } else { + if_name[0] = '\0'; + } + + SCLog(TRUE, LOG_INFO, CFSTR("%s%s(%s%s)"), + log_prefix, + str, + addr, + if_name); + + return; +} + + static int -checkAddressRoute(const struct sockaddr *address, - unsigned int if_index, - char *if_name, - struct ifreq *ifr, - ReachabilityInfo *reach_info, - route_info *info, - int *sc_status, - const char *log_prefix) +checkAddress_route(const struct sockaddr *address, + unsigned int if_index, + char *if_name, + struct ifreq *ifr, + ReachabilityInfo *reach_info, + route_info *info, + int *sc_status, + const char *log_prefix) { int isock = -1; int ret = 0; @@ -1655,22 +1040,7 @@ checkAddressRoute(const struct sockaddr *address, case AF_INET : case AF_INET6 : if (_sc_debug) { - char addr[128]; - char if_name[IFNAMSIZ + 1]; - - _SC_sockaddr_to_string(address, addr, sizeof(addr)); - - if ((if_index != 0) && - (if_indextoname(if_index, &if_name[1]) != NULL)) { - if_name[0] = '%'; - } else { - if_name[0] = '\0'; - } - - SCLog(TRUE, LOG_INFO, CFSTR("%scheckAddress(%s%s)"), - log_prefix, - addr, - if_name); + log_address("checkAddress", address, if_index, log_prefix); } break; default : @@ -1815,16 +1185,19 @@ checkAddressRoute(const struct sockaddr *address, SCLog(TRUE, LOG_INFO, CFSTR("%s ifr_flags = 0x%04hx"), log_prefix, ifr->ifr_flags); SCLog(TRUE, LOG_INFO, CFSTR("%s rtm_flags = 0x%08x"), log_prefix, info->rtm->rtm_flags); } -done : + + done : if (isock != -1) (void)close(isock); return ret; } + static Boolean -checkAddress_with_nwi(const struct sockaddr *address, - unsigned int if_index, - ReachabilityInfo *reach_info, - const char *log_prefix) +checkAddress(ReachabilityStoreInfoRef store_info, + const struct sockaddr *address, + unsigned int if_index, + ReachabilityInfo *reach_info, + const char *log_prefix) { route_info info; struct ifreq ifr; @@ -1839,7 +1212,7 @@ checkAddress_with_nwi(const struct sockaddr *address, nwi_state = nwi_state_copy(); if (address != NULL) { - ret = checkAddressRoute(address, + ret = checkAddress_route(address, if_index, if_name, &ifr, @@ -1847,9 +1220,7 @@ checkAddress_with_nwi(const struct sockaddr *address, &info, &sc_status, log_prefix); - - } - else { + } else { /* special case: check only for available paths off the system */ ret = EHOSTUNREACH; } @@ -1860,7 +1231,6 @@ checkAddress_with_nwi(const struct sockaddr *address, sc_status = kSCStatusOK; ifstate = nwi_state_get_ifstate(nwi_state, if_name); - if (ifstate == NULL) { goto done; } @@ -1893,18 +1263,20 @@ checkAddress_with_nwi(const struct sockaddr *address, } } else if (ret == EHOSTUNREACH) { if (if_index == 0) { + int af; + + // if not "scoped" request + af = (address != NULL) ? address->sa_family : AF_UNSPEC; + reach_info->flags |= nwi_state_get_reachability_flags(nwi_state, af); sc_status = kSCStatusOK; - reach_info->flags |= nwi_state_get_reachability_flags(nwi_state, - (address != NULL) ? address->sa_family - : AF_UNSPEC); } else { - // if scoped request + // if "scoped" request sc_status = kSCStatusNoKey; } - } -done: + done: + if (reach_info->flags == 0) { SCLog(_sc_debug, LOG_INFO, CFSTR("%s cannot be reached"), log_prefix); } @@ -1922,137 +1294,87 @@ done: } -static Boolean -checkAddress_bypass_nwi(ReachabilityStoreInfoRef store_info, - const struct sockaddr *address, - unsigned int if_index, - ReachabilityInfo *reach_info, - const char *log_prefix) -{ - route_info info; - struct ifreq ifr; - char if_name[IFNAMSIZ]; - int ret; - CFStringRef server = NULL; - int sc_status = kSCStatusReachabilityUnknown; +#pragma mark - +#pragma mark SCNetworkReachability APIs - _reach_set(reach_info, &NOT_REACHABLE, reach_info->cycle, if_index, NULL); - if (address != NULL) { - ret = checkAddressRoute(address, - if_index, - if_name, - &ifr, - reach_info, - &info, - &sc_status, - log_prefix); +static __inline__ CFTypeRef +isA_SCNetworkReachability(CFTypeRef obj) +{ + return (isA_CFType(obj, SCNetworkReachabilityGetTypeID())); +} - } - else { - /* special case: check only for available paths off the system */ - ret = EHOSTUNREACH; - } - if (ret == 0) { - sc_status = kSCStatusOK; +static Boolean +addr_to_PTR_name(const struct sockaddr *sa, char *name, size_t name_len) +{ + int n; - if (ifr.ifr_flags & IFF_POINTOPOINT) { - reach_info->flags |= kSCNetworkReachabilityFlagsTransientConnection; - } + switch (sa->sa_family) { + case AF_INET : { + union { + in_addr_t s_addr; + unsigned char b[4]; + } rev; + /* ALIGN: assuming sa is aligned, then cast ok. */ + struct sockaddr_in *sin = (struct sockaddr_in *)(void *)sa; - if (info.sdl->sdl_type == IFT_PPP) { - /* - * 1. check if PPP service - * 2. check for dial-on-demand PPP link that is not yet connected - * 3. get PPP server address - */ - sc_status = updatePPPStatus(store_info, address, if_name, &reach_info->flags, &server, log_prefix); - } else if (info.sdl->sdl_type == IFT_OTHER) { /* - * 1. check if IPSec service - * 2. get IPSec server address + * build "PTR" query name + * NNN.NNN.NNN.NNN.in-addr.arpa. */ - sc_status = updateIPSecStatus(store_info, address, if_name, &reach_info->flags, &server, log_prefix); - if (sc_status == kSCStatusNoKey) { - /* - * 1. check if VPN service - * 2. get VPN server address - */ - sc_status = updateVPNStatus(store_info, address, if_name, &reach_info->flags, &server, log_prefix); + rev.s_addr = sin->sin_addr.s_addr; + n = snprintf(name, name_len, "%u.%u.%u.%u.in-addr.arpa.", + rev.b[3], + rev.b[2], + rev.b[1], + rev.b[0]); + if ((n == -1) || (n >= name_len)) { + return FALSE; } - } - - } else if (ret == EHOSTUNREACH) { - if (if_index != 0) { - // if scoped request - sc_status = kSCStatusNoKey; - goto done; - } - - sc_status = updatePPPAvailable(store_info, address, &reach_info->flags, log_prefix); - if ((sc_status == kSCStatusOK) && (reach_info->flags != 0)) { - goto done; + break; } - sc_status = updateVPNAvailable(store_info, address, &reach_info->flags, log_prefix); - if ((sc_status == kSCStatusOK) && (reach_info->flags != 0)) { - goto done; - } + case AF_INET6 : { + int i; + int s = 0; + /* ALIGN: assume sa is aligned, cast ok. */ + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)(void *)sa; + size_t x = name_len; - } + /* + * build IPv6 "nibble" PTR query name (RFC 1886, RFC 3152) + * N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.ip6.arpa. + */ + for (i = sizeof(sin6->sin6_addr) - 1; i >= 0; i--) { + n = snprintf(&name[s], x, "%x.%x.", + ( sin6->sin6_addr.s6_addr[i] & 0xf), + ((sin6->sin6_addr.s6_addr[i] >> 4) & 0xf)); + if ((n == -1) || (n >= x)) { + return FALSE; + } -done : + s += n; + x -= n; + } - if (reach_info->flags == 0) { - SCLog(_sc_debug, LOG_INFO, CFSTR("%s cannot be reached"), log_prefix); - } + n = snprintf(&name[s], x, "ip6.arpa."); + if ((n == -1) || (n >= x)) { + return FALSE; + } - if (server != NULL) CFRelease(server); + break; + } - if ((sc_status != kSCStatusOK) && (sc_status != kSCStatusNoKey)) { - _SCErrorSet(sc_status); - return FALSE; + default : + return FALSE; } return TRUE; } -static inline Boolean -checkAddress(ReachabilityStoreInfoRef store_info, - const struct sockaddr *address, - unsigned int if_index, - ReachabilityInfo *reach_info, - const char *log_prefix) -{ - if (!D_nwiBypass) { - return (checkAddress_with_nwi(address, - if_index, - reach_info, - log_prefix)); - - } - - return (checkAddress_bypass_nwi(store_info, - address, - if_index, - reach_info, - log_prefix)); -} - -#pragma mark - -#pragma mark SCNetworkReachability APIs - - -static __inline__ CFTypeRef -isA_SCNetworkReachability(CFTypeRef obj) -{ - return (isA_CFType(obj, SCNetworkReachabilityGetTypeID())); -} - - CFStringRef _SCNetworkReachabilityCopyTargetDescription(SCNetworkReachabilityRef target) { @@ -2085,6 +1407,10 @@ _SCNetworkReachabilityCopyTargetDescription(SCNetworkReachabilityRef target) CFStringAppendFormat(str, NULL, CFSTR("name = %s"), targetPrivate->name); break; } + case reachabilityTypePTR : { + CFStringAppendFormat(str, NULL, CFSTR("ptr = %s"), targetPrivate->name); + break; + } } return str; @@ -2126,16 +1452,12 @@ __SCNetworkReachabilityCopyDescription(CFTypeRef cf) CFRelease(str); // add additional "name" info - if (targetPrivate->type == reachabilityTypeName) { + if (isReachabilityTypeName(targetPrivate->type)) { if (targetPrivate->dnsActive) { CFStringAppendFormat(result, NULL, CFSTR(" (DNS query active)")); -#ifdef HAVE_REACHABILITY_SERVER } else if (targetPrivate->serverActive && (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending)) { CFStringAppendFormat(result, NULL, CFSTR(" (server query active)")); -#endif // HAVE_REACHABILITY_SERVER - } else if (targetPrivate->dnsMP != MACH_PORT_NULL) { - CFStringAppendFormat(result, NULL, CFSTR(" (DNS* query active)")); } else if ((targetPrivate->resolvedAddresses != NULL) || (targetPrivate->resolvedError != NETDB_SUCCESS)) { if (targetPrivate->resolvedAddresses != NULL) { if (isA_CFArray(targetPrivate->resolvedAddresses)) { @@ -2145,15 +1467,21 @@ __SCNetworkReachabilityCopyDescription(CFTypeRef cf) CFStringAppendFormat(result, NULL, CFSTR(" (")); for (i = 0; i < n; i++) { CFDataRef address; - char buf[64]; - struct sockaddr *sa; + + CFStringAppendFormat(result, NULL, CFSTR("%s"), + i > 0 ? ", " : ""); address = CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i); - sa = (struct sockaddr *)CFDataGetBytePtr(address); - _SC_sockaddr_to_string(sa, buf, sizeof(buf)); - CFStringAppendFormat(result, NULL, CFSTR("%s%s"), - i > 0 ? ", " : "", - buf); + if (isA_CFData(address)) { + char buf[64]; + struct sockaddr *sa; + + sa = (struct sockaddr *)CFDataGetBytePtr(address); + _SC_sockaddr_to_string(sa, buf, sizeof(buf)); + CFStringAppendFormat(result, NULL, CFSTR("%s"), buf); + } else { + CFStringAppendFormat(result, NULL, CFSTR("%@"), address); + } } CFStringAppendFormat(result, NULL, CFSTR(")")); } else if (CFEqual(targetPrivate->resolvedAddresses, kCFNull)) { @@ -2205,13 +1533,11 @@ __SCNetworkReachabilityDeallocate(CFTypeRef cf) SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%srelease"), targetPrivate->log_prefix); -#ifdef HAVE_REACHABILITY_SERVER /* disconnect from the reachability server */ if (targetPrivate->serverActive) { __SCNetworkReachabilityServer_targetRemove(target); } -#endif // HAVE_REACHABILITY_SERVER /* release resources */ @@ -2223,8 +1549,12 @@ __SCNetworkReachabilityDeallocate(CFTypeRef cf) if (targetPrivate->resolvedAddresses != NULL) CFRelease(targetPrivate->resolvedAddresses); - if (targetPrivate->localAddress != NULL) + if (targetPrivate->localAddress != NULL) { + if (targetPrivate->localAddress == targetPrivate->remoteAddress) { + targetPrivate->remoteAddress = NULL; + } CFAllocatorDeallocate(NULL, (void *)targetPrivate->localAddress); + } if (targetPrivate->remoteAddress != NULL) CFAllocatorDeallocate(NULL, (void *)targetPrivate->remoteAddress); @@ -2249,7 +1579,6 @@ __SCNetworkReachabilityDeallocate(CFTypeRef cf) CFRelease(targetPrivate->onDemandServiceID); } -#ifdef HAVE_REACHABILITY_SERVER if (targetPrivate->serverDigest != NULL) { CFRelease(targetPrivate->serverDigest); } @@ -2265,7 +1594,10 @@ __SCNetworkReachabilityDeallocate(CFTypeRef cf) if (targetPrivate->serverWatchers != NULL) { CFRelease(targetPrivate->serverWatchers); } -#endif // HAVE_REACHABILITY_SERVER + + if (targetPrivate->nePolicyResult) { + free(targetPrivate->nePolicyResult); + } return; } @@ -2278,21 +1610,18 @@ __SCNetworkReachabilityInitialize(void) // provide a way to enable SCNetworkReachability logging without // having to set _sc_debug=1. - if (getenv("REACH_LOGGING") != NULL) { + if ((getenv("REACH_LOGGING") != NULL) || + (CFPreferencesGetAppBooleanValue(CFSTR("com.apple.SCNetworkReachability.debug"), + kCFPreferencesCurrentApplication, + NULL))) { _sc_debug = TRUE; } -#ifdef HAVE_REACHABILITY_SERVER // set per-process "bypass" of the SCNetworkReachability server if (getenv("REACH_SERVER_BYPASS") != NULL) { D_serverBypass = TRUE; } -#endif // HAVE_REACHABILITY_SERVER - - if (getenv("NWI_BYPASS") != NULL) { - D_nwiBypass = TRUE; - } pthread_mutexattr_init(&lock_attr); pthread_mutexattr_settype(&lock_attr, PTHREAD_MUTEX_ERRORCHECK); @@ -2309,9 +1638,8 @@ __SCNetworkReachability_concurrent_queue() static dispatch_queue_t q; dispatch_once(&once, ^{ - q = dispatch_queue_create("SCNetworkReachabilty.concurrent", + q = dispatch_queue_create("SCNetworkReachability.concurrent", DISPATCH_QUEUE_CONCURRENT); - dispatch_queue_set_width(q, 32); }); return q; @@ -2319,20 +1647,33 @@ __SCNetworkReachability_concurrent_queue() /* - * __SCNetworkReachabilityPerformConcurrent + * __SCNetworkReachabilityUpdateConcurrent * - * Calls reachPerform() + * Calls reachUpdate() * - caller must be holding a reference to the target * - caller must *not* be holding the target lock * - caller must be running on the __SCNetworkReachability_concurrent_queue() */ __private_extern__ void -__SCNetworkReachabilityPerformConcurrent(SCNetworkReachabilityRef target) +__SCNetworkReachabilityUpdateConcurrent(SCNetworkReachabilityRef target) { + Boolean changed; + unsigned int n; dispatch_queue_t queue; SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; + changed = reachUpdate((void *)target); + if (!changed) { + return; + } + + n = _SC_ATOMIC_INC(&targetPrivate->pending); + if (n > 0) { + // if we already have a notification pending + return; + } + MUTEX_LOCK(&targetPrivate->lock); queue = targetPrivate->dispatchQueue; @@ -2350,6 +1691,7 @@ __SCNetworkReachabilityPerformConcurrent(SCNetworkReachabilityRef target) reachPerform((void *)target); dispatch_group_leave(group); }); + dispatch_release(queue); } else { if (targetPrivate->rls != NULL) { @@ -2365,19 +1707,19 @@ __SCNetworkReachabilityPerformConcurrent(SCNetworkReachabilityRef target) /* - * __SCNetworkReachabilityPerform + * __SCNetworkReachabilityUpdate * - * Calls reachPerform() + * Calls reachUpdate() [indirectly] * - caller can be holding the target lock * - caller can be running on any dispatch queue */ __private_extern__ void -__SCNetworkReachabilityPerform(SCNetworkReachabilityRef target) +__SCNetworkReachabilityUpdate(SCNetworkReachabilityRef target) { CFRetain(target); dispatch_async(__SCNetworkReachability_concurrent_queue(), ^{ - __SCNetworkReachabilityPerformConcurrent(target); + __SCNetworkReachabilityUpdateConcurrent(target); CFRelease(target); }); @@ -2385,41 +1727,6 @@ __SCNetworkReachabilityPerform(SCNetworkReachabilityRef target) } -/* - * __SCNetworkReachabilityPerformLocked - * - * Calls reachPerform() - * - caller must be holding the target lock - * - caller not running on the __SCNetworkReachability_concurrent_queue() - */ -static void -__SCNetworkReachabilityPerformLocked(SCNetworkReachabilityRef target) -{ - dispatch_queue_t queue; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_ASSERT_HELD(&targetPrivate->lock); - - queue = targetPrivate->dispatchQueue; - if (queue != NULL) { - dispatch_retain(queue); - CFRetain(target); - dispatch_group_async(targetPrivate->dispatchGroup, __SCNetworkReachability_concurrent_queue(), ^{ - dispatch_sync(queue, ^{ - reachPerform((void *)target); - CFRelease(target); - }); - dispatch_release(queue); - }); - } else if (targetPrivate->rls != NULL) { - CFRunLoopSourceSignal(targetPrivate->rls); - _SC_signalRunLoop(target, targetPrivate->rls, targetPrivate->rlList); - } - - return; -} - - static SCNetworkReachabilityPrivateRef __SCNetworkReachabilityCreatePrivate(CFAllocatorRef allocator) { @@ -2445,10 +1752,7 @@ __SCNetworkReachabilityCreatePrivate(CFAllocatorRef allocator) targetPrivate->cycle = 1; targetPrivate->last_notify = NOT_REPORTED; - -#ifdef HAVE_REACHABILITY_SERVER targetPrivate->serverBypass = D_serverBypass; -#endif // HAVE_REACHABILITY_SERVER @@ -2481,7 +1785,7 @@ is_valid_address(const struct sockaddr *address) } else { if (!warned) { SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %d"), + CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %zu"), address->sa_len, sizeof(struct sockaddr_in)); warned = TRUE; @@ -2493,7 +1797,7 @@ is_valid_address(const struct sockaddr *address) valid = address; } else if (!warned) { SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %d"), + CFSTR("SCNetworkReachabilityCreateWithAddress[Pair] called with \"struct sockaddr *\" len %d < %zu"), address->sa_len, sizeof(struct sockaddr_in6)); warned = TRUE; @@ -2515,6 +1819,8 @@ is_valid_address(const struct sockaddr *address) + + SCNetworkReachabilityRef SCNetworkReachabilityCreateWithAddress(CFAllocatorRef allocator, const struct sockaddr *address) @@ -2537,6 +1843,7 @@ SCNetworkReachabilityCreateWithAddress(CFAllocatorRef allocator, bcopy(address, targetPrivate->remoteAddress, address->sa_len); + SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"), targetPrivate->log_prefix, DEBUG_REACHABILITY_TYPE_ADDRESS, @@ -2546,6 +1853,57 @@ SCNetworkReachabilityCreateWithAddress(CFAllocatorRef allocator, } +static Boolean +is_same_address(const struct sockaddr *a, const struct sockaddr *b) +{ + const void *a_addr; + const void *b_addr; + size_t len; + + if ((a == NULL) || + (b == NULL) || + (a->sa_family != b->sa_family) || + (a->sa_len != b->sa_len )) { + return FALSE; + } + + switch (a->sa_family) { + case AF_INET : { + struct sockaddr_in *a_sin = (struct sockaddr_in *)(void *)a; + struct sockaddr_in *b_sin = (struct sockaddr_in *)(void *)b; + + /* ALIGN: assuming a (and b) are aligned, then cast ok. */ + a_addr = &a_sin->sin_addr; + b_addr = &b_sin->sin_addr; + len = sizeof(struct in_addr); + break; + } + + case AF_INET6 : { + struct sockaddr_in6 *a_sin6 = (struct sockaddr_in6 *)(void *)a; + struct sockaddr_in6 *b_sin6 = (struct sockaddr_in6 *)(void *)b; + + if (a_sin6->sin6_scope_id != b_sin6->sin6_scope_id) { + return FALSE; + } + + a_addr = &a_sin6->sin6_addr; + b_addr = &b_sin6->sin6_addr; + len = sizeof(struct in6_addr); + break; + } + + default : + a_addr = a; + b_addr = b; + len = a->sa_len; + break; + } + + return (bcmp(a_addr, b_addr, len) == 0); +} + + SCNetworkReachabilityRef SCNetworkReachabilityCreateWithAddressPair(CFAllocatorRef allocator, const struct sockaddr *localAddress, @@ -2587,11 +1945,16 @@ SCNetworkReachabilityCreateWithAddressPair(CFAllocatorRef allocator, } if (remoteAddress != NULL) { - targetPrivate->remoteAddress = CFAllocatorAllocate(NULL, remoteAddress->sa_len, 0); - bcopy(remoteAddress, targetPrivate->remoteAddress, remoteAddress->sa_len); + if (is_same_address(localAddress, remoteAddress)) { + targetPrivate->remoteAddress = targetPrivate->localAddress; + } else { + targetPrivate->remoteAddress = CFAllocatorAllocate(NULL, remoteAddress->sa_len, 0); + bcopy(remoteAddress, targetPrivate->remoteAddress, remoteAddress->sa_len); + } } + SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"), targetPrivate->log_prefix, DEBUG_REACHABILITY_TYPE_ADDRESSPAIR, @@ -2605,15 +1968,12 @@ SCNetworkReachabilityRef SCNetworkReachabilityCreateWithName(CFAllocatorRef allocator, const char *nodename) { -#ifdef HAVE_REACHABILITY_SERVER - CFDictionaryRef appLayerVPNProperties; -#endif // HAVE_REACHABILITY_SERVER union { struct sockaddr sa; struct sockaddr_in sin; struct sockaddr_in6 sin6; } addr; - int nodenameLen; + size_t nodenameLen; SCNetworkReachabilityPrivateRef targetPrivate; if (nodename == NULL) { @@ -2627,6 +1987,33 @@ SCNetworkReachabilityCreateWithName(CFAllocatorRef allocator, return NULL; } + if (nodename[nodenameLen - 1] == '.') { + int dots; + size_t i; + + // trim trailing "."s + do { + --nodenameLen; + } while ((nodenameLen > 0) && (nodename[nodenameLen - 1] == '.')); + + if (nodenameLen == 0) { + // if only trailing "."s + _SCErrorSet(kSCStatusInvalidArgument); + return NULL; + } + + // count the remaining "."s + dots = 0; + for (i = 0; i < nodenameLen; i++) { + if (nodename[i] == '.') dots++; + } + + if (dots == 0) { + // if only a single-label, add back the FQDN "." + nodenameLen++; + } + } + if (_SC_string_to_sockaddr(nodename, AF_UNSPEC, (void *)&addr, sizeof(addr)) != NULL) { /* if this "nodename" is really an IP[v6] address in disguise */ return SCNetworkReachabilityCreateWithAddress(allocator, &addr.sa); @@ -2644,24 +2031,52 @@ SCNetworkReachabilityCreateWithName(CFAllocatorRef allocator, targetPrivate->needResolve = TRUE; targetPrivate->info.flags |= kSCNetworkReachabilityFlagsFirstResolvePending; -#ifdef HAVE_REACHABILITY_SERVER targetPrivate->serverInfo.flags |= kSCNetworkReachabilityFlagsFirstResolvePending; - /* make sure AppLayerVPN only is in client mode */ - appLayerVPNProperties = VPNAppLayerCopyCurrentAppProperties(); - if (appLayerVPNProperties != NULL) { - targetPrivate->useVPNAppLayer = TRUE; - targetPrivate->serverBypass = YES; - CFRelease(appLayerVPNProperties); + { + /* make sure AppLayerVPN only is in client mode */ + CFDictionaryRef appLayerVPNProperties; + + appLayerVPNProperties = VPNAppLayerCopyCurrentAppProperties(); + if (appLayerVPNProperties != NULL) { + targetPrivate->serverBypassForVPN = TRUE; + targetPrivate->serverBypass = YES; + CFRelease(appLayerVPNProperties); + } + } + + SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"), + targetPrivate->log_prefix, + DEBUG_REACHABILITY_TYPE_NAME, + targetPrivate); + + return (SCNetworkReachabilityRef)targetPrivate; +} + + +static SCNetworkReachabilityRef +__SCNetworkReachabilityCreateWithPtr(CFAllocatorRef allocator, + const char *ptrName, + const struct sockaddr *ptrAddress) +{ + SCNetworkReachabilityRef target; + SCNetworkReachabilityPrivateRef targetPrivate; + + target = SCNetworkReachabilityCreateWithName(NULL, ptrName); + if (target == NULL) { + return NULL; } -#endif // HAVE_REACHABILITY_SERVER - SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%s%s %@"), - targetPrivate->log_prefix, - DEBUG_REACHABILITY_TYPE_NAME, - targetPrivate); + targetPrivate = (SCNetworkReachabilityPrivateRef)target; - return (SCNetworkReachabilityRef)targetPrivate; + // change type + targetPrivate->type = reachabilityTypePTR; + + // and keep the address + targetPrivate->remoteAddress = CFAllocatorAllocate(NULL, ptrAddress->sa_len, 0); + bcopy(ptrAddress, targetPrivate->remoteAddress, ptrAddress->sa_len); + + return target; } @@ -2672,15 +2087,14 @@ SCNetworkReachabilityCreateWithOptions(CFAllocatorRef allocator, CFDictionaryRef options) { const struct sockaddr *addr_l = NULL; + const struct sockaddr *addr_p = NULL; const struct sockaddr *addr_r = NULL; CFDataRef data; CFStringRef interface = NULL; CFStringRef nodename; CFBooleanRef onDemandBypass; CFBooleanRef resolverBypass; -#ifdef HAVE_REACHABILITY_SERVER CFBooleanRef serverBypass; -#endif // HAVE_REACHABILITY_SERVER SCNetworkReachabilityRef target; SCNetworkReachabilityPrivateRef targetPrivate; @@ -2703,6 +2117,14 @@ SCNetworkReachabilityCreateWithOptions(CFAllocatorRef allocator, } addr_l = (const struct sockaddr *)CFDataGetBytePtr(data); } + data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionPTRAddress); + if (data != NULL) { + if (!isA_CFData(data) || (CFDataGetLength(data) < sizeof(struct sockaddr_in))) { + _SCErrorSet(kSCStatusInvalidArgument); + return NULL; + } + addr_p = (const struct sockaddr *)CFDataGetBytePtr(data); + } data = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionRemoteAddress); if (data != NULL) { if (!isA_CFData(data) || (CFDataGetLength(data) < sizeof(struct sockaddr_in))) { @@ -2729,19 +2151,17 @@ SCNetworkReachabilityCreateWithOptions(CFAllocatorRef allocator, } -#ifdef HAVE_REACHABILITY_SERVER serverBypass = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionServerBypass); if ((serverBypass != NULL) && !isA_CFBoolean(serverBypass)) { _SCErrorSet(kSCStatusInvalidArgument); return NULL; } -#endif // HAVE_REACHABILITY_SERVER if (nodename != NULL) { const char *name; - if ((addr_l != NULL) || (addr_r != NULL)) { + if ((addr_l != NULL) || (addr_r != NULL) || (addr_p != NULL)) { // can't have both a nodename and an address _SCErrorSet(kSCStatusInvalidArgument); return NULL; @@ -2750,6 +2170,17 @@ SCNetworkReachabilityCreateWithOptions(CFAllocatorRef allocator, name = _SC_cfstring_to_cstring(nodename, NULL, 0, kCFStringEncodingUTF8); target = SCNetworkReachabilityCreateWithName(allocator, name); CFAllocatorDeallocate(NULL, (void *)name); + } else if (addr_p != NULL) { + char name[MAXHOSTNAMELEN]; + + if ((addr_l != NULL) || // can't have PTR and target address + (addr_r != NULL) || // can't have PTR and target address + !addr_to_PTR_name(addr_p, name, sizeof(name))) { // can't convert PTR + _SCErrorSet(kSCStatusInvalidArgument); + return NULL; + } + + target = __SCNetworkReachabilityCreateWithPtr(NULL, name, addr_p); } else { if ((addr_l != NULL) && (addr_r != NULL)) { target = SCNetworkReachabilityCreateWithAddressPair(NULL, addr_l, addr_r); @@ -2789,29 +2220,27 @@ SCNetworkReachabilityCreateWithOptions(CFAllocatorRef allocator, targetPrivate->resolverBypass = CFBooleanGetValue(resolverBypass); } -#ifdef HAVE_REACHABILITY_SERVER - /* if by name, make sure AppLayerVPN only is in client mode */ - if (serverBypass != NULL && targetPrivate->useVPNAppLayer == FALSE) { + /* if by name, make sure client-only VPN types stay in client mode */ + if (serverBypass != NULL && targetPrivate->serverBypassForVPN == FALSE) { targetPrivate->serverBypass = CFBooleanGetValue(serverBypass); } -#endif // HAVE_REACHABILITY_SERVER if (_sc_debug && (_sc_log > 0)) { - const char *opt; + const char *opt = "???"; switch (targetPrivate->type) { - case reachabilityTypeName : - opt = DEBUG_REACHABILITY_TYPE_NAME_OPTIONS; - break; case reachabilityTypeAddress : opt = DEBUG_REACHABILITY_TYPE_ADDRESS_OPTIONS; break; case reachabilityTypeAddressPair : opt = DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_OPTIONS; break; - default : - opt = "???"; + case reachabilityTypeName : + opt = DEBUG_REACHABILITY_TYPE_NAME_OPTIONS; + break; + case reachabilityTypePTR : + opt = DEBUG_REACHABILITY_TYPE_PTR_OPTIONS; break; } @@ -2825,6 +2254,81 @@ SCNetworkReachabilityCreateWithOptions(CFAllocatorRef allocator, } +static SCNetworkReachabilityRef +__SCNetworkReachabilityCreateCopy(SCNetworkReachabilityRef target) +{ + SCNetworkReachabilityRef clone = NULL; + SCNetworkReachabilityPrivateRef clonePrivate; + SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; + + switch (targetPrivate->type) { + case reachabilityTypeAddress : + clone = SCNetworkReachabilityCreateWithAddress(NULL, + targetPrivate->remoteAddress); + break; + case reachabilityTypeAddressPair : + clone = SCNetworkReachabilityCreateWithAddressPair(NULL, + targetPrivate->localAddress, + targetPrivate->remoteAddress); + break; + case reachabilityTypeName : + clone = SCNetworkReachabilityCreateWithName(NULL, + targetPrivate->name); + break; + case reachabilityTypePTR : + clone = __SCNetworkReachabilityCreateWithPtr(NULL, + targetPrivate->name, + targetPrivate->remoteAddress); + break; + } + if (clone == NULL) { + return NULL; + } + + clonePrivate = (SCNetworkReachabilityPrivateRef)clone; + + clonePrivate->quiet = TRUE; + + clonePrivate->if_index = targetPrivate->if_index; + bcopy(targetPrivate->if_name, clonePrivate->if_name, sizeof(clonePrivate->if_name)); + + clonePrivate->onDemandBypass = targetPrivate->onDemandBypass; + + + clonePrivate->serverBypass = targetPrivate->serverBypass; + + clonePrivate->resolverBypass = targetPrivate->resolverBypass; + + + if (_sc_debug && (_sc_log > 0)) { + const char *opt = "???"; + + switch (clonePrivate->type) { + case reachabilityTypeAddress : + opt = DEBUG_REACHABILITY_TYPE_ADDRESS_CLONE; + break; + case reachabilityTypeAddressPair : + opt = DEBUG_REACHABILITY_TYPE_ADDRESSPAIR_CLONE; + break; + case reachabilityTypeName : + opt = DEBUG_REACHABILITY_TYPE_NAME_CLONE; + break; + case reachabilityTypePTR : + opt = DEBUG_REACHABILITY_TYPE_PTR_CLONE; + break; + } + + SCLog(TRUE, LOG_INFO, CFSTR("%s%s %p %@"), + clonePrivate->log_prefix, + opt, + targetPrivate, + clone); + } + + return clone; +} + + CFTypeID SCNetworkReachabilityGetTypeID(void) { @@ -2844,7 +2348,7 @@ SCNetworkReachabilityCopyResolvedAddress(SCNetworkReachabilityRef target, return NULL; } - if (targetPrivate->type != reachabilityTypeName) { + if (!isReachabilityTypeName(targetPrivate->type)) { _SCErrorSet(kSCStatusInvalidArgument); return NULL; } @@ -2869,75 +2373,33 @@ SCNetworkReachabilityCopyResolvedAddress(SCNetworkReachabilityRef target, static void -__SCNetworkReachabilitySetResolvedAddresses(int32_t status, - struct addrinfo *res, - SCNetworkReachabilityRef target) +__SCNetworkReachabilitySetResolvedError(SCNetworkReachabilityRef target, + int32_t status) { - struct addrinfo *resP; SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; MUTEX_ASSERT_HELD(&targetPrivate->lock); + __mark_operation_end(target, + FALSE, // if successful query + dns_query_async, // async + &targetPrivate->dnsQueryStart, // start time + &targetPrivate->dnsQueryEnd); // end time + if (targetPrivate->resolvedAddresses != NULL) { CFRelease(targetPrivate->resolvedAddresses); targetPrivate->resolvedAddresses = NULL; } - if ((status == 0) && (res != NULL)) { - CFMutableArrayRef addresses; - - addresses = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - for (resP = res; resP; resP = resP->ai_next) { - CFIndex n; - CFDataRef newAddress; - - newAddress = CFDataCreate(NULL, (void *)resP->ai_addr, resP->ai_addr->sa_len); - n = CFArrayGetCount(addresses); - if ((n == 0) || - !CFArrayContainsValue(addresses, CFRangeMake(0, n), newAddress)) { - CFArrayAppendValue(addresses, newAddress); - } - CFRelease(newAddress); - } - - /* save the resolved address[es] */ - targetPrivate->resolvedAddresses = addresses; - targetPrivate->resolvedError = NETDB_SUCCESS; - } else { - SCLog(_sc_debug, LOG_INFO, CFSTR("%sgetaddrinfo() failed: %s"), - targetPrivate->log_prefix, - gai_strerror(status)); - - /* save the error associated with the attempt to resolve the name */ - targetPrivate->resolvedAddresses = CFRetain(kCFNull); - targetPrivate->resolvedError = status; - } - targetPrivate->needResolve = FALSE; - - if (res != NULL) freeaddrinfo(res); - - if (targetPrivate->scheduled) { - __SCNetworkReachabilityPerformLocked(target); - } - - return; -} - - -static void -__SCNetworkReachabilityCallbackSetResolvedAddresses(int32_t status, struct addrinfo *res, void *context) -{ - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)context; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; + SCLog(_sc_debug, LOG_INFO, CFSTR("%scould not be resolved: %s"), + targetPrivate->log_prefix, + gai_strerror(status)); - __mark_operation_end(target, - ((status == 0) && (res != NULL)), // if successful query - dns_query_async, // async - &targetPrivate->dnsQueryStart, // start time - &targetPrivate->dnsQueryEnd); // end time + /* save the error associated with the attempt to resolve the name */ + targetPrivate->resolvedAddresses = CFRetain(kCFNull); + targetPrivate->resolvedError = status; + targetPrivate->needResolve = FALSE; - __SCNetworkReachabilitySetResolvedAddresses(status, res, target); return; } @@ -2963,350 +2425,14 @@ rankReachability(SCNetworkReachabilityFlags flags) #pragma mark DNS name resolution -static CFStringRef -replyMPCopyDescription(const void *info) -{ - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)info; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - return CFStringCreateWithFormat(NULL, - NULL, - CFSTR(" {name = %s, target = %p}"), - targetPrivate->name, - target); -} - - -static void -getaddrinfo_async_handleCFReply(CFMachPortRef port, void *msg, CFIndex size, void *info); - - -static Boolean -enqueueAsyncDNSQuery_dispatch(SCNetworkReachabilityRef target) -{ - mach_port_t mp; - dispatch_source_t source; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_ASSERT_HELD(&targetPrivate->lock); - - mp = targetPrivate->dnsMP; - - // mach_port context <-- NULL (no msg received) - mach_port_set_context(mach_task_self(), mp, (mach_vm_address_t)(uintptr_t)NULL); - - // create dispatch source to handle DNS reply - source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, - mp, - 0, - __SCNetworkReachability_concurrent_queue()); - if (source == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkReachability dispatch_source_create() failed")); - return FALSE; - } - - // - // We created the dispatch_source to listen for (and process) the mach IPC - // reply to our async DNS query. Because the source handler runs asychronously - // we need to ensure that we're holding a reference to the target. Here, we take - // a reference and setup the dispatch_source finalizer to drop it. - // - CFRetain(target); - dispatch_set_context(source, (void *)target); - dispatch_set_finalizer_f(source, (dispatch_function_t)CFRelease); - - dispatch_source_set_event_handler(source, ^{ - mach_msg_size_t msg_size = 8192; - const mach_msg_options_t options = MACH_RCV_MSG - | MACH_RCV_LARGE - | MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_CTX) - | MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0); - - while (TRUE) { - kern_return_t kr; - mach_msg_header_t *msg = (mach_msg_header_t *)malloc(msg_size); - - kr = mach_msg(msg, /* msg */ - options, /* options */ - 0, /* send_size */ - msg_size, /* rcv_size */ - mp, /* rcv_name */ - MACH_MSG_TIMEOUT_NONE, /* timeout */ - MACH_PORT_NULL); /* notify */ - if (kr == KERN_SUCCESS) { - // mach_port context <-- msg - mach_port_set_context(mach_task_self(), - mp, - (mach_vm_address_t)(uintptr_t)msg); - } else if (kr == MACH_RCV_TOO_LARGE) { - msg_size *= 2; - free(msg); - continue; - } else { - SCLog(TRUE, LOG_ERR, - CFSTR("SCNetworkReachability async DNS handler, kr=0x%x"), - kr); - free(msg); - } - break; - } - - dispatch_source_cancel(source); - }); - - dispatch_source_set_cancel_handler(source, ^{ -#if !TARGET_OS_IPHONE - mach_vm_address_t context; -#else // !TARGET_OS_IPHONE - mach_port_context_t context; -#endif // !TARGET_OS_IPHONE - kern_return_t kr; - mach_port_t mp; - - // get the [async DNS query] mach port - mp = (mach_port_t)dispatch_source_get_handle(source); - - // check if we have a received message - kr = mach_port_get_context(mach_task_self(), mp, &context); - if (kr == KERN_SUCCESS) { - void *msg; - - msg = (void *)(uintptr_t)context; - if (msg != NULL) { - MUTEX_LOCK(&targetPrivate->lock); - getaddrinfo_async_handle_reply(msg); - targetPrivate->dnsSource = NULL; - targetPrivate->dnsMP = MACH_PORT_NULL; - MUTEX_UNLOCK(&targetPrivate->lock); - free(msg); - } else { - getaddrinfo_async_cancel(mp); - } - } - - dispatch_release(source); - }); - - targetPrivate->dnsSource = source; - dispatch_resume(source); - - return TRUE; -} - - -static Boolean -enqueueAsyncDNSQuery_CF(SCNetworkReachabilityRef target) -{ - CFMachPortContext context = { 0 - , (void *)target - , CFRetain - , CFRelease - , replyMPCopyDescription - }; - CFIndex i; - mach_port_t mp; - CFIndex n; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_ASSERT_HELD(&targetPrivate->lock); - - mp = targetPrivate->dnsMP; - - targetPrivate->dnsPort = _SC_CFMachPortCreateWithPort("SCNetworkReachability", - mp, - getaddrinfo_async_handleCFReply, - &context); - if (targetPrivate->dnsPort == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkReachability CFMachPortCreateWithPort() failed")); - goto fail; - } - - targetPrivate->dnsRLS = CFMachPortCreateRunLoopSource(NULL, targetPrivate->dnsPort, 0); - if (targetPrivate->dnsRLS == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("SCNetworkReachability CFMachPortCreateRunLoopSource() failed")); - goto fail; - } - - n = CFArrayGetCount(targetPrivate->rlList); - for (i = 0; i < n; i += 3) { - CFRunLoopRef rl = (CFRunLoopRef)CFArrayGetValueAtIndex(targetPrivate->rlList, i+1); - CFStringRef rlMode = (CFStringRef) CFArrayGetValueAtIndex(targetPrivate->rlList, i+2); - - CFRunLoopAddSource(rl, targetPrivate->dnsRLS, rlMode); - } - - return TRUE; - - fail : - - if (targetPrivate->dnsRLS != NULL) { - CFRunLoopSourceInvalidate(targetPrivate->dnsRLS); - CFRelease(targetPrivate->dnsRLS); - targetPrivate->dnsRLS = NULL; - } - if (targetPrivate->dnsPort != NULL) { - CFMachPortInvalidate(targetPrivate->dnsPort); - CFRelease(targetPrivate->dnsPort); - targetPrivate->dnsPort = NULL; - } - - return FALSE; -} - - -static Boolean -requeueAsyncDNSQuery(SCNetworkReachabilityRef target, mach_port_t mp) -{ - Boolean ok = FALSE; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_ASSERT_HELD(&targetPrivate->lock); - - targetPrivate->dnsMP = mp; - - if (targetPrivate->dispatchQueue != NULL) { - ok = enqueueAsyncDNSQuery_dispatch(target); - } else if (targetPrivate->rls != NULL) { - ok = enqueueAsyncDNSQuery_CF(target); - } - - if (!ok) { - targetPrivate->dnsMP = MACH_PORT_NULL; - _SCErrorSet(kSCStatusFailed); - return FALSE; - } - - return TRUE; -} - - -static Boolean -enqueueAsyncDNSQuery(SCNetworkReachabilityRef target) -{ - int error = 0; - mach_port_t mp = MACH_PORT_NULL; - Boolean ok; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - // track the DNS resolution time - __mark_operation_start(&targetPrivate->dnsQueryStart, &targetPrivate->dnsQueryEnd); - -#ifdef HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - if (targetPrivate->if_index == 0) { -#endif // HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - error = getaddrinfo_async_start(&mp, - targetPrivate->name, - NULL, - &HINTS_DEFAULT, - __SCNetworkReachabilityCallbackSetResolvedAddresses, - (void *)target); -#ifdef HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - } else { - mp = _getaddrinfo_interface_async_call(targetPrivate->name, - NULL, - &HINTS_DEFAULT, - targetPrivate->if_name, - __SCNetworkReachabilityCallbackSetResolvedAddresses, - (void *)target); - if (mp == MACH_PORT_NULL) { - error = EAI_SYSTEM; - } - } -#endif // HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - if (error != 0) { - /* save the error associated with the attempt to resolve the name */ - __SCNetworkReachabilityCallbackSetResolvedAddresses(error, NULL, (void *)target); - return FALSE; - } - - ok = requeueAsyncDNSQuery(target, mp); - return ok; -} - - -static void -dequeueAsyncDNSQuery(SCNetworkReachabilityRef target, Boolean cancel) -{ - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_ASSERT_HELD(&targetPrivate->lock); - - if (targetPrivate->dnsPort != NULL) { - CFMachPortInvalidate(targetPrivate->dnsPort); - CFRelease(targetPrivate->dnsPort); - targetPrivate->dnsPort = NULL; - } - - if (targetPrivate->dnsRLS != NULL) { - CFRelease(targetPrivate->dnsRLS); - targetPrivate->dnsRLS = NULL; - } - - if (targetPrivate->dnsSource != NULL) { - dispatch_source_cancel(targetPrivate->dnsSource); - targetPrivate->dnsSource = NULL; - cancel = FALSE; // the cancellation handler does the work - } - - if (targetPrivate->dnsMP != MACH_PORT_NULL) { - if (cancel) { - getaddrinfo_async_cancel(targetPrivate->dnsMP); - } - targetPrivate->dnsMP = MACH_PORT_NULL; - } - - return; -} - - static void -getaddrinfo_async_handleCFReply(CFMachPortRef port, void *msg, CFIndex size, void *info) -{ - mach_port_t mp = CFMachPortGetPort(port); - int32_t status; - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)info; - SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - - MUTEX_LOCK(&targetPrivate->lock); - - if (mp != targetPrivate->dnsMP) { - // we've received a callback on the async DNS port but since the - // associated CFMachPort doesn't match than the request must have - // already been cancelled. - SCLog(TRUE, LOG_ERR, CFSTR("processAsyncDNSReply(): mp != targetPrivate->dnsMP")); - MUTEX_UNLOCK(&targetPrivate->lock); - return; - } - - dequeueAsyncDNSQuery(target, FALSE); - status = getaddrinfo_async_handle_reply(msg); - if ((status == 0) && - (targetPrivate->resolvedAddresses == NULL) && (targetPrivate->resolvedError == NETDB_SUCCESS)) { - Boolean ok; - - // if the request is not complete and needs to be re-queued - ok = requeueAsyncDNSQuery(target, mp); - if (!ok) { - SCLog(TRUE, LOG_ERR, CFSTR("processAsyncDNSReply requeueAsyncDNSQuery() failed")); - } - } - - MUTEX_UNLOCK(&targetPrivate->lock); - - return; -} - - -static Boolean -check_resolver_reachability(ReachabilityStoreInfoRef store_info, - dns_resolver_t *resolver, - SCNetworkReachabilityFlags *flags, - Boolean *haveDNS, - uint32_t *resolver_if_index, - const char *log_prefix) +update_resolver_reachability(ReachabilityStoreInfoRef store_info, + dns_resolver_t *resolver, + SCNetworkReachabilityFlags *flags, + Boolean *haveDNS, + uint32_t *resolver_if_index, + const char *log_prefix) { - Boolean ok = TRUE; - if (resolver_if_index) *resolver_if_index = 0; if (resolver->n_nameserver > 0) { @@ -3320,7 +2446,7 @@ check_resolver_reachability(ReachabilityStoreInfoRef store_info, *haveDNS = FALSE; } - return ok; + return; } @@ -3355,7 +2481,7 @@ check_matching_resolvers(ReachabilityStoreInfoRef store_info, if (resolver_if_index != NULL) *resolver_if_index = 0; while (!matched && (name != NULL)) { - int len; + size_t len; /* * check if the provided name (or sub-component) @@ -3374,19 +2500,18 @@ check_matching_resolvers(ReachabilityStoreInfoRef store_info, domain = resolver->domain; if (domain != NULL && (len == strlen(domain))) { if (strcasecmp(name, domain) == 0) { - Boolean ok; - /* * if name matches domain */ matched = TRUE; - ok = check_resolver_reachability(store_info, resolver, flags, haveDNS, - resolver_if_index, log_prefix); - if (!ok) { - /* not today */ - return FALSE; - } + update_resolver_reachability(store_info, + resolver, + flags, + haveDNS, + resolver_if_index, + log_prefix); if (dns_config_index != NULL) *dns_config_index = i; + break; } } } @@ -3448,25 +2573,31 @@ get_default_resolver(dns_config_t *dns_config, unsigned int if_index) static dns_configuration_t * dns_configuration_retain() { + dns_configuration_t *config; + pthread_mutex_lock(&dns_lock); - if ((dns_configuration != NULL) && dns_token_valid) { - int check = 0; - uint32_t status; + if (dns_configuration != NULL) { + Boolean refresh = TRUE; - /* - * check if the global [DNS] configuration snapshot needs - * to be updated - */ - status = notify_check(dns_token, &check); - if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_check() failed, status=%lu"), status); - } + if (dns_token_valid) { + int check = 0; + uint32_t status; - if ((status != NOTIFY_STATUS_OK) || (check != 0)) { /* - * if the snapshot needs to be refreshed + * check if the global [DNS] configuration snapshot needs + * to be updated */ + status = notify_check(dns_token, &check); + if (status != NOTIFY_STATUS_OK) { + SCLog(TRUE, LOG_INFO, CFSTR("notify_check() failed, status=%u"), status); + } else if (check == 0) { + // if the snapshot does not need to be refreshed + refresh = FALSE; + } + } + + if (refresh) { if (dns_configuration->refs == 0) { dns_configuration_free(dns_configuration->config); CFAllocatorDeallocate(NULL, dns_configuration); @@ -3490,8 +2621,9 @@ dns_configuration_retain() dns_configuration->refs++; } + config = dns_configuration; pthread_mutex_unlock(&dns_lock); - return dns_configuration; + return config; } @@ -3502,7 +2634,11 @@ dns_configuration_release(dns_configuration_t *config) config->refs--; if (config->refs == 0) { - if ((dns_configuration != config)) { + if (!dns_token_valid && (config == dns_configuration)) { + dns_configuration = NULL; + } + + if (config != dns_configuration) { dns_configuration_free(config->config); CFAllocatorDeallocate(NULL, config); } @@ -3533,13 +2669,13 @@ dns_configuration_watch() if (status == NOTIFY_STATUS_OK) { dns_token_valid = TRUE; } else { - SCLog(TRUE, LOG_INFO, CFSTR("notify_register_check() failed, status=%lu"), status); + SCLog(TRUE, LOG_INFO, CFSTR("notify_register_check() failed, status=%u"), status); goto done; } status = notify_check(dns_token, &dns_check); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_check() failed, status=%lu"), status); + SCLog(TRUE, LOG_INFO, CFSTR("notify_check() failed, status=%u"), status); (void)notify_cancel(dns_token); dns_token_valid = FALSE; goto done; @@ -3573,16 +2709,16 @@ dns_configuration_unwatch() } -static Boolean -_SC_R_checkResolverReachability(ReachabilityStoreInfoRef store_info, - SCNetworkReachabilityFlags *flags, - Boolean *haveDNS, - const char *nodename, - unsigned int if_index, - uint32_t *resolver_if_index, - int *dns_config_index, - const char *log_prefix - ) +static void +_SC_R_updateResolverReachability(ReachabilityStoreInfoRef store_info, + SCNetworkReachabilityFlags *flags, + Boolean *haveDNS, + const char *nodename, + unsigned int if_index, + uint32_t *resolver_if_index, + int *dns_config_index, + const char *log_prefix + ) { dns_resolver_t *default_resolver; dns_configuration_t *dns; @@ -3590,9 +2726,8 @@ _SC_R_checkResolverReachability(ReachabilityStoreInfoRef store_info, char *fqdn = (char *)nodename; int i; Boolean isFQDN = FALSE; - uint32_t len; - int ndots = 1; - Boolean ok = TRUE; + size_t len; + const int ndots = 1; Boolean useDefault = FALSE; if (resolver_if_index) *resolver_if_index = 0; @@ -3613,7 +2748,7 @@ _SC_R_checkResolverReachability(ReachabilityStoreInfoRef store_info, if (len == 0) { // if no nodename, return not reachable *flags = 0; - return ok; + return; } dns = dns_configuration_retain(); @@ -3637,6 +2772,7 @@ _SC_R_checkResolverReachability(ReachabilityStoreInfoRef store_info, while ((len > 0) && (fqdn[len-1] == '.')) { if (fqdn == nodename) { fqdn = strdup(nodename); + assert(fqdn != nodename); } fqdn[--len] = '\0'; } @@ -3658,27 +2794,6 @@ _SC_R_checkResolverReachability(ReachabilityStoreInfoRef store_info, char *cp; int dots; -#define NDOTS_OPT "ndots=" -#define NDOTS_OPT_LEN (sizeof("ndots=") - 1) - - if (default_resolver->options != NULL) { - cp = strstr(default_resolver->options, NDOTS_OPT); - if ((cp != NULL) && - ((cp == default_resolver->options) || isspace(cp[-1])) && - ((cp[NDOTS_OPT_LEN] != '\0') && isdigit(cp[NDOTS_OPT_LEN]))) { - char *end; - long val; - - cp += NDOTS_OPT_LEN; - errno = 0; - val = strtol(cp, &end, 10); - if ((*cp != '\0') && (cp != end) && (errno == 0) && - ((*end == '\0') || isspace(*end))) { - ndots = val; - } - } - } - dots = 0; for (cp = fqdn; *cp != '\0'; cp++) { if (*cp == '.') dots++; @@ -3767,23 +2882,25 @@ _SC_R_checkResolverReachability(ReachabilityStoreInfoRef store_info, } if (!found) { - /* - * check the reachability of the default resolver - */ - ok = check_resolver_reachability(store_info, default_resolver, flags, haveDNS, - resolver_if_index, log_prefix); - if (ok && dns_config_index != NULL) *dns_config_index = 0; + // update the reachability of the default resolver + update_resolver_reachability(store_info, + default_resolver, + flags, + haveDNS, + resolver_if_index, + log_prefix); + if (dns_config_index != NULL) *dns_config_index = 0; } - if (fqdn != nodename) free(fqdn); - done : + if (fqdn != nodename) free(fqdn); + if (dns != NULL) { dns_configuration_release(dns); } - return ok; + return; } @@ -3804,15 +2921,22 @@ __SC_checkResolverReachabilityInternal(SCDynamicStoreRef *storeP, goto done; } - ok = _SC_R_checkResolverReachability(&store_info, flags, haveDNS, nodename, - 0, resolver_if_index, dns_config_index, ""); + _SC_R_updateResolverReachability(&store_info, + flags, + haveDNS, + nodename, + 0, + resolver_if_index, + dns_config_index, + ""); - done : + done : ReachabilityStoreInfo_free(&store_info); return ok; } + /* * _SC_checkResolverReachabilityByAddress() * @@ -3825,7 +2949,6 @@ _SC_checkResolverReachabilityByAddress(SCDynamicStoreRef *storeP, Boolean *haveDNS, struct sockaddr *sa) { - int i; Boolean ok; char ptr_name[128]; ReachabilityStoreInfo store_info; @@ -3844,66 +2967,12 @@ _SC_checkResolverReachabilityByAddress(SCDynamicStoreRef *storeP, * take the address, convert it into the inverse query name, * and find out which servers should be consulted. */ - - switch (sa->sa_family) { - case AF_INET : { - union { - in_addr_t s_addr; - unsigned char b[4]; - } rev; - /* ALIGN: assuming sa is aligned, then cast ok. */ - struct sockaddr_in *sin = (struct sockaddr_in *)(void *)sa; - - /* - * build "PTR" query name - * NNN.NNN.NNN.NNN.in-addr.arpa. - */ - rev.s_addr = sin->sin_addr.s_addr; - (void) snprintf(ptr_name, sizeof(ptr_name), "%u.%u.%u.%u.in-addr.arpa.", - rev.b[3], - rev.b[2], - rev.b[1], - rev.b[0]); - - break; - } - - case AF_INET6 : { - int s = 0; - /* ALIGN: assume sa is aligned, cast ok. */ - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)(void *)sa; - int x = sizeof(ptr_name); - int n; - - /* - * build IPv6 "nibble" PTR query name (RFC 1886, RFC 3152) - * N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.ip6.arpa. - */ - for (i = sizeof(sin6->sin6_addr) - 1; i >= 0; i--) { - n = snprintf(&ptr_name[s], x, "%x.%x.", - ( sin6->sin6_addr.s6_addr[i] & 0xf), - ((sin6->sin6_addr.s6_addr[i] >> 4) & 0xf)); - if ((n == -1) || (n >= x)) { - goto done; - } - - s += n; - x -= n; - } - - n = snprintf(&ptr_name[s], x, "ip6.arpa."); - if ((n == -1) || (n >= x)) { - goto done; - } - - break; - } - - default : - goto done; + ok = addr_to_PTR_name(sa, ptr_name, sizeof(ptr_name)); + if (!ok) { + goto done; } - ok = _SC_R_checkResolverReachability(&store_info, flags, haveDNS, ptr_name, 0, NULL, NULL, ""); + _SC_R_updateResolverReachability(&store_info, flags, haveDNS, ptr_name, 0, NULL, NULL, ""); done : @@ -3916,16 +2985,14 @@ _SC_checkResolverReachabilityByAddress(SCDynamicStoreRef *storeP, #pragma mark DNSServiceGetAddrInfo support -#ifdef USE_DNSSERVICEGETADDRINFO - /* * DNS query handling * * Notes : * - * 1. We have a "contract" with mDNSResponder that for EVERY network + * 1. We have a "contract" with discoveryd that for EVERY network * or DNS configuration change that should warrant our [re-]starting - * a query, mDNSResponder will acknowledge the latest DNS configuration. + * a query, discoveryd will acknowledge the latest DNS configuration. * * 2. IPMonitor also posts a notification AFTER every network or DNS * configuration change. @@ -3935,11 +3002,9 @@ _SC_checkResolverReachabilityByAddress(SCDynamicStoreRef *storeP, */ -// Note: protected by _hn_changes_queue() -static SCDynamicStoreCallBack dns_callback = NULL; +// Note: protected by _hn_target_queue() static int dns_refresh_token; static Boolean dns_refresh_token_valid = FALSE; -static SCDynamicStoreRef dns_store = NULL; /* @@ -3948,15 +3013,22 @@ static SCDynamicStoreRef dns_store = NULL; * Called to notify/update all SCNetworkReachability by-name targets of * a network/DNS change. The change should [re-]start a DNS query to * resolve the name. - * - caller must be running on the _hn_changes_queue() + * - should be exec'd on the _hn_target_queue() */ static void dns_refresh_handler() { - CFArrayRef changes; - CFStringRef key; + CFArrayRef changes; + CFStringRef key; + __block SCDynamicStoreRef store = NULL; + + dispatch_sync(_hn_target_queue(), ^{ + if (dns_refresh_token_valid && (hn_store != NULL)) { + store = CFRetain(hn_store); + } + }); - if (!dns_refresh_token_valid || (dns_callback == NULL)) { + if (store == NULL) { return; } @@ -3964,10 +3036,11 @@ dns_refresh_handler() kSCDynamicStoreDomainState, kSCEntNetDNS); changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); - (*dns_callback)(dns_store, changes, NULL); + __SCNetworkReachabilityHandleChanges(store, changes, NULL); CFRelease(changes); CFRelease(key); + CFRelease(store); return; } @@ -3976,16 +3049,13 @@ dns_refresh_handler() * dns_refresh_enable * * Called to monitor for network/DNS changes that should restart a DNS query. - * - caller must be running on the _hn_changes_queue() + * - caller must be running on the _hn_target_queue() */ static Boolean -dns_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCallBack callback) +dns_refresh_enable(dispatch_queue_t q) { uint32_t status; - dns_callback = callback; - dns_store = CFRetain(store); - status = notify_register_dispatch(_SC_NOTIFY_NETWORK_CHANGE, &dns_refresh_token, q, @@ -3993,7 +3063,7 @@ dns_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCa dns_refresh_handler(); }); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed, status=%lu"), status); + SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed, status=%u"), status); return FALSE; } @@ -4007,21 +3077,16 @@ dns_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCa * dns_refresh_disable * * Called to stop monitoring for network/DNS changes - * - caller must be running on the _hn_changes_queue() + * - caller must be running on the _hn_target_queue() */ static void dns_refresh_disable() { (void)notify_cancel(dns_refresh_token); dns_refresh_token_valid = FALSE; - CFRelease(dns_store); - dns_store = NULL; - dns_callback = NULL; return; } -#endif // USE_DNSSERVICEGETADDRINFO - #pragma mark - #pragma mark [m]DNS Queries @@ -4038,15 +3103,13 @@ _dns_queue() static dispatch_queue_t q; dispatch_once(&once, ^{ - q = dispatch_queue_create("SCNetworkReachabilty.DNSService", NULL); + q = dispatch_queue_create("SCNetworkReachability.DNSService", NULL); }); return q; } -#ifdef USE_DNSSERVICEGETADDRINFO - /* * _dns_complete */ @@ -4056,6 +3119,7 @@ _dns_complete(SCNetworkReachabilityRef target) SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; if ((targetPrivate->dnsHaveV4 && targetPrivate->dnsHaveV6) || + targetPrivate->dnsHavePTR || targetPrivate->dnsHaveError || targetPrivate->dnsHaveTimeout) { return TRUE; @@ -4101,7 +3165,7 @@ _dns_notify(const void *value, void *context) targetPrivate->needResolve = FALSE; if (targetPrivate->scheduled) { - __SCNetworkReachabilityPerformLocked(target); + __SCNetworkReachabilityUpdate(target); } } @@ -4110,31 +3174,42 @@ _dns_notify(const void *value, void *context) } +typedef enum { + MARK_NONE, + MARK_ERROR, + MARK_TIMEOUT, + MARK_HAVE_V4, + MARK_HAVE_V6, + MARK_HAVE_PTR, +} _dns_mark_t; + + /* * _dns_mark */ static __inline__ void -_dns_mark(SCNetworkReachabilityRef target, Boolean valid, const struct sockaddr *sa) +_dns_mark(SCNetworkReachabilityRef target, _dns_mark_t mark) { SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - if (!valid) { - targetPrivate->dnsHaveError = TRUE; - return; - } - - if (sa == NULL) { - targetPrivate->dnsHaveTimeout = TRUE; - return; - } - - switch (sa->sa_family) { - case AF_INET : + switch (mark) { + case MARK_NONE : + break; + case MARK_ERROR : + targetPrivate->dnsHaveError = TRUE; + break; + case MARK_TIMEOUT : + targetPrivate->dnsHaveTimeout = TRUE; + break; + case MARK_HAVE_V4 : targetPrivate->dnsHaveV4 = TRUE; break; - case AF_INET6 : + case MARK_HAVE_V6 : targetPrivate->dnsHaveV6 = TRUE; break; + case MARK_HAVE_PTR : + targetPrivate->dnsHavePTR = TRUE; + break; } return; @@ -4150,33 +3225,31 @@ _dns_mark(SCNetworkReachabilityRef target, Boolean valid, const struct sockaddr static void _dns_callback(DNSServiceRef sdRef, DNSServiceFlags flags, - uint32_t interfaceIndex, DNSServiceErrorType errorCode, - const char *hostname, - const struct sockaddr *address, - uint32_t ttl, + _dns_mark_t dnsMark, + CFTypeRef dnsAddress, // CFData(struct sockaddr) or CFString(ptr_name) void *context) { + int failures = 0; + Boolean restart = FALSE; SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)context; SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; MUTEX_LOCK(&targetPrivate->lock); if (sdRef != targetPrivate->dnsTarget) { - // if this DNSServiceRef is no longer associated with - // this target + // if this DNSServiceRef is no longer associated with the target MUTEX_UNLOCK(&targetPrivate->lock); return; } switch (errorCode) { case kDNSServiceErr_NoError : - if (address != NULL) { + if (dnsAddress != NULL) { CFMutableArrayRef addresses; - CFDataRef dnsAddress; CFIndex i; - _dns_mark(target, TRUE, address); + _dns_mark(target, dnsMark); if (targetPrivate->dnsAddresses != NULL) { if (isA_CFArray(targetPrivate->dnsAddresses)) { @@ -4191,7 +3264,6 @@ _dns_callback(DNSServiceRef sdRef, addresses = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } - dnsAddress = CFDataCreate(NULL, (void *)address, address->sa_len); i = CFArrayGetFirstIndexOfValue(addresses, CFRangeMake(0, CFArrayGetCount(addresses)), dnsAddress); @@ -4208,7 +3280,6 @@ _dns_callback(DNSServiceRef sdRef, } #endif // HANDLE_RMV_REQUESTS } - CFRelease(dnsAddress); if (CFArrayGetCount(addresses) > 0) { targetPrivate->dnsAddresses = addresses; @@ -4223,7 +3294,7 @@ _dns_callback(DNSServiceRef sdRef, } break; case kDNSServiceErr_BadParam : - _dns_mark(target, FALSE, NULL); + _dns_mark(target, MARK_ERROR); if (targetPrivate->dnsAddresses != NULL) { CFRelease(targetPrivate->dnsAddresses); @@ -4232,44 +3303,74 @@ _dns_callback(DNSServiceRef sdRef, targetPrivate->dnsError = EAI_NONAME; break; case kDNSServiceErr_NoSuchRecord : - if (address != NULL) { - // no IPv4/IPv6 address for name (NXDOMAIN) - - _dns_mark(target, TRUE, address); + _dns_mark(target, dnsMark); - if (targetPrivate->dnsAddresses == NULL) { - targetPrivate->dnsAddresses = CFRetain(kCFNull); - targetPrivate->dnsError = EAI_NONAME; - } + if (targetPrivate->dnsAddresses == NULL) { + targetPrivate->dnsAddresses = CFRetain(kCFNull); + targetPrivate->dnsError = EAI_NONAME; } break; case kDNSServiceErr_Timeout : - _dns_mark(target, TRUE, NULL); + _dns_mark(target, MARK_TIMEOUT); if (targetPrivate->dnsAddresses == NULL) { targetPrivate->dnsAddresses = CFRetain(kCFNull); targetPrivate->dnsError = EAI_NONAME; } break; - case kDNSServiceErr_ServiceNotRunning : - // mDNSResponder crashed, restart query - DNSServiceRefDeallocate(dnsMain); - dnsMain = NULL; - dnsCount = 0; default : - _dns_mark(target, FALSE, NULL); - SCLog(TRUE, LOG_ERR, - CFSTR("%sSCNetworkReachability _dns_callback w/error=%d"), + CFSTR("%sSCNetworkReachability _dns_callback w/error=%d (n=%d)"), targetPrivate->log_prefix, - errorCode); + errorCode, + targetPrivate->dnsFailures + 1); + // fall through + case kDNSServiceErr_ServiceNotRunning : + _dns_mark(target, MARK_ERROR); + + // bump per-target failure count + failures = ++targetPrivate->dnsFailures; + + // Check to see if we've seen too many failures for this target + if (failures > 2) { + // if so, there's little point in retrying over + // and over again so let's just return an error + // and move on. + if (targetPrivate->dnsAddresses != NULL) { + CFRelease(targetPrivate->dnsAddresses); + } + targetPrivate->dnsAddresses = CFRetain(kCFNull); + targetPrivate->dnsError = EAI_NONAME; + } else if (targetPrivate->dnsGeneration == dnsGeneration) { + // if not, then "discoveryd" crashed or some + // other/unexpected error occurred. In this + // case, we'll try again with a clean slate and + // restart all requests. + if (dnsMain != NULL) { + DNSServiceRefDeallocate(dnsMain); + dnsMain = NULL; + dnsCount = 0; + dnsGeneration++; + restart = TRUE; + } + } break; } + // update DNS failure count (and [re-]set to zero if we're OK) + targetPrivate->dnsFailures = failures; + MUTEX_UNLOCK(&targetPrivate->lock); - if (errorCode == kDNSServiceErr_ServiceNotRunning) { - dispatch_async(_hn_changes_queue(), ^{ + if (restart) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("%sreconnecting SCNetworkReachability w/\"discoveryd\" (%d)"), + targetPrivate->log_prefix, + dnsGeneration); + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 500 * NSEC_PER_MSEC), + _hn_changes_queue(), + ^{ dns_refresh_handler(); }); @@ -4282,6 +3383,15 @@ _dns_callback(DNSServiceRef sdRef, return; } + if (targetPrivate->dnsHaveTimeout) { + targetPrivate->dnsNoAddressesSinceLastTimeout = TRUE; + } else if (targetPrivate->dnsNoAddressesSinceLastTimeout && + isA_CFArray(targetPrivate->dnsAddresses) && + CFArrayGetCount(targetPrivate->dnsAddresses) > 0) + { + targetPrivate->dnsNoAddressesSinceLastTimeout = FALSE; + } + // the "more coming" flag applies to DNSService callouts for any/all // hosts that are being watched so we need to keep track of the targets // we have updated. When we [finally] have the last callout then we @@ -4302,6 +3412,139 @@ _dns_callback(DNSServiceRef sdRef, } +/* + * _dns_getaddrinfo_callback + * + * Called to process [m]DNS query updates + * - caller must be running on the _dns_queue() + */ +static void +_dns_getaddrinfo_callback(DNSServiceRef sdRef, + DNSServiceFlags flags, + uint32_t interfaceIndex, + DNSServiceErrorType errorCode, + const char *hostname, + const struct sockaddr *address, + uint32_t ttl, + void *context) +{ + CFDataRef dnsAddress = NULL; + _dns_mark_t dnsMark = MARK_NONE; + + if (address != NULL) { + switch (errorCode) { + case kDNSServiceErr_NoError : + dnsAddress = CFDataCreate(NULL, (void *)address, address->sa_len); + // ... and fall through + case kDNSServiceErr_NoSuchRecord : + switch (address->sa_family) { + case AF_INET : + dnsMark = MARK_HAVE_V4; + break; + case AF_INET6 : + dnsMark = MARK_HAVE_V6; + break; + } + break; + default : + break; + } + } + + _dns_callback(sdRef, flags, errorCode, dnsMark, dnsAddress, context); + + if (dnsAddress != NULL) { + CFRelease(dnsAddress); + } + + return; +} + + +static CFStringRef +_dns_copy_domain_name(const uint8_t *rdata, uint16_t rdlen) +{ + CFMutableStringRef domain; + const uint8_t *label; + uint8_t label_len; + + domain = CFStringCreateMutable(NULL, 0); + + label = rdata; + label_len = *(label++); + while (label_len != 0) { + while (label_len-- > 0) { + uint8_t byte = *label++; + + if ((byte == '.') || (byte == '\\')) { + // if escape needed + CFStringAppendFormat(domain, NULL, CFSTR("\\%c"), byte); + } else if (byte <= ' ') { + CFStringAppendFormat(domain, NULL, CFSTR("\\%c%c%c"), + '0' + (byte / 100), + '0' + ((byte / 10) % 10), + '0' + (byte % 10)); + } else { + CFStringAppendFormat(domain, NULL, CFSTR("%c"), byte); + } + } + + label_len = *(label++); + if (label_len != 0) { + CFStringAppendFormat(domain, NULL, CFSTR(".")); + } + } + + return domain; +} + + +static void +_dns_queryrecord_callback(DNSServiceRef sdRef, + DNSServiceFlags flags, + uint32_t interfaceIndex, + DNSServiceErrorType errorCode, + const char *fullname, + uint16_t rrtype, + uint16_t rrclass, + uint16_t rdlen, + const void *rdata, + uint32_t ttl, + void *context) +{ + _dns_mark_t dnsMark = MARK_NONE; + CFStringRef dnsPTRName = NULL; + SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)context; + SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; + + // for now, we only support using DNSServiceQueryRecord for PTR queries + assert(targetPrivate->type == reachabilityTypePTR); + + if (rdata != NULL) { + switch (errorCode) { + case kDNSServiceErr_NoError : + if (rrtype == kDNSServiceType_PTR) { + dnsPTRName = _dns_copy_domain_name(rdata, rdlen); + } + // ... and fall through + case kDNSServiceErr_NoSuchRecord : + dnsMark = MARK_HAVE_PTR; + break; + default : + break; + } + } + + _dns_callback(sdRef, flags, errorCode, dnsMark, dnsPTRName, context); + + if (dnsPTRName != NULL) { + CFRelease(dnsPTRName); + } + + return; +} + + static Boolean enqueueDNSQuery(SCNetworkReachabilityRef target) { @@ -4309,7 +3552,7 @@ enqueueDNSQuery(SCNetworkReachabilityRef target) MUTEX_ASSERT_HELD(&targetPrivate->lock); - // clear DNS flags, mark the [m]DNS query active + // clear DNS flags, mark the query active targetPrivate->dnsFlags = 0; targetPrivate->dnsActive = TRUE; @@ -4318,7 +3561,8 @@ enqueueDNSQuery(SCNetworkReachabilityRef target) CFRetain(target); dispatch_async(_dns_queue(), ^{ - DNSServiceErrorType err = kDNSServiceErr_NoError; + DNSServiceErrorType err; + const char *fcn = "???"; DNSServiceRef sdRef = NULL; if (targetPrivate->dnsTarget != NULL) { @@ -4327,14 +3571,13 @@ enqueueDNSQuery(SCNetworkReachabilityRef target) return; } - // if needed, start interacting with mDNSResponder - // Note: we must not hold a [target] lock while interacting - + // if needed, start interacting with "discoveryd" if (dnsMain == NULL) { err = DNSServiceCreateConnection(&dnsMain); if (err != kDNSServiceErr_NoError) { SCLog(TRUE, LOG_ERR, - CFSTR("DNSServiceCreateConnection(&dnsMain) failed, error = %d"), + CFSTR("%sDNSServiceCreateConnection(&dnsMain) failed, error = %d"), + targetPrivate->log_prefix, err); goto done; } @@ -4342,90 +3585,107 @@ enqueueDNSQuery(SCNetworkReachabilityRef target) err = DNSServiceSetDispatchQueue(dnsMain, _dns_queue()); if (err != kDNSServiceErr_NoError) { SCLog(TRUE, LOG_ERR, - CFSTR("DNSServiceSetDispatchQueue() failed, error = %d"), + CFSTR("%sDNSServiceSetDispatchQueue() failed, error = %d"), + targetPrivate->log_prefix, err); DNSServiceRefDeallocate(dnsMain); dnsMain = NULL; + dnsGeneration++; goto done; } } - // start an [m]DNS query for this target - + // start a query for this target sdRef = dnsMain; - err = DNSServiceGetAddrInfo(&sdRef, // sdRef - kDNSServiceFlagsReturnIntermediates // flags - | kDNSServiceFlagsShareConnection - | kDNSServiceFlagsTimeout, - targetPrivate->if_index, // interfaceIndex - 0, // protocol - targetPrivate->name, // hostname - _dns_callback, // callback - (void *)target); // context - if (err == kDNSServiceErr_NoError) { - dnsCount++; - } else { - sdRef = NULL; - if ((dnsCount == 0) || (err == kDNSServiceErr_ServiceNotRunning)) { - // if this was the first request or the service is dead - DNSServiceRefDeallocate(dnsMain); - dnsMain = NULL; - dnsCount = 0; - } + + switch (targetPrivate->type) { + case reachabilityTypeName : + fcn = "DNSServiceGetAddrInfo"; + err = DNSServiceGetAddrInfo(&sdRef, // sdRef + kDNSServiceFlagsReturnIntermediates // flags + | kDNSServiceFlagsShareConnection + | kDNSServiceFlagsSuppressUnusable + | kDNSServiceFlagsTimeout, + targetPrivate->if_index, // interfaceIndex + 0, // protocol + targetPrivate->name, // hostname + _dns_getaddrinfo_callback, // callback + (void *)target); // context + break; + case reachabilityTypePTR : + fcn = "DNSServiceQueryRecord"; + err = DNSServiceQueryRecord(&sdRef, // sdRef + kDNSServiceFlagsReturnIntermediates // flags + | kDNSServiceFlagsShareConnection + | kDNSServiceFlagsSuppressUnusable + | kDNSServiceFlagsTimeout, + targetPrivate->if_index, // interfaceIndex + targetPrivate->name, // fullname + kDNSServiceType_PTR, // rrtype + kDNSServiceClass_IN, // rrclass + _dns_queryrecord_callback, // callback + (void *)target); // context + break; + default : + err = kDNSServiceErr_Unknown; + break; } switch (err) { case kDNSServiceErr_NoError : + dnsCount++; break; - case kDNSServiceErr_BadParam : - CFRetain(target); - dispatch_async(_dns_queue(), ^{ - _dns_callback(NULL, // sdRef - 0, // flags - 0, // interfaceIndex - kDNSServiceErr_BadParam, // errorCode - NULL, // hostname - NULL, // address - 0, // ttl - (void *)target); // context - CFRelease(target); - }); - break; + default : SCLog(TRUE, LOG_ERR, - CFSTR("DNSServiceGetAddrInfo() failed, error = %d"), - err); + CFSTR("%s%s() failed, error = %d (%d)"), + targetPrivate->log_prefix, + fcn, + err, + dnsCount); + // fall through + + case kDNSServiceErr_BadParam : + if (dnsCount == 0) { + // if this was the first request + DNSServiceRefDeallocate(dnsMain); + dnsMain = NULL; + dnsGeneration++; + } + sdRef = NULL; break; } done : MUTEX_LOCK(&targetPrivate->lock); + if (err == kDNSServiceErr_NoError) { - // query active, save DNSServiceRef, retain target reference - targetPrivate->dnsMain = dnsMain; + targetPrivate->dnsGeneration = dnsGeneration; targetPrivate->dnsTarget = sdRef; - MUTEX_UNLOCK(&targetPrivate->lock); } else { - // query no longer active, release target reference targetPrivate->dnsActive = FALSE; - MUTEX_UNLOCK(&targetPrivate->lock); - CFRelease(target); - if (err == kDNSServiceErr_ServiceNotRunning) { - dispatch_async(_hn_changes_queue(), ^{ - dns_refresh_handler(); - }); - } + + // queue up the returned error + dispatch_async(_dns_queue(), ^{ + _dns_callback(NULL, // sdRef + 0, // flags + err, // errorCode + MARK_ERROR, // dnsMark + NULL, // dnsAddress + (void *)target); // context + CFRelease(target); + }); } + MUTEX_UNLOCK(&targetPrivate->lock); + return; }); return TRUE; } -#endif // USE_DNSSERVICEGETADDRINFO - static void dequeueDNSQuery(SCNetworkReachabilityRef target) @@ -4439,32 +3699,148 @@ dequeueDNSQuery(SCNetworkReachabilityRef target) sdRef = targetPrivate->dnsTarget; targetPrivate->dnsTarget = NULL; - // mark the [m]DNS query NOT active - targetPrivate->dnsActive = FALSE; + // mark the query NOT active + targetPrivate->dnsActive = FALSE; + + // don't do anything if the sdRef is not valid + if (sdRef != NULL) { + int generation; + + generation = targetPrivate->dnsGeneration; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3LL * NSEC_PER_SEC), + _dns_queue(), + ^{ + if (generation == dnsGeneration) { + // if we're pointing to the same DNSService + // generation as the main/active session + // deallocate per-target query + DNSServiceRefDeallocate(sdRef); + dnsCount--; + if (dnsCount == 0) { + // if no more queries active + DNSServiceRefDeallocate(dnsMain); + dnsMain = NULL; + dnsGeneration++; + } + } + + CFRelease(target); + }); + } + + if (targetPrivate->dnsAddresses != NULL) { + CFRelease(targetPrivate->dnsAddresses); + targetPrivate->dnsAddresses = NULL; + } + targetPrivate->dnsError = NETDB_SUCCESS; + + return; +} + + +#pragma mark - +#pragma mark Synchronous DNS query support + + +#define SYNC_DNS_QUERY_TIMEOUT_NSEC 35 * NSEC_PER_SEC // 35s + + +static void +sync_DNS_query_callback(SCNetworkReachabilityRef clone, + SCNetworkReachabilityFlags cloneFlags, + void *info) +{ + dispatch_semaphore_t s = (dispatch_semaphore_t)info; + + dispatch_semaphore_signal(s); + return; +} - // don't do anything if the sdRef is not valid (e.g., "dnsMain" changed) - if (sdRef != NULL - && targetPrivate->dnsMain == dnsMain) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3LL * NSEC_PER_SEC), - _dns_queue(), - ^{ - DNSServiceRefDeallocate(sdRef); - CFRelease(target); - dnsCount--; - if (dnsCount == 0) { - // if no more queries active - DNSServiceRefDeallocate(dnsMain); - dnsMain = NULL; +static void +sync_DNS_query(SCNetworkReachabilityRef target) +{ + SCNetworkReachabilityRef clone; + SCNetworkReachabilityPrivateRef clonePrivate; + SCNetworkReachabilityContext context = { 0, NULL, NULL, NULL, NULL }; + dispatch_queue_t q; + long ret; + dispatch_semaphore_t s; + SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; + + clone = __SCNetworkReachabilityCreateCopy(target); + if (clone == NULL) { + return; + } + clonePrivate = (SCNetworkReachabilityPrivateRef)clone; + + q = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + s = dispatch_semaphore_create(0); + + // start async query + context.info = (void *)s; + SCNetworkReachabilitySetCallback(clone, sync_DNS_query_callback, &context); + SCNetworkReachabilitySetDispatchQueue(clone, q); + + // wait for reply (or timeout) + ret = dispatch_semaphore_wait(s, dispatch_time(DISPATCH_TIME_NOW, + SYNC_DNS_QUERY_TIMEOUT_NSEC)); + if (ret != 0) { + dispatch_sync(_dns_queue(), ^{ + // mark as both a timeout *and* an error + _dns_mark(clone, MARK_TIMEOUT); + _dns_mark(clone, MARK_ERROR); + + __mark_operation_end(clone, + FALSE, // if successful query + dns_query_mdns_timeout, // [m]DNS query + &clonePrivate->dnsQueryStart, // start time + &clonePrivate->dnsQueryEnd); // end time + + MUTEX_LOCK(&clonePrivate->lock); + + // update target info with what's available + if (clonePrivate->resolvedAddresses != NULL) { + CFRelease(clonePrivate->resolvedAddresses); + clonePrivate->resolvedAddresses = NULL; } + if ((clonePrivate->dnsAddresses != NULL) && + isA_CFArray(clonePrivate->dnsAddresses) && + (CFArrayGetCount(clonePrivate->dnsAddresses) > 0)) { + clonePrivate->resolvedAddresses = CFArrayCreateMutableCopy(NULL, + 0, + clonePrivate->dnsAddresses); + } + if (clonePrivate->resolvedAddresses != NULL) { + // if timeout w/partial results + clonePrivate->resolvedError = NETDB_SUCCESS; + } else { + // if timeout w/no results + clonePrivate->resolvedAddresses = CFRetain(kCFNull); + clonePrivate->resolvedError = EAI_NONAME; + } + + MUTEX_UNLOCK(&clonePrivate->lock); }); } - if (targetPrivate->dnsAddresses != NULL) { - CFRelease(targetPrivate->dnsAddresses); - targetPrivate->dnsAddresses = NULL; - } - targetPrivate->dnsError = NETDB_SUCCESS; + // cancel request + SCNetworkReachabilitySetDispatchQueue(clone, NULL); + SCNetworkReachabilitySetCallback(clone, NULL, NULL); + + // transfer reply + if (clonePrivate->resolvedAddresses != NULL) CFRetain(clonePrivate->resolvedAddresses); + if (targetPrivate->resolvedAddresses != NULL) CFRelease(targetPrivate->resolvedAddresses); + targetPrivate->resolvedAddresses = clonePrivate->resolvedAddresses; + targetPrivate->resolvedError = clonePrivate->resolvedError; + targetPrivate->resolverFlags = clonePrivate->resolverFlags; + targetPrivate->cycle = clonePrivate->cycle; + targetPrivate->dnsFlags = clonePrivate->dnsFlags; + memcpy(&targetPrivate->info, &clonePrivate->info, sizeof(ReachabilityInfo)); + memcpy(&targetPrivate->last_notify, &clonePrivate->last_notify, sizeof(ReachabilityInfo)); + + CFRelease(clone); + dispatch_release(s); return; } @@ -4474,26 +3850,31 @@ dequeueDNSQuery(SCNetworkReachabilityRef target) #pragma mark Network Information support -// Note: protected by _hn_changes_queue() -static SCDynamicStoreCallBack network_changed_callback = NULL; +// Note: protected by _hn_target_queue() static int network_changed_token; static Boolean network_changed_token_valid = FALSE; -static SCDynamicStoreRef network_change_store = NULL; /* * nwi_refresh_handler * * Called to notify/update network changed events - * - caller must be running on the _hn_changes_queue() + * - should be exec'd on the _hn_changes_queue() */ static void nwi_refresh_handler() { - CFArrayRef changes; - CFStringRef key; + CFArrayRef changes; + CFStringRef key; + __block SCDynamicStoreRef store = NULL; + + dispatch_sync(_hn_target_queue(), ^{ + if (network_changed_token_valid && (hn_store != NULL)) { + store = CFRetain(hn_store); + } + }); - if (!network_changed_token_valid || (network_changed_callback == NULL)) { + if (store == NULL) { return; } @@ -4501,12 +3882,12 @@ nwi_refresh_handler() key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); - changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); - (*network_changed_callback)(network_change_store, changes, NULL); + __SCNetworkReachabilityHandleChanges(store, changes, NULL); CFRelease(changes); CFRelease(key); + CFRelease(store); return; } @@ -4515,16 +3896,14 @@ nwi_refresh_handler() * nwi_refresh_enable * * Called to monitor for network changes. - * - caller must be running on the _hn_changes_queue() + * - caller must be running on the _hn_target_queue() + * - passed in queue should be _hn_changes_queue() */ static Boolean -nwi_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCallBack callback) +nwi_refresh_enable(dispatch_queue_t q) { uint32_t status; - network_changed_callback = callback; - network_change_store = CFRetain(store); - status = notify_register_dispatch(_SC_NOTIFY_NETWORK_CHANGE_NWI, // trailing nwi_state_get_notify_key() &network_changed_token, q, @@ -4532,7 +3911,7 @@ nwi_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCa nwi_refresh_handler(); }); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for network changes, status=%lu"), status); + SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for network changes, status=%u"), status); return FALSE; } @@ -4546,7 +3925,7 @@ nwi_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCa * nwi_refresh_disable * * Called to stop monitoring for network changes - * - caller must be running on the _hn_changes_queue() + * - caller must be running on the _hn_target_queue() */ static void nwi_refresh_disable() @@ -4555,14 +3934,130 @@ nwi_refresh_disable() (void)notify_cancel(network_changed_token); network_changed_token_valid = FALSE; } - if (network_change_store != NULL) { - CFRelease(network_change_store); - network_change_store = NULL; - network_changed_callback = NULL; + + return; +} + + +#pragma mark - +#pragma mark Sleep/wake support + + +#if !TARGET_OS_IPHONE + +// Note: protected by _hn_target_queue() +static IOPMConnection power_changed_connection = NULL; +static const CFStringRef power_changed_key = CFSTR("*** EARLY WAKE ***"); + + +/* + * power_refresh_handler + * + * Called to notify/update power capability changed events + * - should be exec'd on the _hn_changes_queue() + */ +static void +power_refresh_handler(void *param, + IOPMConnection connection, + IOPMConnectionMessageToken token, + IOPMSystemPowerStateCapabilities capabilities) +{ + Boolean change; + IOReturn ret; + __block SCDynamicStoreRef store = NULL; + + dispatch_sync(_hn_target_queue(), ^{ + if ((power_changed_connection != NULL) && (hn_store != NULL)) { + store = CFRetain(hn_store); + } + }); + + if (store == NULL) { + return; + } + + // check for [relevant] changes + change = ((power_capabilities ^ capabilities) & POWER_CAPABILITIES_NETWORK) != 0; + + // update capabilities + power_capabilities = capabilities; + + if (change) { + CFArrayRef changes; + + // fake a network change. + changes = CFArrayCreate(NULL, (const void **)&power_changed_key, 1, &kCFTypeArrayCallBacks); + __SCNetworkReachabilityHandleChanges(store, changes, NULL); + CFRelease(changes); + } + + ret = IOPMConnectionAcknowledgeEvent(connection, token); + if (ret != kIOReturnSuccess) { + SCLog(TRUE, LOG_ERR, CFSTR("IOPMConnectionAcknowledgeEvent failed, 0x%08x"), ret); + } + + CFRelease(store); + return; +} + + +/* + * power_refresh_enable + * + * Called to monitor power changes. + * - caller must be running on the _hn_target_queue() + * - passed in queue should be _hn_changes_queue() + */ +static Boolean +power_refresh_enable(dispatch_queue_t q) +{ + IOPMConnection connection = NULL; + IOReturn ret; + + ret = IOPMConnectionCreate(CFSTR("com.apple.SCNetworkReachability"), + kIOPMEarlyWakeNotification | kIOPMSleepWakeInterest, + &connection); + if (ret != kIOReturnSuccess) { + SCLog(TRUE, LOG_ERR, CFSTR("IOPMConnectionCreate failed, 0x%08x"), ret); + goto failed; + } + + ret = IOPMConnectionSetNotification(connection, NULL, power_refresh_handler); + if (ret != kIOReturnSuccess) { + SCLog(TRUE, LOG_ERR, CFSTR("IOPMConnectionSetNotification failed, 0x%08x"), ret); + goto failed; + } + + power_changed_connection = connection; + IOPMConnectionSetDispatchQueue(connection, q); + power_capabilities = IOPMConnectionGetSystemCapabilities(); + + return TRUE; + + failed: + + if (connection != NULL) { + IOPMConnectionRelease(connection); + } + + return FALSE; +} + + +static void +power_refresh_disable() +{ + if (power_changed_connection != NULL) { + IOPMConnectionSetDispatchQueue(power_changed_connection, NULL); + IOPMConnectionRelease(power_changed_connection); + power_changed_connection = NULL; } + return; } +#endif // !TARGET_OS_IPHONE + @@ -4601,6 +4096,8 @@ SCNetworkReachabilityCopyOnDemandService(SCNetworkReachabilityRef target, } + + static void __SCNetworkReachabilityOnDemandCheckCallback(SCNetworkReachabilityRef onDemandServer, SCNetworkReachabilityFlags onDemandFlags, @@ -4626,7 +4123,7 @@ __SCNetworkReachabilityOnDemandCheckCallback(SCNetworkReachabilityRef onDemandSe targetPrivate->needResolve = TRUE; } - __SCNetworkReachabilityPerformLocked(target); + __SCNetworkReachabilityUpdate(target); MUTEX_UNLOCK(&targetPrivate->lock); @@ -4693,13 +4190,15 @@ __SCNetworkReachabilityOnDemandCheck(ReachabilityStoreInfoRef store_info, /* get on-demand info */ onDemandServiceID = SCNetworkConnectionCopyServiceID(connection); if (SCNetworkConnectionCopyOnDemandInfo(connection, &onDemandRemoteAddress, &onDemandStatus)) { - isOnDemandService = TRUE; - ok = TRUE; + if (onDemandRemoteAddress != NULL) { + isOnDemandService = TRUE; + ok = TRUE; + } } - /* handle non-OnDemand App-Layer VPN */ + /* handle non-OnDemand App Layer VPN */ if (isAppLayerVPN && !isOnDemandService) { - SCLog(_sc_debug, LOG_INFO, CFSTR("%s status * = 0x%08x (App-Layer VPN)"), + SCLog(_sc_debug, LOG_INFO, CFSTR("%s status * = 0x%08x (App Layer VPN)"), targetPrivate->log_prefix, *flags); if (*flags & kSCNetworkReachabilityFlagsReachable) { @@ -4777,11 +4276,9 @@ __SCNetworkReachabilityOnDemandCheck(ReachabilityStoreInfoRef store_info, &kCFTypeDictionaryValueCallBacks); CFDictionarySetValue(options, kSCNetworkReachabilityOptionNodeName, onDemandRemoteAddress); CFDictionarySetValue(options, kSCNetworkReachabilityOptionConnectionOnDemandBypass, kCFBooleanTrue); -#ifdef HAVE_REACHABILITY_SERVER if (targetPrivate->serverBypass) { CFDictionarySetValue(options, kSCNetworkReachabilityOptionServerBypass, kCFBooleanTrue); } -#endif // HAVE_REACHABILITY_SERVER targetPrivate->onDemandServer = SCNetworkReachabilityCreateWithOptions(NULL, options); CFRelease(options); @@ -4885,9 +4382,9 @@ __SCNetworkReachabilityOnDemandCheck(ReachabilityStoreInfoRef store_info, * * Notes : * - * 1. We have a "contract" with mDNSResponder that for EVERY network + * 1. We have a "contract" with discoveryd that for EVERY network * or DNS configuration change that should warrant our [re-]starting - * a query, mDNSResponder will acknowledge the latest DNS configuration. + * a query, discoveryd will acknowledge the latest DNS configuration. * * 2. IPMonitor also posts a notification AFTER every network or DNS * configuration change. @@ -4897,11 +4394,9 @@ __SCNetworkReachabilityOnDemandCheck(ReachabilityStoreInfoRef store_info, */ -// Note: protected by _hn_changes_queue() -static SCDynamicStoreCallBack onDemand_callback = NULL; +// Note: protected by _hn_target_queue() static int onDemand_refresh_token; static Boolean onDemand_refresh_token_valid = FALSE; -static SCDynamicStoreRef onDemand_store = NULL; /* @@ -4909,15 +4404,22 @@ static SCDynamicStoreRef onDemand_store = NULL; * * Called to notify/update all SCNetworkReachability targets of * OnDemand changes. - * - caller must be running on the _hn_changes_queue() + * - should be exec'd on the _hn_changes_queue() */ static void onDemand_refresh_handler() { - CFArrayRef changes; - CFStringRef key; + CFArrayRef changes; + CFStringRef key; + __block SCDynamicStoreRef store = NULL; + + dispatch_sync(_hn_target_queue(), ^{ + if (onDemand_refresh_token_valid && (hn_store != NULL)) { + store = CFRetain(hn_store); + } + }); - if (!onDemand_refresh_token_valid || (onDemand_callback == NULL)) { + if (store == NULL) { return; } @@ -4925,10 +4427,11 @@ onDemand_refresh_handler() kSCDynamicStoreDomainState, kSCEntNetOnDemand); changes = CFArrayCreate(NULL, (const void **)&key, 1, &kCFTypeArrayCallBacks); - (*onDemand_callback)(onDemand_store, changes, NULL); + __SCNetworkReachabilityHandleChanges(store, changes, NULL); CFRelease(changes); CFRelease(key); + CFRelease(store); return; } @@ -4937,16 +4440,13 @@ onDemand_refresh_handler() * onDemand_refresh_enable * * Called to monitor for OnDemand changes. - * - caller must be running on the _hn_changes_queue() + * - caller must be running on the _hn_target_queue() */ static Boolean -onDemand_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicStoreCallBack callback) +onDemand_refresh_enable(dispatch_queue_t q) { uint32_t status; - onDemand_callback = callback; - onDemand_store = CFRetain(store); - status = notify_register_dispatch(kSCNETWORKCONNECTION_ONDEMAND_NOTIFY_KEY, &onDemand_refresh_token, q, @@ -4954,7 +4454,7 @@ onDemand_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicSt onDemand_refresh_handler(); }); if (status != NOTIFY_STATUS_OK) { - SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed, status=%lu"), status); + SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed, status=%u"), status); return FALSE; } @@ -4968,100 +4468,21 @@ onDemand_refresh_enable(dispatch_queue_t q, SCDynamicStoreRef store, SCDynamicSt * onDemand_refresh_disable * * Called to stop monitoring for OnDemand changes - * - caller must be running on the _hn_changes_queue() + * - caller must be running on the _hn_target_queue() */ static void onDemand_refresh_disable() { (void)notify_cancel(onDemand_refresh_token); onDemand_refresh_token_valid = FALSE; - CFRelease(onDemand_store); - onDemand_store = NULL; - onDemand_callback = NULL; - return; -} - - -#pragma mark - -#pragma mark Reachability Flags - - -#ifdef HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL -typedef struct { - int status; - struct addrinfo *res; -} reply_info; - - -static void -reply_callback(int32_t status, struct addrinfo *res, void *context) -{ - reply_info *reply = (reply_info *)context; - - reply->status = status; - reply->res = res; return; } -static int -getaddrinfo_interface_sync(const char *nodename, - const char *interface, - struct addrinfo **res) -{ - mach_port_t mp; - reply_info reply = { NETDB_SUCCESS, NULL }; - - mp = _getaddrinfo_interface_async_call(nodename, - NULL, - &HINTS_DEFAULT, - interface, - reply_callback, - (void *)&reply); - if (mp == MACH_PORT_NULL) { - return EAI_SYSTEM; - } - - while (TRUE) { - int g_status; - union { - u_int8_t buf[8192]; - mach_msg_empty_rcv_t msg; - } m_reply; - kern_return_t m_status; - - m_status = mach_msg(&m_reply.msg.header, /* msg */ - MACH_RCV_MSG, /* options */ - 0, /* send_size */ - sizeof(m_reply), /* rcv_size */ - mp, /* rcv_name */ - MACH_MSG_TIMEOUT_NONE, /* timeout */ - MACH_PORT_NULL); /* notify */ - if (m_status != KERN_SUCCESS) { - return EAI_SYSTEM; - } - - g_status = getaddrinfo_async_handle_reply((void *)m_reply.buf); - if (g_status != 0) { - if (reply.res != NULL) { - freeaddrinfo(reply.res); - reply.res = NULL; - } - return EAI_SYSTEM; - } - - if ((reply.res != NULL) || (reply.status != NETDB_SUCCESS)) { - // if we have a reply or an error - break; - } - // if the request is not complete and needs to be re-queued - } - *res = reply.res; - return reply.status; -} -#endif // HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL +#pragma mark - +#pragma mark Reachability Flags static Boolean @@ -5084,7 +4505,15 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, return FALSE; } -#ifdef HAVE_REACHABILITY_SERVER +#if TARGET_OS_IPHONE + if (isReachabilityTypeName(targetPrivate->type) && + !async && + pthread_is_threaded_np() && + pthread_main_np()) { + SCLog(TRUE, LOG_WARNING, CFSTR("Warning: sync SCNetworkReachability (by-name) query on main thread")); + } +#endif // TARGET_OS_IPHONE + if (!targetPrivate->serverBypass) { if (!targetPrivate->serverActive) { @@ -5112,7 +4541,7 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, goto done; } } -#endif // HAVE_REACHABILITY_SERVER + switch (targetPrivate->type) { case reachabilityTypeAddress : @@ -5130,20 +4559,21 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, &my_info, targetPrivate->log_prefix); if (!ok) { - goto error; /* not today */ + goto done2; /* not today */ } if (!(my_info.flags & kSCNetworkReachabilityFlagsIsLocalAddress)) { - goto error; /* not reachable, non-"local" address */ + goto done2; /* not reachable, non-"local" address */ } } /* * Check "remote" address */ - if (targetPrivate->remoteAddress != NULL) { + if ((targetPrivate->remoteAddress != NULL) && + (targetPrivate->localAddress != targetPrivate->remoteAddress)) { /* - * in cases where we have "local" and "remote" addresses + * in cases where we have different "local" and "remote" addresses * we need to re-initialize the to-be-returned flags. */ my_info = NOT_REACHABLE; @@ -5157,7 +4587,7 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, &my_info, targetPrivate->log_prefix); if (!ok) { - goto error; /* not today */ + goto done2; /* not today */ } } @@ -5165,14 +4595,12 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, } - case reachabilityTypeName : { - struct timeval dnsQueryStart; - struct timeval dnsQueryEnd; + case reachabilityTypeName : + case reachabilityTypePTR : { int error; int ns_dns_config = -1; SCNetworkReachabilityFlags ns_flags = 0; uint32_t ns_if_index = 0; - struct addrinfo *res; addresses = (CFMutableArrayRef)SCNetworkReachabilityCopyResolvedAddress(target, &error); if ((addresses != NULL) || (error != NETDB_SUCCESS)) { @@ -5183,7 +4611,7 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, } else if (targetPrivate->dnsActive) { /* if [m]DNS query active */ goto checkResolvedAddresses; - } else if ((targetPrivate->dnsMP == MACH_PORT_NULL) && !targetPrivate->needResolve) { + } else if (!targetPrivate->needResolve) { /* * if this is an async request (i.e. someone is watching the reachability * of this target), if no query active, and if no query is needed @@ -5210,76 +4638,74 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, targetPrivate->dnsBlocked = FALSE; - /* check the reachability of the DNS servers */ - ok = _SC_R_checkResolverReachability(store_info, - &ns_flags, - &targetPrivate->haveDNS, - targetPrivate->name, - targetPrivate->if_index, - &ns_if_index, - &ns_dns_config, - targetPrivate->log_prefix); - if (!ok) { - /* if we could not get DNS server info */ - SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server reachability unknown"), - targetPrivate->log_prefix); - targetPrivate->resolverFlags = kSCNetworkReachabilityFlagsReachable; - goto error; - } else { - - // save resolver reachability flags - targetPrivate->resolverFlags = ns_flags; + /* update the reachability of the DNS servers */ + _SC_R_updateResolverReachability(store_info, + &ns_flags, + &targetPrivate->haveDNS, + targetPrivate->name, + targetPrivate->if_index, + &ns_if_index, + &ns_dns_config, + targetPrivate->log_prefix); - if (rankReachability(ns_flags) < 2) { - /* - * if DNS servers are not (or are no longer) reachable, set - * flags based on the availability of configured (but not - * active) services. - */ - SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server(s) not available"), - targetPrivate->log_prefix); + // save resolver reachability flags + targetPrivate->resolverFlags = ns_flags; - if (!targetPrivate->dnsBlocked) { - ok = checkAddress(store_info, - NULL, - targetPrivate->if_index, - &my_info, - targetPrivate->log_prefix); - if (!ok) { - SCLog(_sc_debug, LOG_INFO, CFSTR("%sNo available networks"), - targetPrivate->log_prefix); - goto error; - } - } else { - // if not checking "available" networks - my_info.flags = ns_flags; - my_info.if_index = ns_if_index; - } + if (rankReachability(ns_flags) < 2) { + /* + * if DNS servers are not (or are no longer) reachable, set + * flags based on the availability of configured (but not + * active) services. + */ - if (async && targetPrivate->scheduled) { - /* - * return "host not found", set flags appropriately, - * and schedule notification. - */ - __SCNetworkReachabilityCallbackSetResolvedAddresses(EAI_NONAME, - NULL, - (void *)target); - my_info.flags |= (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending); + SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server(s) not available"), + targetPrivate->log_prefix); - SCLog(_sc_debug, LOG_INFO, CFSTR("%sno DNS servers are reachable"), + if (!targetPrivate->dnsBlocked) { + ok = checkAddress(store_info, + NULL, + targetPrivate->if_index, + &my_info, + targetPrivate->log_prefix); + if (!ok) { + SCLog(_sc_debug, LOG_INFO, CFSTR("%sNo available networks"), targetPrivate->log_prefix); - __SCNetworkReachabilityPerformLocked(target); + goto done2; } - break; + } else { + // if not checking "available" networks + my_info.flags = ns_flags; + my_info.if_index = ns_if_index; + } + + if (async && targetPrivate->scheduled) { + /* + * return "host not found", set flags appropriately, + * and schedule notification. + */ + __SCNetworkReachabilitySetResolvedError(target, EAI_NONAME); + my_info.flags |= (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending); + + SCLog(_sc_debug, LOG_INFO, CFSTR("%sno DNS servers are reachable"), + targetPrivate->log_prefix); + __SCNetworkReachabilityUpdate(target); } + + break; } if (targetPrivate->resolverBypass) { - /* if we are not resolving the name, - * set the flags of the resolvers */ - my_info.flags = ns_flags; - my_info.if_index = ns_if_index; + if (targetPrivate->haveDNS) { + /* + * if we are not resolving the name, and if we have + * one or more DNS resolvers, then return flags that + * reflect the reachability of the resolvers (and + * not the actual name). + */ + my_info.flags = ns_flags; + my_info.if_index = ns_if_index; + } break; } @@ -5289,21 +4715,11 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, if (targetPrivate->dnsActive) { /* if [m]DNS query active */ - SCLog(_sc_debug, LOG_INFO, - CFSTR("%swaiting for DNS reply"), - targetPrivate->log_prefix); - if ((addresses != NULL) || (error != NETDB_SUCCESS)) { - /* updated reachability based on the previous reply */ - goto checkResolvedAddresses; + if (_sc_debug && !targetPrivate->quiet) { + SCLog(TRUE, LOG_INFO, + CFSTR("%swaiting for DNS reply"), + targetPrivate->log_prefix); } - break; - } - - if (targetPrivate->dnsMP != MACH_PORT_NULL) { - /* if request already in progress */ - SCLog(_sc_debug, LOG_INFO, - CFSTR("%swaiting for DNS* reply"), - targetPrivate->log_prefix); if ((addresses != NULL) || (error != NETDB_SUCCESS)) { /* updated reachability based on the previous reply */ goto checkResolvedAddresses; @@ -5316,31 +4732,15 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, targetPrivate->log_prefix, targetPrivate->name); -#ifdef USE_DNSSERVICEGETADDRINFO /* * initiate an DNS query w/DNSServiceGetAddrInfo */ - if (enqueueDNSQuery(target)) { - /* request initiated */ - break; - } -#endif // USE_DNSSERVICEGETADDRINFO - - /* - * if we were unable to use DNSServiceGetAddrInfo - * then try with getaddrinfo[_async_start] - */ - if (enqueueAsyncDNSQuery(target)) { - /* request initiated */ - break; - } - - /* if we could not initiate the request, process error */ - goto checkResolvedAddresses; + enqueueDNSQuery(target); + break; } SCLog(_sc_debug, LOG_INFO, - CFSTR("%scheck DNS for name = %s"), + CFSTR("%scheckName(%s)"), targetPrivate->log_prefix, targetPrivate->name); @@ -5348,31 +4748,15 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, * OK, all of the DNS name servers are available. Let's * resolve the nodename into an address. */ - __mark_operation_start(&dnsQueryStart, &dnsQueryEnd); - -#ifdef HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - if (targetPrivate->if_index == 0) { -#endif // HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - error = getaddrinfo(targetPrivate->name, - NULL, - &HINTS_DEFAULT, - &res); -#ifdef HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL - } else { - error = getaddrinfo_interface_sync(targetPrivate->name, - targetPrivate->if_name, - &res); - } -#endif // HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL + sync_DNS_query(target); - __mark_operation_end(target, - ((error == 0) && (res != NULL)), // if successful query - dns_query_sync, // sync - &dnsQueryStart, // start time - &dnsQueryEnd); // end time - - __SCNetworkReachabilitySetResolvedAddresses(error, res, target); + if (!(targetPrivate->dnsHaveTimeout && targetPrivate->dnsHaveError)) { + // if target reach info is valid + memcpy(reach_info, &targetPrivate->info, sizeof(ReachabilityInfo)); + goto done2; + } + if (addresses != NULL) CFRelease(addresses); addresses = (CFMutableArrayRef)SCNetworkReachabilityCopyResolvedAddress(target, &error); checkResolvedAddresses : @@ -5384,13 +4768,13 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, */ my_info = NOT_REACHABLE; - if (isA_CFArray(addresses)) { + if ((targetPrivate->type == reachabilityTypeName) && isA_CFArray(addresses)) { CFIndex i; CFIndex n = CFArrayGetCount(addresses); + struct sockaddr *sa; for (i = 0; i < n; i++) { ReachabilityInfo ns_info = NOT_REACHABLE; - struct sockaddr *sa; sa = (struct sockaddr *)CFDataGetBytePtr(CFArrayGetValueAtIndex(addresses, i)); @@ -5400,18 +4784,48 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, &ns_info, targetPrivate->log_prefix); if (!ok) { - goto error; /* not today */ + goto done2; /* not today */ } if (rankReachability(ns_info.flags) > rankReachability(my_info.flags)) { /* return the best case result */ my_info = ns_info; if (rankReachability(my_info.flags) == 2) { - /* we're in luck */ + /* can't get any better than REACHABLE */ break; } } } + + if (_sc_debug) { + for (i++; i < n; i++) { + sa = (struct sockaddr *)CFDataGetBytePtr(CFArrayGetValueAtIndex(addresses, i)); + log_address("skipAddress", + sa, + targetPrivate->if_index, + targetPrivate->log_prefix); + } + } + } else if ((targetPrivate->type == reachabilityTypePTR) && isA_CFArray(addresses)) { + CFIndex i; + CFIndex n = CFArrayGetCount(addresses); + + my_info = NOT_REACHABLE; + + for (i = 0; i < n; i++) { + if (i == 0) { + my_info.flags = kSCNetworkReachabilityFlagsReachable; + } + + if (_sc_debug) { + CFStringRef ptrName; + + ptrName = CFArrayGetValueAtIndex(addresses, i); + SCLog(TRUE, LOG_INFO, CFSTR("%sPTR name(%@)"), + targetPrivate->log_prefix, + ptrName); + } + } } else { if ((error == EAI_NONAME) #if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) @@ -5450,7 +4864,7 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, &my_info, targetPrivate->log_prefix); if (!ok) { - goto error; /* not today */ + goto done2; /* not today */ } if ((my_info.flags & kSCNetworkReachabilityFlagsReachable) && @@ -5477,7 +4891,7 @@ __SCNetworkReachabilityGetFlags(ReachabilityStoreInfoRef store_info, _reach_set(reach_info, &my_info, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name); - error : + done2 : if (addresses != NULL) CFRelease(addresses); return ok; @@ -5542,6 +4956,13 @@ SCNetworkReachabilityGetFlags(SCNetworkReachabilityRef target, if (targetPrivate->scheduled) { // if being watched, return the last known (and what should be current) status *flags = targetPrivate->info.flags & kSCNetworkReachabilityFlagsMask; + + if (isReachabilityTypeName(targetPrivate->type) && targetPrivate->dnsNoAddressesSinceLastTimeout) { + targetPrivate->needResolve = TRUE; + ReachabilityInfo tmp_reach_info = NOT_REACHABLE; + __SCNetworkReachabilityGetFlags(&store_info, target, &tmp_reach_info, TRUE); + } + goto done; } @@ -5562,152 +4983,16 @@ SCNetworkReachabilityGetFlags(SCNetworkReachabilityRef target, #pragma mark - -#pragma mark Notifications - - -static void -__SCNetworkReachabilitySetNotifications(SCDynamicStoreRef store) -{ - CFStringRef key; - CFMutableArrayRef keys; - CFStringRef pattern; - CFMutableArrayRef patterns; - - keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - patterns = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - - // If we are bypassing nwi, then we need to get the info from the store. - if (D_nwiBypass) { - // Setup:/Network/Global/IPv4 (for the ServiceOrder) - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCEntNetIPv4); - CFArrayAppendValue(keys, key); - CFRelease(key); - -#ifndef USE_DNSSERVICEGETADDRINFO - // State:/Network/Global/DNS - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetDNS); - CFArrayAppendValue(keys, key); - CFRelease(key); -#endif // USE_DNSSERVICEGETADDRINFO - - // State:/Network/Global/IPv4 (default route) - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetIPv4); - CFArrayAppendValue(keys, key); - CFRelease(key); - - // State:/Network/Global/OnDemand - key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, - kSCDynamicStoreDomainState, - kSCEntNetOnDemand); - CFArrayAppendValue(keys, key); - CFRelease(key); - - // Setup: per-service Interface info - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCCompAnyRegex, - kSCEntNetInterface); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - // per-service IPv4 info - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCCompAnyRegex, - kSCEntNetIPv4); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - kSCCompAnyRegex, - kSCEntNetIPv4); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - // per-service IPv6 info - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCCompAnyRegex, - kSCEntNetIPv6); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - kSCCompAnyRegex, - kSCEntNetIPv6); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - // per-service PPP info (for existence, kSCPropNetPPPDialOnDemand, kSCPropNetPPPStatus) - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCCompAnyRegex, - kSCEntNetPPP); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - kSCCompAnyRegex, - kSCEntNetPPP); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - // per-service VPN info (for existence, kSCPropNetVPNStatus) - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCCompAnyRegex, - kSCEntNetVPN); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - kSCCompAnyRegex, - kSCEntNetVPN); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - // per-service IPSec info (for existence, kSCPropNetIPSecStatus) - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainSetup, - kSCCompAnyRegex, - kSCEntNetIPSec); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - pattern = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL, - kSCDynamicStoreDomainState, - kSCCompAnyRegex, - kSCEntNetIPSec); - CFArrayAppendValue(patterns, pattern); - CFRelease(pattern); - - } - -#if !TARGET_OS_IPHONE - // State: Power Management Capabilities - key = SCDynamicStoreKeyCreate(NULL, CFSTR("%@%@"), - kSCDynamicStoreDomainState, - CFSTR(kIOPMSystemPowerCapabilitiesKeySuffix)); - CFArrayAppendValue(keys, key); - CFRelease(key); -#endif // TARGET_OS_IPHONE - - // SCDynamicStore key to force posting a reachability change - CFArrayAppendValue(keys, SCNETWORKREACHABILITY_TRIGGER_KEY); - - (void)SCDynamicStoreSetNotificationKeys(store, keys, patterns); - CFRelease(keys); - CFRelease(patterns); - - return; -} +#pragma mark Notifications +/* + * __SCNetworkReachabilityHandleChanges + * + * Called to process network configuration changes and determine + * if a reachability notification is warranted. + * - should be exec'd on the _hn_changes_queue() + */ static void __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, CFArrayRef changedKeys, @@ -5717,9 +5002,11 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, CFIndex i; Boolean forcedChange = FALSE; CFStringRef key; + Boolean match; CFIndex nChanges; CFIndex nGlobals = 0; CFIndex nTargets; + Boolean neChanged = FALSE; Boolean networkConfigChanged = FALSE; struct timeval now; Boolean onDemandConfigChanged = FALSE; @@ -5737,8 +5024,6 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, return; } - /* "something" changed, start fresh */ - ReachabilityStoreInfo_save(NULL); dispatch_sync(_hn_target_queue(), ^{ /* grab the currently watched targets */ @@ -5757,56 +5042,41 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, (void)gettimeofday(&now, NULL); #if !TARGET_OS_IPHONE - key = SCDynamicStoreKeyCreate(NULL, CFSTR("%@%@"), - kSCDynamicStoreDomainState, - CFSTR(kIOPMSystemPowerCapabilitiesKeySuffix)); - if (CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key)) { - CFNumberRef num; - + match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), power_changed_key); + if (match) { + /* handle "early" wake notification */ nGlobals++; - - num = SCDynamicStoreCopyValue(store, key); - if (num != NULL) { - if (!isA_CFNumber(num) || - !CFNumberGetValue(num, kCFNumberSInt32Type, &power_capabilities)) { - // data not as expected, use default - power_capabilities = kIOPMSytemPowerStateCapabilitiesMask; - } - - CFRelease(num); - } else { - // data not available, use default - power_capabilities = kIOPMSytemPowerStateCapabilitiesMask; - } - powerStatusChanged = TRUE; } - CFRelease(key); #endif // !TARGET_OS_IPHONE key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, kSCEntNetDNS); - if (CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key)) { + match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key); + CFRelease(key); + if (match) { nGlobals++; dnsConfigChanged = TRUE; /* the DNS server(s) have changed */ } - CFRelease(key); key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL, kSCDynamicStoreDomainState, kSCEntNetOnDemand); - if (CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key)) { + match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), key); + CFRelease(key); + if (match) { nGlobals++; onDemandConfigChanged = TRUE; /* the OnDemand configuration has changed */ // force OnDemand configuration refresh (if SC notification arrives before BSD notify) __SCNetworkConnectionForceOnDemandConfigurationRefresh(); } - CFRelease(key); - if (CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), SCNETWORKREACHABILITY_TRIGGER_KEY)) { + + match = CFArrayContainsValue(changedKeys, CFRangeMake(0, nChanges), SCNETWORKREACHABILITY_TRIGGER_KEY); + if (match) { nGlobals++; forcedChange = TRUE; /* an SCDynamicStore driven "network" change */ } @@ -5819,38 +5089,55 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, unsigned int changes = 0; static const char *change_strings[] = { // with no "power" status change - "", - "network ", - "DNS ", - "network and DNS ", - "OnDemand ", - "network and OnDemand ", - "DNS and OnDemand ", - "network, DNS, and OnDemand ", + "", // 00000 + "network ", // 00001 + "DNS ", // 00010 + "network and DNS ", // 00011 + "OnDemand ", // 00100 + "network and OnDemand ", // 00101 + "DNS and OnDemand ", // 00110 + "network, DNS, and OnDemand ", // 00111 + "NE ", // 01000 + "network and NE ", // 01001 + "DNS and NE ", // 01010 + "network, DNS, and NE ", // 01011 + "OnDemand and NE ", // 01100 + "network, OnDemand, and NE ", // 01101 + "DNS, OnDemand, and NE ", // 01110 + "network, DNS, OnDemand, and NE ", // 01111 #if !TARGET_OS_IPHONE // with "power" status change - "power ", - "network and power ", - "DNS and power ", - "network, DNS, and power ", - "power ", - "network, OnDemand, and power ", - "DNS, OnDemand, and power ", - "network, DNS, OnDemand, and power ", - "OnDemand and power ", - "network, OnDemand, and power ", - "DNS, OnDemand, and power ", - "network, DNS, OnDemand, and power ", + "power", // 10000 + "network and power ", // 10001 + "DNS and power ", // 10010 + "network, DNS, and power ", // 10011 + "OnDemand and power ", // 10100 + "network, OnDemand, and power ", // 10101 + "DNS, OnDemand, and power ", // 10110 + "network, DNS, OnDemand, and power ", // 10111 + "NE and power ", // 11000 + "network, NE, and power ", // 11001 + "DNS, NE, and power ", // 11010 + "network, DNS, NE, and power ", // 11011 + "OnDemand, NE, and power ", // 11100 + "network, OnDemand, NE, and power ", // 11101 + "DNS, OnDemand, NE, and power ", // 11110 + "network, DNS, OnDemand, NE, and power ", // 11111 #endif // !TARGET_OS_IPHONE }; #if !TARGET_OS_IPHONE - #define PWR 8 + #define PWR 16 if (powerStatusChanged) { changes |= PWR; } #endif // !TARGET_OS_IPHONE + #define NE 8 + if (neChanged) { + changes |= NE; + } + #define VOD 4 if (onDemandConfigChanged) { changes |= VOD; @@ -5899,10 +5186,11 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, } #endif // !TARGET_OS_IPHONE - if (targetPrivate->type == reachabilityTypeName) { - Boolean dnsChanged = (dnsConfigChanged | - dnsNeedsUpdate | - onDemandConfigChanged); + if (isReachabilityTypeName(targetPrivate->type)) { + Boolean dnsChanged = (dnsConfigChanged | + dnsNeedsUpdate | + onDemandConfigChanged | + neChanged); if (!dnsChanged) { /* @@ -5915,37 +5203,32 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, uint32_t ns_if_index = 0; Boolean ok; - /* check the reachability of the DNS servers */ + /* update the reachability of the DNS servers */ ok = ReachabilityStoreInfo_update(&store_info, &store, AF_UNSPEC); if (ok) { - ok = _SC_R_checkResolverReachability(&store_info, - &ns_flags, - &targetPrivate->haveDNS, - targetPrivate->name, - targetPrivate->if_index, - &ns_if_index, - &ns_dns_config, - targetPrivate->log_prefix); + _SC_R_updateResolverReachability(&store_info, + &ns_flags, + &targetPrivate->haveDNS, + targetPrivate->name, + targetPrivate->if_index, + &ns_if_index, + &ns_dns_config, + targetPrivate->log_prefix); + } else { + ns_flags = kSCNetworkReachabilityFlagsReachable; + dnsChanged = TRUE; } - if (!ok) { - /* if we could not get DNS server info */ - SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server reachability unknown"), + + if (rankReachability(ns_flags) < 2) { + /* + * if DNS servers are not (or are no longer) reachable, set + * flags based on the availability of configured (but not + * active) services. + */ + SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server(s) not available"), targetPrivate->log_prefix); - ns_flags = kSCNetworkReachabilityFlagsReachable; dnsChanged = TRUE; - } else { - - if (rankReachability(ns_flags) < 2) { - /* - * if DNS servers are not (or are no longer) reachable, set - * flags based on the availability of configured (but not - * active) services. - */ - SCLog(_sc_debug, LOG_INFO, CFSTR("%sDNS server(s) not available"), - targetPrivate->log_prefix); - dnsChanged = TRUE; - } } if ((targetPrivate->dnsBlocked != ns_blocked) || @@ -5967,15 +5250,6 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, dequeueDNSQuery(target); } - if (targetPrivate->dnsMP != MACH_PORT_NULL) { - /* if we have an outstanding [async] DNS query */ - SCLog(_sc_debug, LOG_INFO, - CFSTR("%scancel DNS query for name = %s"), - targetPrivate->log_prefix, - targetPrivate->name); - dequeueAsyncDNSQuery(target, TRUE); - } - /* schedule request to resolve the name again */ targetPrivate->needResolve = TRUE; } @@ -5986,7 +5260,7 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, } if (targetPrivate->scheduled) { - __SCNetworkReachabilityPerformLocked(target); + __SCNetworkReachabilityUpdate(target); } MUTEX_UNLOCK(&targetPrivate->lock); @@ -6002,6 +5276,44 @@ __SCNetworkReachabilityHandleChanges(SCDynamicStoreRef store, } +/* + * __SCNetworkReachabilityHandleStoreChanges + * + * Called to process SCDynamicStore network configuration changes. + * - should be exec'd on the _hn_changes_queue() + */ +static void +__SCNetworkReachabilityHandleStoreChanges(SCDynamicStoreRef store, + CFArrayRef changedKeys, + void *info) +{ + nwi_state_t nwi_state; + + if ((CFArrayGetCount(changedKeys) == 1) && + CFArrayContainsValue(changedKeys, CFRangeMake(0, 1), SCNETWORKREACHABILITY_TRIGGER_KEY)) { + goto update; + } + + /* "something" [else] changed, start fresh */ + ReachabilityStoreInfo_save(NULL); + + nwi_state = nwi_state_copy(); + if (nwi_state != NULL) { + // if we have some networking + nwi_state_release(nwi_state); + return; + } + + // if no networking, use the [SC] changes to add/update + // the kSCNetworkReachabilityFlagsConnectionRequired flag + + update : + + __SCNetworkReachabilityHandleChanges(store, changedKeys, info); + return; +} + + #if !TARGET_OS_IPHONE static Boolean @@ -6014,24 +5326,8 @@ darkWakeNotify(SCNetworkReachabilityRef target) static Boolean systemIsAwake(IOPMSystemPowerStateCapabilities power_capabilities) { - -#define POWER_CAPABILITIES_NEED (kIOPMSystemPowerStateCapabilityCPU \ - | kIOPMSystemPowerStateCapabilityNetwork \ - | kIOPMSystemPowerStateCapabilityDisk) - - if ((power_capabilities & POWER_CAPABILITIES_NEED) != POWER_CAPABILITIES_NEED) { - /* - * we're not awake (from a networking point of view) unless we - * have the CPU, disk, *and* network. - */ - return FALSE; - } - - if ((power_capabilities & kIOPMSytemPowerStateCapabilitiesMask) == POWER_CAPABILITIES_NEED) { - /* - * if all we have is the CPU, disk, and network than this must - * be a "maintenance" wake. - */ + if ((power_capabilities & POWER_CAPABILITIES_NETWORK) != POWER_CAPABILITIES_NETWORK) { + // if we're not fully awake (from a networking point of view). return FALSE; } @@ -6046,18 +5342,88 @@ reachPerform(void *info) { void *context_info; void (*context_release)(const void *); + unsigned int n; + ReachabilityInfo reach_info; + SCNetworkReachabilityCallBack rlsFunction; + SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)info; + SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; + + n = _SC_ATOMIC_ZERO(&targetPrivate->pending); + if (_sc_debug && (n > 1)) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("%sdelivering SCNetworkReachability notifications (%u)"), + targetPrivate->log_prefix, + n); + } + + MUTEX_LOCK(&targetPrivate->lock); + + if (!targetPrivate->scheduled) { + // if no longer scheduled + SCLog(_sc_debug, LOG_DEBUG, + CFSTR("%sskipping SCNetworkReachability callback, no longer scheduled"), + targetPrivate->log_prefix); + MUTEX_UNLOCK(&targetPrivate->lock); + return; + } + + // capture current state + memcpy(&reach_info, &targetPrivate->info, sizeof(ReachabilityInfo)); + + // callout + rlsFunction = targetPrivate->rlsFunction; + if (targetPrivate->rlsContext.retain != NULL) { + context_info = (void *)(*targetPrivate->rlsContext.retain)(targetPrivate->rlsContext.info); + context_release = targetPrivate->rlsContext.release; + } else { + context_info = targetPrivate->rlsContext.info; + context_release = NULL; + } + + // update last notification info + _reach_set(&targetPrivate->last_notify, &reach_info, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name); + (void)gettimeofday(&targetPrivate->last_push, NULL); + + MUTEX_UNLOCK(&targetPrivate->lock); + + if (rlsFunction != NULL) { + (*rlsFunction)(target, + reach_info.flags & kSCNetworkReachabilityFlagsMask, + context_info); + } + + if (context_release != NULL) { + (*context_release)(context_info); + } + + return; +} + + +/* + * reachUpdate + * + * - caller must *not* be holding the target lock + * - caller must be running on the __SCNetworkReachability_concurrent_queue() + */ +static Boolean +reachUpdate(SCNetworkReachabilityRef target) +{ uint64_t cycle; Boolean defer = FALSE; Boolean forced; Boolean ok; ReachabilityInfo reach_info = NOT_REACHABLE; - SCNetworkReachabilityCallBack rlsFunction; ReachabilityStoreInfo store_info; - SCNetworkReachabilityRef target = (SCNetworkReachabilityRef)info; + Boolean target_debug; SCNetworkReachabilityPrivateRef targetPrivate = (SCNetworkReachabilityPrivateRef)target; - SCLog(_sc_debug, LOG_INFO, CFSTR("%schecking target reachability"), - targetPrivate->log_prefix); + target_debug = (_sc_debug && !targetPrivate->quiet); + + if (target_debug) { + SCLog(TRUE, LOG_INFO, CFSTR("%schecking target reachability"), + targetPrivate->log_prefix); + } MUTEX_LOCK(&targetPrivate->lock); @@ -6065,7 +5431,7 @@ reachPerform(void *info) if (!targetPrivate->scheduled) { // if not currently scheduled MUTEX_UNLOCK(&targetPrivate->lock); - return; + return FALSE; } /* update reachability, notify if status changed */ @@ -6074,8 +5440,10 @@ reachPerform(void *info) ReachabilityStoreInfo_free(&store_info); if (!ok) { /* if reachability status not available */ - SCLog(_sc_debug, LOG_INFO, CFSTR("%flags not available"), - targetPrivate->log_prefix); + if (target_debug) { + SCLog(TRUE, LOG_INFO, CFSTR("%sflags not available"), + targetPrivate->log_prefix); + } reach_info = NOT_REACHABLE; } @@ -6107,82 +5475,82 @@ reachPerform(void *info) cycle = targetPrivate->cycle; forced = ((cycle != 0) && (targetPrivate->info.cycle != cycle)); - if (!forced && !__reach_changed(&targetPrivate->info, &reach_info)) { - if (_sc_debug) { + /* + * (A) (B) (C) + * reach resolve + * changed forced pending + * ======= ======= ======= + * N N N No change + * N N Y No change + * N Y N Change (forced && !resolve pending) + * N Y Y No change (suppress forced w/resolve pending) + * Y N/A N/A Change + * Y N/A N/A Change + * Y N/A N/A Change + * Y N/A N/A Change + * + * Change == A || (B && !C) + * No Change == !(A || (B && !C)) + * No Change == !A && !(B && !C) + * No Change == !A && (!B || C) + * No Change == (!B || C) && !A + */ + if ((!forced || (reach_info.flags == kSCNetworkReachabilityFlagsFirstResolvePending)) + && !__reach_changed(&targetPrivate->info, &reach_info)) { + if (target_debug) { if (targetPrivate->info.sleeping == reach_info.sleeping) { SCLog(TRUE, LOG_INFO, - CFSTR("%sflags/interface match (now 0x%08x/%hu%s)"), + CFSTR("%sflags/interface match (now 0x%08x/%u%s)%s%s"), targetPrivate->log_prefix, reach_info.flags, reach_info.if_index, - reach_info.sleeping ? ", z" : ""); + reach_info.sleeping ? ", z" : "", + defer ? ", deferred" : "", + forced ? ", forced" : ""); } else { SCLog(TRUE, LOG_INFO, - CFSTR("%sflags/interface equiv (was 0x%08x/%hu%s, now 0x%08x/%hu%s)"), + CFSTR("%sflags/interface equiv (was 0x%08x/%u%s, now 0x%08x/%u%s)%s%s"), targetPrivate->log_prefix, targetPrivate->info.flags, targetPrivate->info.if_index, targetPrivate->info.sleeping ? ", z" : "", reach_info.flags, reach_info.if_index, - reach_info.sleeping ? ", z" : ""); + reach_info.sleeping ? ", z" : "", + defer ? ", deferred" : "", + forced ? ", forced" : ""); } - } MUTEX_UNLOCK(&targetPrivate->lock); - return; + return FALSE; } - SCLog(_sc_debug, LOG_INFO, - CFSTR("%sflags/interface have changed (was 0x%08x/%hu%s, now 0x%08x/%hu%s)%s%s"), - targetPrivate->log_prefix, - targetPrivate->info.flags, - targetPrivate->info.if_index, - targetPrivate->info.sleeping ? ", z" : "", - reach_info.flags, - reach_info.if_index, - reach_info.sleeping ? ", z" : "", - defer ? ", deferred" : "", - forced ? ", forced" : ""); + if (target_debug) { + SCLog(TRUE, LOG_INFO, + CFSTR("%sflags/interface have changed (was 0x%08x/%u%s, now 0x%08x/%u%s)%s%s"), + targetPrivate->log_prefix, + targetPrivate->info.flags, + targetPrivate->info.if_index, + targetPrivate->info.sleeping ? ", z" : "", + reach_info.flags, + reach_info.if_index, + reach_info.sleeping ? ", z" : "", + defer ? ", deferred" : "", + forced ? ", forced" : ""); + } /* update flags / interface */ _reach_set(&targetPrivate->info, &reach_info, cycle, targetPrivate->if_index, targetPrivate->if_name); - /* save last notification info */ - _reach_set(&targetPrivate->last_notify, &reach_info, cycle, targetPrivate->if_index, targetPrivate->if_name); - /* as needed, defer the notification */ if (defer) { MUTEX_UNLOCK(&targetPrivate->lock); - return; - } - - /* save last notification time */ - (void)gettimeofday(&targetPrivate->last_push, NULL); - - /* callout */ - rlsFunction = targetPrivate->rlsFunction; - if (targetPrivate->rlsContext.retain != NULL) { - context_info = (void *)(*targetPrivate->rlsContext.retain)(targetPrivate->rlsContext.info); - context_release = targetPrivate->rlsContext.release; - } else { - context_info = targetPrivate->rlsContext.info; - context_release = NULL; + return FALSE; } MUTEX_UNLOCK(&targetPrivate->lock); - if (rlsFunction != NULL) { - (*rlsFunction)(target, - reach_info.flags & kSCNetworkReachabilityFlagsMask, - context_info); - } - - if (context_release != NULL) { - (*context_release)(context_info); - } - - return; + return TRUE; } @@ -6249,7 +5617,6 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, goto done; } -#ifdef HAVE_REACHABILITY_SERVER if (!targetPrivate->serverBypass) { if (!targetPrivate->serverActive) { @@ -6273,11 +5640,9 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, goto done; } - goto watch; } } -#endif // HAVE_REACHABILITY_SERVER /* schedule the SCNetworkReachability did-something-change handler */ @@ -6285,87 +5650,123 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, ok = FALSE; if (!onDemand && (hn_store == NULL)) { + CFMutableArrayRef keys; + CFMutableArrayRef patterns; + Boolean watch_dns_configuration = FALSE; + Boolean watch_dns_changes = FALSE; + Boolean watch_nwi = FALSE; + Boolean watch_onDemand_networking = FALSE; +#if !TARGET_OS_IPHONE + Boolean watch_power = FALSE; +#endif // !TARGET_OS_IPHONE + hn_store = SCDynamicStoreCreate(NULL, CFSTR("SCNetworkReachability"), - __SCNetworkReachabilityHandleChanges, + __SCNetworkReachabilityHandleStoreChanges, NULL); if (hn_store == NULL) { SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreCreate() failed")); return; } - __SCNetworkReachabilitySetNotifications(hn_store); - - ok = SCDynamicStoreSetDispatchQueue(hn_store, _hn_changes_queue()); + ReachabilityStoreInfo_keys(&keys, &patterns); + CFArrayAppendValue(keys, SCNETWORKREACHABILITY_TRIGGER_KEY); // force posting reach change + ok = SCDynamicStoreSetNotificationKeys(hn_store, keys, patterns); + CFRelease(keys); + CFRelease(patterns); if (!ok) { - SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreSetDispatchQueue() failed")); + SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreSetNotificationKeys() failed")); CFRelease(hn_store); hn_store = NULL; return; } - if (!dns_configuration_watch()) { - // if error - SCDynamicStoreSetDispatchQueue(hn_store, NULL); + ok = SCDynamicStoreSetDispatchQueue(hn_store, _hn_changes_queue()); + if (!ok) { + SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreSetDispatchQueue() failed")); CFRelease(hn_store); hn_store = NULL; - _SCErrorSet(kSCStatusFailed); return; } -#ifdef USE_DNSSERVICEGETADDRINFO - if (!dns_refresh_enable(_hn_changes_queue(), - hn_store, - __SCNetworkReachabilityHandleChanges)) { - // if error - dns_configuration_unwatch(); - SCDynamicStoreSetDispatchQueue(hn_store, NULL); - CFRelease(hn_store); - hn_store = NULL; - _SCErrorSet(kSCStatusFailed); - return; + // watch for network information changes + watch_nwi = nwi_refresh_enable(_hn_changes_queue()); + if (!watch_nwi) { + goto fail; } -#endif // USE_DNSSERVICEGETADDRINFO - - if (!D_nwiBypass) { - if (!onDemand_refresh_enable(_hn_changes_queue(), - hn_store, - __SCNetworkReachabilityHandleChanges)) { - // if error - dns_configuration_unwatch(); -#ifdef USE_DNSSERVICEGETADDRINFO - dns_refresh_disable(); -#endif // USE_DNSSERVICEGETADDRINFO - SCDynamicStoreSetDispatchQueue(hn_store, NULL); - CFRelease(hn_store); - hn_store = NULL; - _SCErrorSet(kSCStatusFailed); - return; - } - if (!nwi_refresh_enable(_hn_changes_queue(), - hn_store, - __SCNetworkReachabilityHandleChanges)) { - // if error - dns_configuration_unwatch(); -#ifdef USE_DNSSERVICEGETADDRINFO - dns_refresh_disable(); -#endif // USE_DNSSERVICEGETADDRINFO - onDemand_refresh_disable(); - SCDynamicStoreSetDispatchQueue(hn_store, NULL); - CFRelease(hn_store); - hn_store = NULL; - _SCErrorSet(kSCStatusFailed); - return; - } + // watch for DNS configuration (resolver reachability) changes + watch_dns_configuration = dns_configuration_watch(); + if (!watch_dns_configuration) { + goto fail; + } + + // watch for changes affecting DNS queries + watch_dns_changes = dns_refresh_enable(_hn_changes_queue()); + if (!watch_dns_changes) { + goto fail; + } + +#if !TARGET_OS_IPHONE + // watch for power capabilities (sleep/wake) changes + watch_power = power_refresh_enable(_hn_changes_queue()); + if (!watch_power) { + goto fail; + } +#endif // !TARGET_OS_IPHONE + + // watch for OnDemand network changes + watch_onDemand_networking = onDemand_refresh_enable(_hn_changes_queue()); + if (!watch_onDemand_networking) { + goto fail; } - hn_targets = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); + hn_targets = CFSetCreateMutable(NULL, 0, &kCFTypeSetCallBacks); ReachabilityStoreInfo_enable(TRUE); + + goto scheduled; + + fail : + + ok = FALSE; + + + + if (watch_onDemand_networking) { + onDemand_refresh_disable(); + } + +#if !TARGET_OS_IPHONE + if (watch_power) { + power_refresh_disable(); + } +#endif // !TARGET_OS_IPHONE + + if (watch_dns_changes) { + dns_refresh_disable(); + } + + if (watch_dns_configuration) { + dns_configuration_unwatch(); + } + + if (watch_nwi) { + nwi_refresh_disable(); + } + + SCDynamicStoreSetDispatchQueue(hn_store, NULL); + CFRelease(hn_store); + hn_store = NULL; + + _SCErrorSet(kSCStatusFailed); + + return; } + scheduled : + CFSetAddValue(hn_targets, target); ok = TRUE; @@ -6375,9 +5776,7 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, goto done; } -#ifdef HAVE_REACHABILITY_SERVER watch : -#endif // HAVE_REACHABILITY_SERVER if (!targetPrivate->scheduled) { CFRunLoopSourceContext context = { 0 // version @@ -6397,7 +5796,7 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, targetPrivate->rlList = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } - if (targetPrivate->type == reachabilityTypeName) { + if (isReachabilityTypeName(targetPrivate->type)) { /* * we're now scheduled so let's ensure that we * are starting with a clean slate before we @@ -6415,14 +5814,12 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, targetPrivate->if_index, targetPrivate->if_name); targetPrivate->info.flags |= kSCNetworkReachabilityFlagsFirstResolvePending; -#ifdef HAVE_REACHABILITY_SERVER _reach_set(&targetPrivate->serverInfo, &NOT_REACHABLE, targetPrivate->serverInfo.cycle, targetPrivate->if_index, targetPrivate->if_name); targetPrivate->serverInfo.flags |= kSCNetworkReachabilityFlagsFirstResolvePending; -#endif // HAVE_REACHABILITY_SERVER } @@ -6460,11 +5857,6 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, * this runLoop / runLoopMode */ CFRunLoopAddSource(runLoop, targetPrivate->rls, runLoopMode); - - if (targetPrivate->dnsRLS != NULL) { - // if we have an active async DNS query too - CFRunLoopAddSource(runLoop, targetPrivate->dnsRLS, runLoopMode); - } } _SC_schedule(target, runLoop, runLoopMode, targetPrivate->rlList); @@ -6485,15 +5877,13 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, * - set flags * - schedule notification to report status via callback */ -#ifdef HAVE_REACHABILITY_SERVER reach_info.flags |= (targetPrivate->info.flags & kSCNetworkReachabilityFlagsFirstResolvePending); -#endif // HAVE_REACHABILITY_SERVER _reach_set(&targetPrivate->info, &reach_info, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name); - __SCNetworkReachabilityPerformLocked(target); + __SCNetworkReachabilityUpdate(target); } else { /* if reachability status not available, async lookup started */ _reach_set(&targetPrivate->info, @@ -6501,13 +5891,11 @@ __SCNetworkReachabilityScheduleWithRunLoop(SCNetworkReachabilityRef target, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name); -#ifdef HAVE_REACHABILITY_SERVER _reach_set(&targetPrivate->serverInfo, &NOT_REACHABLE, targetPrivate->cycle, targetPrivate->if_index, targetPrivate->if_name); -#endif // HAVE_REACHABILITY_SERVER } ReachabilityStoreInfo_free(&store_info); } @@ -6585,11 +5973,6 @@ __SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef target, // if target is no longer scheduled for this runLoop / runLoopMode CFRunLoopRemoveSource(runLoop, targetPrivate->rls, runLoopMode); - if (targetPrivate->dnsRLS != NULL) { - // if we have an active async DNS query too - CFRunLoopRemoveSource(runLoop, targetPrivate->dnsRLS, runLoopMode); - } - if (n == 0) { // if *all* notifications have been unscheduled if (targetPrivate->onDemandServer != NULL) { @@ -6605,12 +5988,10 @@ __SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef target, } if (n == 0) { -#ifdef HAVE_REACHABILITY_SERVER // // Cancel our request for server monitoring // if (targetPrivate->serverActive) { - ok = __SCNetworkReachabilityServer_targetUnschedule(target); if (!ok) { SCLog(TRUE, LOG_DEBUG, @@ -6618,17 +5999,14 @@ __SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef target, _SCErrorSet(kSCStatusFailed); } } -#endif // HAVE_REACHABILITY_SERVER // if *all* notifications have been unscheduled targetPrivate->scheduled = FALSE; } -#ifdef HAVE_REACHABILITY_SERVER if (targetPrivate->serverActive) { goto unwatch; } -#endif // HAVE_REACHABILITY_SERVER if (n == 0) { if (targetPrivate->dnsActive) { @@ -6636,11 +6014,6 @@ __SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef target, dequeueDNSQuery(target); } - if (targetPrivate->dnsMP != MACH_PORT_NULL) { - // if we have an active [async] DNS query - dequeueAsyncDNSQuery(target, TRUE); - } - dispatch_sync(_hn_target_queue(), ^{ CFSetRemoveValue(hn_targets, target); @@ -6662,44 +6035,33 @@ __SCNetworkReachabilityUnscheduleFromRunLoop(SCNetworkReachabilityRef target, ReachabilityStoreInfo_enable(FALSE); ReachabilityStoreInfo_save(NULL); - - if (!D_nwiBypass) { - /* - * until we start monitoring again, ensure that - * any resources associated with tracking the - * network changes (nwi) have been released. - */ - nwi_refresh_disable(); - - /* - * until we start monitoring again, ensure that - * any resources associated with tracking the - * OnDemand configuration have been released. - */ - onDemand_refresh_disable(); - } - -#ifdef USE_DNSSERVICEGETADDRINFO /* * until we start monitoring again, ensure that - * any resources associated with restarting - * [m]DNS queries have been released. + * any resources associated with watching network + * and configuration changes have been released. */ + + + // OnDemand configuration + onDemand_refresh_disable(); + +#if !TARGET_OS_IPHONE + // sleep/wake & power capabilities + power_refresh_disable(); +#endif // !TARGET_OS_IPHONE + + // outstanding DNS queries dns_refresh_disable(); -#endif // USE_DNSSERVICEGETADDRINFO - /* - * until we start monitoring again, ensure that - * any resources associated with tracking the - * DNS configuration have been released. - */ + // DNS configuration dns_configuration_unwatch(); + + // nwi + nwi_refresh_disable(); }); } -#ifdef HAVE_REACHABILITY_SERVER unwatch : -#endif // HAVE_REACHABILITY_SERVER SCLog((_sc_debug && (_sc_log > 0)), LOG_INFO, CFSTR("%sunscheduled"), targetPrivate->log_prefix); diff --git a/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h b/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h index 69ad3af..9c88fb6 100644 --- a/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h +++ b/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2003-2013 Apple Inc. All rights reserved. + * Copyright (c) 2003-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -37,27 +37,10 @@ #include #include #include - -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) -#define HAVE_REACHABILITY_SERVER #include -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) - -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)) -#define HAVE_GETADDRINFO_INTERFACE_ASYNC_CALL -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)) - -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)) -#define HAVE_IPSEC_STATUS -#define HAVE_VPN_STATUS -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 40000)) -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) -#define USE_DNSSERVICEGETADDRINFO -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) - #pragma mark - #pragma mark SCNetworkReachability @@ -78,11 +61,17 @@ typedef enum { typedef enum { + // by-address SCNetworkReachability targets reachabilityTypeAddress, reachabilityTypeAddressPair, - reachabilityTypeName + // by-name SCNetworkReachability targets + reachabilityTypeName, + reachabilityTypePTR } ReachabilityAddressType; +#define isReachabilityTypeAddress(type) (type < reachabilityTypeName) +#define isReachabilityTypeName(type) (type >= reachabilityTypeName) + typedef struct { uint64_t cycle; @@ -101,13 +90,16 @@ typedef struct { /* lock */ pthread_mutex_t lock; + /* logging */ + Boolean quiet; + /* address type */ ReachabilityAddressType type; /* target host name */ const char *name; Boolean needResolve; - CFArrayRef resolvedAddresses; /* CFArray[CFData] */ + CFArrayRef resolvedAddresses; /* CFArray[CFData] or CFArray[CFString] */ int resolvedError; SCNetworkReachabilityFlags resolverFlags; @@ -130,16 +122,13 @@ typedef struct { SCNetworkReachabilityCallBack rlsFunction; SCNetworkReachabilityContext rlsContext; CFMutableArrayRef rlList; + unsigned int pending; // 0 == no notifications queued, else # to be delivered dispatch_group_t dispatchGroup; dispatch_queue_t dispatchQueue; // SCNetworkReachabilitySetDispatchQueue /* [async] DNS query info */ Boolean haveDNS; - mach_port_t dnsMP; // != MACH_PORT_NULL (if active) - CFMachPortRef dnsPort; // for CFRunLoop queries - CFRunLoopSourceRef dnsRLS; // for CFRunLoop queries - dispatch_source_t dnsSource; // for dispatch queries struct timeval dnsQueryStart; struct timeval dnsQueryEnd; @@ -167,16 +156,18 @@ typedef struct { Boolean dnsHaveError :1; // error during query Boolean dnsHaveV4 :1; // have IPv4 (A) reply Boolean dnsHaveV6 :1; // have IPv6 (AAAA) reply - Boolean dnsHaveTimeout:1; // no replies (A and/or AAAA) + Boolean dnsHavePTR :1; // have PTR reply + Boolean dnsHaveTimeout:1; // no replies (A, AAAA, or PTR) }; }; CFArrayRef dnsAddresses; // CFArray[CFData] Boolean dnsBlocked; // if DNS query blocked int dnsError; - DNSServiceRef dnsMain; + int dnsFailures; // # of unexpected DNSServiceXXX errors + int dnsGeneration; DNSServiceRef dnsTarget; + Boolean dnsNoAddressesSinceLastTimeout; -#ifdef HAVE_REACHABILITY_SERVER /* SCNetworkReachability server "client" info */ Boolean serverActive; Boolean serverBypass; @@ -192,8 +183,11 @@ typedef struct { unsigned int serverReferences; // how many [client] targets CFMutableDictionaryRef serverWatchers; // [client_id/target_id] watchers - Boolean useVPNAppLayer; // if App-Layer VPN, only use client mode -#endif // HAVE_REACHABILITY_SERVER + Boolean useNEVPN; + uid_t uid; + void *nePolicyResult; + Boolean serverBypassForVPN; // if serverBypassForVPN, only use client mode + Boolean resolverBypass; // set this flag to bypass resolving the name @@ -204,7 +198,6 @@ typedef struct { } SCNetworkReachabilityPrivate, *SCNetworkReachabilityPrivateRef; -#ifdef HAVE_REACHABILITY_SERVER // ------------------------------------------------------------ @@ -242,10 +235,14 @@ enum { }; #define REACH_TARGET_NAME "name" // string -#define REACH_TARGET_IF_INDEX "if_index" // int64 -#define REACH_TARGET_IF_NAME "if_name" // string + #define REACH_TARGET_LOCAL_ADDR "local_address" // data (struct sockaddr) #define REACH_TARGET_REMOTE_ADDR "remote_address" // data (struct sockaddr) + +#define REACH_TARGET_PTR_ADDR "ptr_address" // data (struct sockaddr) + +#define REACH_TARGET_IF_INDEX "if_index" // int64 +#define REACH_TARGET_IF_NAME "if_name" // string #define REACH_TARGET_ONDEMAND_BYPASS "ondemand_bypass" // bool #define REACH_TARGET_RESOLVER_BYPASS "resolver_bypass" // bool @@ -274,6 +271,7 @@ enum { }; #define REACH_STATUS_CYCLE "cycle" // uint64 +#define REACH_STATUS_DNS_FLAGS "dns_flags" // uint64 #define REACH_STATUS_FLAGS "flags" // uint64 #define REACH_STATUS_IF_INDEX "if_index" // uint64 #define REACH_STATUS_IF_NAME "if_name" // data (char if_name[IFNAMSIZ]) @@ -284,8 +282,6 @@ enum { // ------------------------------------------------------------ -#endif // HAVE_REACHABILITY_SERVER - __BEGIN_DECLS @@ -296,12 +292,10 @@ CFStringRef _SCNetworkReachabilityCopyTargetFlags (SCNetworkReachabilityRef target); void -__SCNetworkReachabilityPerform (SCNetworkReachabilityRef target); +__SCNetworkReachabilityUpdate (SCNetworkReachabilityRef target); void -__SCNetworkReachabilityPerformConcurrent (SCNetworkReachabilityRef target); - -#ifdef HAVE_REACHABILITY_SERVER +__SCNetworkReachabilityUpdateConcurrent (SCNetworkReachabilityRef target); dispatch_queue_t __SCNetworkReachability_concurrent_queue (void); @@ -336,8 +330,6 @@ __SC_checkResolverReachabilityInternal (SCDynamicStoreRef *storeP, uint32_t *resolver_if_index, int *dns_config_index); -#endif // HAVE_REACHABILITY_SERVER - static __inline__ void __SCNetworkReachabilityPrintFlags(SCNetworkReachabilityFlags flags) { @@ -402,4 +394,4 @@ __SCNetworkReachabilityPrintFlags(SCNetworkReachabilityFlags flags) __END_DECLS -#endif // _SCNETWORKREACHABILITYINTERNAL_H +#endif // _SCNETWORKREACHABILITYINTERNAL_H diff --git a/SystemConfiguration.fproj/SCNetworkService.c b/SystemConfiguration.fproj/SCNetworkService.c index 5a19657..489ee39 100644 --- a/SystemConfiguration.fproj/SCNetworkService.c +++ b/SystemConfiguration.fproj/SCNetworkService.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -35,6 +35,7 @@ #include "SCNetworkConfigurationInternal.h" #include #include +#include "SCPreferencesInternal.h" #include @@ -298,53 +299,6 @@ __SCNetworkServiceExistsForInterface(CFArrayRef services, SCNetworkInterfaceRef } -__private_extern__ CF_RETURNS_RETAINED CFStringRef -__SCNetworkServiceNextName(SCNetworkServiceRef service) -{ - CFArrayRef components; - CFIndex n; - CFStringRef name; - CFMutableArrayRef newComponents; - SInt32 suffix = 2; - - name = SCNetworkServiceGetName(service); - if (name == NULL) { - return NULL; - } - - components = CFStringCreateArrayBySeparatingStrings(NULL, name, CFSTR(" ")); - if (components != NULL) { - newComponents = CFArrayCreateMutableCopy(NULL, 0, components); - CFRelease(components); - } else { - newComponents = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - CFArrayAppendValue(newComponents, name); - } - - n = CFArrayGetCount(newComponents); - if (n > 1) { - CFStringRef str; - - str = CFArrayGetValueAtIndex(newComponents, n - 1); - suffix = CFStringGetIntValue(str); - if (suffix++ > 0) { - CFArrayRemoveValueAtIndex(newComponents, n - 1); - } else { - suffix = 2; - } - } - - name = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), (int)suffix); - CFArrayAppendValue(newComponents, name); - CFRelease(name); - - name = CFStringCreateByCombiningStrings(NULL, newComponents, CFSTR(" ")); - CFRelease(newComponents); - - return name; -} - - static void mergeDict(const void *key, const void *value, void *context) { @@ -537,8 +491,55 @@ SCNetworkServiceCopyAll(SCPreferencesRef prefs) } +__private_extern__ +CFArrayRef /* of SCNetworkInterfaceRef's */ +__SCNetworkServiceCopyAllInterfaces(SCPreferencesRef prefs) +{ + CFMutableArrayRef interfaces = NULL; + CFArrayRef services = NULL; + CFIndex servicesCount = 0; + SCNetworkServiceRef service = NULL; + SCNetworkInterfaceRef interface = NULL; + + services = SCNetworkServiceCopyAll(prefs); + if (services == NULL) { + goto done; + } + + servicesCount = CFArrayGetCount(services); + if (servicesCount == 0) { + goto done; + } + + interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex idx = 0; idx < servicesCount; idx++) { + service = CFArrayGetValueAtIndex(services, idx); + interface = SCNetworkServiceGetInterface(service); + + if (isA_SCNetworkInterface(interface) == NULL) { + continue; + } + CFArrayAppendValue(interfaces, interface); + } + + if (CFArrayGetCount(interfaces) == 0) { + // Do not return an empty array + CFRelease(interfaces); + interfaces = NULL; + } + + done: + + if (services != NULL) { + CFRelease(services); + } + return interfaces; +} + + /* - * build a list of all of a servives entity types that are associated + * build a list of all of a services entity types that are associated * with the services interface. The list will include : * * - entity types associated with the interface type (Ethernet, FireWire, PPP, ...) @@ -1064,6 +1065,7 @@ SCNetworkServiceGetName(SCNetworkServiceRef service) CFStringRef name = NULL; CFStringRef path; SCNetworkServicePrivateRef servicePrivate = (SCNetworkServicePrivateRef)service; + Boolean useSystemInterfaces = TRUE; if (!isA_SCNetworkService(service) || (servicePrivate->prefs == NULL)) { _SCErrorSet(kSCStatusInvalidArgument); @@ -1080,10 +1082,16 @@ SCNetworkServiceGetName(SCNetworkServiceRef service) entity = SCPreferencesPathGetValue(servicePrivate->prefs, path); CFRelease(path); + useSystemInterfaces = ((__SCPreferencesUsingDefaultPrefs(servicePrivate->prefs)) && + (__SCPreferencesGetLimitSCNetworkConfiguration(servicePrivate->prefs) == FALSE)); + if (isA_CFDictionary(entity)) { name = CFDictionaryGetValue(entity, kSCPropUserDefinedName); if (isA_CFString(name)) { servicePrivate->name = CFRetain(name); + if (useSystemInterfaces == FALSE) { + return servicePrivate->name; + } } } @@ -1598,7 +1606,10 @@ SCNetworkServiceSetPrimaryRank(SCNetworkServiceRef service, } if (servicePrivate->prefs != NULL) { - if ((newRank == kSCNetworkServicePrimaryRankDefault) || (newRank == kSCNetworkServicePrimaryRankNever)) { + switch (newRank) { + case kSCNetworkServicePrimaryRankDefault: + case kSCNetworkServicePrimaryRankNever: + case kSCNetworkServicePrimaryRankScoped: path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL, servicePrivate->serviceID, NULL); @@ -1630,7 +1641,8 @@ SCNetworkServiceSetPrimaryRank(SCNetworkServiceRef service, if (!ok) { goto done; } - } else { + break; + default: _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -1735,9 +1747,9 @@ SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifie return FALSE; } - prefixed_domain = CFStringCreateWithFormat(kCFAllocatorDefault, 0, CFSTR("%s%@"), EXTERNAL_ID_DOMAIN_PREFIX, identifierDomain); + prefixed_domain = CFStringCreateWithFormat(NULL, 0, CFSTR("%s%@"), EXTERNAL_ID_DOMAIN_PREFIX, identifierDomain); - prefs_path = SCPreferencesPathKeyCreateNetworkServiceEntity(kCFAllocatorDefault, + prefs_path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL, service_private->serviceID, NULL); @@ -1746,9 +1758,9 @@ SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifie CFMutableDictionaryRef new_service_dictionary; if (service_dictionary != NULL) { - new_service_dictionary = CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, service_dictionary); + new_service_dictionary = CFDictionaryCreateMutableCopy(NULL, 0, service_dictionary); } else { - new_service_dictionary = CFDictionaryCreateMutable(kCFAllocatorDefault, + new_service_dictionary = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -1766,7 +1778,7 @@ SCNetworkServiceSetExternalID(SCNetworkServiceRef service, CFStringRef identifie if (identifier != NULL) { if (service_private->externalIDs == NULL) { - service_private->externalIDs = CFDictionaryCreateMutable(kCFAllocatorDefault, + service_private->externalIDs = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -1800,7 +1812,7 @@ SCNetworkServiceCopyExternalID(SCNetworkServiceRef service, CFStringRef identifi return NULL; } - prefixed_domain = CFStringCreateWithFormat(kCFAllocatorDefault, 0, CFSTR("%s%@"), EXTERNAL_ID_DOMAIN_PREFIX, identifierDomain); + prefixed_domain = CFStringCreateWithFormat(NULL, 0, CFSTR("%s%@"), EXTERNAL_ID_DOMAIN_PREFIX, identifierDomain); if (service_private->externalIDs != NULL) { identifier = CFDictionaryGetValue(service_private->externalIDs, prefixed_domain); @@ -1813,7 +1825,7 @@ SCNetworkServiceCopyExternalID(SCNetworkServiceRef service, CFStringRef identifi CFStringRef prefs_path; CFDictionaryRef service_dictionary; - prefs_path = SCPreferencesPathKeyCreateNetworkServiceEntity(kCFAllocatorDefault, + prefs_path = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL, service_private->serviceID, NULL); @@ -1823,7 +1835,7 @@ SCNetworkServiceCopyExternalID(SCNetworkServiceRef service, CFStringRef identifi if (identifier != NULL) { CFRetain(identifier); if (service_private->externalIDs == NULL) { - service_private->externalIDs = CFDictionaryCreateMutable(kCFAllocatorDefault, + service_private->externalIDs = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -1842,3 +1854,535 @@ SCNetworkServiceCopyExternalID(SCNetworkServiceRef service, CFStringRef identifi return identifier; } + + +typedef struct { + CFStringRef oldServiceID; + CFStringRef newServiceID; +} serviceContext, *serviceContextRef; + + +static void +replaceServiceID(const void *value, void *context) +{ + CFStringRef link = NULL; + CFStringRef oldLink; + CFMutableArrayRef newServiceOrder; + CFStringRef path; + serviceContextRef service_context = (serviceContextRef)context; + CFArrayRef serviceOrder = NULL; + SCNetworkSetRef set = (SCNetworkSetRef)value; + SCNetworkSetPrivateRef setPrivate = (SCNetworkSetPrivateRef)set; + + // update service order + serviceOrder = SCNetworkSetGetServiceOrder(set); + if ((isA_CFArray(serviceOrder) != NULL) && + (CFArrayContainsValue(serviceOrder, + CFRangeMake(0, CFArrayGetCount(serviceOrder)), + service_context->oldServiceID) == TRUE)) { + CFIndex count; + CFIndex serviceOrderIndex; + + // replacing all instances of old service ID with new one + newServiceOrder = CFArrayCreateMutableCopy(NULL, 0, serviceOrder); + count = CFArrayGetCount(newServiceOrder); + for (serviceOrderIndex = 0; serviceOrderIndex < count; serviceOrderIndex++) { + CFStringRef serviceID; + + serviceID = CFArrayGetValueAtIndex(newServiceOrder, serviceOrderIndex); + if (CFEqual(serviceID, service_context->oldServiceID)) { + CFArraySetValueAtIndex(newServiceOrder, serviceOrderIndex, service_context->newServiceID); + } + } + SCNetworkSetSetServiceOrder(set, newServiceOrder); + CFRelease(newServiceOrder); + } + + // check if service with old serviceID is part of the set + path = SCPreferencesPathKeyCreateSetNetworkServiceEntity(NULL, // allocator + setPrivate->setID, // set + service_context->oldServiceID, // service + NULL); // entity + oldLink = SCPreferencesPathGetLink(setPrivate->prefs, path); + if (oldLink == NULL) { + // don't make any changes if service with old serviceID is not found + goto done; + } + + // remove link between "set" and old "service" + SCPreferencesPathRemoveValue(setPrivate->prefs, path); + CFRelease(path); + + // create the link between "set" and the "service" + path = SCPreferencesPathKeyCreateSetNetworkServiceEntity(NULL, // allocator + setPrivate->setID, // set + service_context->newServiceID, // service + NULL); // entity + link = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL, // allocator + service_context->newServiceID, // service + NULL); // entity + SCPreferencesPathSetLink(setPrivate->prefs, path, link); + + done: + + if (path != NULL) { + CFRelease(path); + } + if (link != NULL) { + CFRelease(link); + } + + return; +} + + +Boolean +_SCNetworkServiceSetServiceID(SCNetworkServiceRef service, CFStringRef newServiceID) +{ + CFArrayRef allSets = NULL; + CFDictionaryRef entity; + CFStringRef newPath; + Boolean ok = FALSE; + CFStringRef oldPath = NULL; + serviceContext service_context; + SCNetworkServicePrivateRef servicePrivate = (SCNetworkServicePrivateRef)service; + + if (!isA_SCNetworkService(service) || (servicePrivate->prefs == NULL)) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + + if (!isA_CFString(newServiceID)) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + + if (CFEqual(newServiceID, servicePrivate->serviceID)) { + // no work needs to be done if new service ID is equal to current service ID + return TRUE; + } + + newPath = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL, // allocator + newServiceID, // service + NULL); // entity + entity = SCPreferencesPathGetValue(servicePrivate->prefs, newPath); + if (isA_CFDictionary(entity)) { + // if the new service already exists + _SCErrorSet(kSCStatusKeyExists); + goto done; + } + + oldPath = SCPreferencesPathKeyCreateNetworkServiceEntity(NULL, // allocator + servicePrivate->serviceID, // service + NULL); // entity + entity = SCPreferencesPathGetValue(servicePrivate->prefs, oldPath); + if (!isA_CFDictionary(entity)) { + // if the service has already been removed + _SCErrorSet(kSCStatusNoKey); + goto done; + } + + ok = SCPreferencesPathSetValue(servicePrivate->prefs, newPath, entity); + if (!ok) goto done; + + ok = SCPreferencesPathRemoveValue(servicePrivate->prefs, oldPath); + if (!ok) goto done; + + allSets = SCNetworkSetCopyAll(servicePrivate->prefs); + + service_context.newServiceID = newServiceID; + service_context.oldServiceID = servicePrivate->serviceID; + + // find all sets w/oldServiceID and update + // ... and update the serviceOrder + CFArrayApplyFunction(allSets, + CFRangeMake(0, CFArrayGetCount(allSets)), + replaceServiceID, + &service_context); + + if (servicePrivate->interface != NULL) { + SCNetworkInterfaceRef newInterface; + + // duplicate the interface and associate the copy with the new service ID + newInterface = (SCNetworkInterfaceRef)__SCNetworkInterfaceCreateCopy(NULL, + servicePrivate->interface, + servicePrivate->prefs, + newServiceID); + CFRelease(servicePrivate->interface); + servicePrivate->interface = newInterface; + } + + // replace serviceID with new one + CFRetain(newServiceID); + CFRelease(servicePrivate->serviceID); + servicePrivate->serviceID = newServiceID; + + done: + + if (oldPath != NULL) { + CFRelease(oldPath); + } + if (newPath != NULL) { + CFRelease(newPath); + } + if (allSets != NULL) { + CFRelease(allSets); + } + return ok; +} + +#define kVPNProtocolPayloadInfo CFSTR("com.apple.payload") +#define kSCEntNetLoginWindowEAPOL CFSTR("EAPOL.LoginWindow") + +static void +copyInterfaceConfiguration(SCNetworkServiceRef oldService, SCNetworkServiceRef newService) +{ + SCNetworkInterfaceRef oldInterface; + SCNetworkInterfaceRef newInterface; + + oldInterface = SCNetworkServiceGetInterface(oldService); + newInterface = SCNetworkServiceGetInterface(newService); + + while (oldInterface != NULL) { + CFDictionaryRef configuration; + CFStringRef interfaceType; + + if (newInterface == NULL) { + // oops ... interface layering does not match + return; + } + + // copy interface configuration + configuration = SCNetworkInterfaceGetConfiguration(oldInterface); + + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + if (SCNetworkInterfaceSetConfiguration(newInterface, configuration) == FALSE) { + SCLog(_sc_debug, LOG_DEBUG, CFSTR("problem setting interface configuration")); + } + + } + + // special case: PPP/L2TP + IPSec + interfaceType = SCNetworkInterfaceGetInterfaceType(oldInterface); + if (CFEqual(interfaceType, kSCNetworkInterfaceTypePPP)) { + SCNetworkInterfaceRef childInterface; + + childInterface = SCNetworkInterfaceGetInterface(oldInterface); + if (childInterface != NULL) { + CFStringRef childInterfaceType; + + childInterfaceType = SCNetworkInterfaceGetInterfaceType(childInterface); + + if (CFEqual(childInterfaceType, kSCNetworkInterfaceTypeL2TP)) { + configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kSCEntNetIPSec); + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + if (SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCEntNetIPSec, configuration) == FALSE) { + SCLog(_sc_debug, LOG_DEBUG, CFSTR("problem setting child interface configuration")); + } + } + } + } + } + + // special case: 802.1x + configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kSCEntNetEAPOL); + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + (void) SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCEntNetEAPOL, configuration); + } + + // special case: Managed Client + configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kVPNProtocolPayloadInfo); + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + (void) SCNetworkInterfaceSetExtendedConfiguration(newInterface, kVPNProtocolPayloadInfo, configuration); + } + + // special case: Network Pref + configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kSCValNetPPPAuthProtocolEAP); + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + (void) SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCValNetPPPAuthProtocolEAP, configuration); + } + + // special case: Remote Pref + configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kSCEntNetLoginWindowEAPOL); + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + (void) SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCEntNetLoginWindowEAPOL, configuration); + } + + // special case: Network Extension + configuration = SCNetworkInterfaceGetExtendedConfiguration(oldInterface, kSCNetworkInterfaceTypeIPSec); + if ((configuration != NULL) || + (SCError() == kSCStatusOK)) { + (void) SCNetworkInterfaceSetExtendedConfiguration(newInterface, kSCNetworkInterfaceTypeIPSec, configuration); + } + + oldInterface = SCNetworkInterfaceGetInterface(oldInterface); + newInterface = SCNetworkInterfaceGetInterface(newInterface); + } + + return; +} + +static void +addProtocolToService(SCNetworkServiceRef service, CFStringRef protocolType, CFDictionaryRef configuration, Boolean enabled) +{ + Boolean ok; + SCNetworkProtocolRef protocol; + + protocol = SCNetworkServiceCopyProtocol(service, protocolType); + + if ((protocol == NULL) && + (SCError() == kSCStatusNoKey)) { + ok = SCNetworkServiceAddProtocolType(service, protocolType); + if (ok) { + protocol = SCNetworkServiceCopyProtocol(service, protocolType); + } + } + if (protocol != NULL) { + SCNetworkProtocolSetConfiguration(protocol, configuration); + SCNetworkProtocolSetEnabled(protocol, enabled); + CFRelease(protocol); + } + return; +} + + + +__private_extern__ +Boolean +__SCNetworkServiceMigrateNew(SCPreferencesRef prefs, + SCNetworkServiceRef service, + CFDictionaryRef bsdMapping, + CFDictionaryRef setMapping, + CFDictionaryRef serviceSetMapping) +{ + CFStringRef deviceName = NULL; + Boolean enabled; + SCNetworkInterfaceRef interface = NULL; + CFDictionaryRef interfaceEntity = NULL; + CFMutableDictionaryRef interfaceEntityMutable = NULL; + SCNetworkSetRef newSet = NULL; + SCPreferencesRef ni_prefs = NULL; + SCNetworkInterfaceRef ni_interface = NULL; + SCNetworkInterfaceRef oldInterface = NULL; + SCNetworkSetRef oldSet = NULL; + SCNetworkServiceRef newService = NULL; + CFStringRef serviceID = NULL; + SCNetworkServicePrivateRef servicePrivate = (SCNetworkServicePrivateRef) service; + CFMutableDictionaryRef servicesMutable = NULL; + CFArrayRef setList = NULL; + Boolean success = FALSE; + CFStringRef targetDeviceName = NULL; + CFStringRef userDefinedName = NULL; + CFStringRef userDefinedNameInterface = NULL; + CFArrayRef protocols = NULL; + CFStringRef subType; + + if ((isA_SCNetworkService(service) == NULL) || + (isA_SCNetworkInterface(servicePrivate->interface) == NULL) || + (servicePrivate->prefs == NULL)) { + goto done; + } + serviceID = servicePrivate->serviceID; + + newService = SCNetworkServiceCopy(prefs, serviceID); + if (newService != NULL) { + // Cannot add service if it already exists + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Cannot add service if it already exists.")); + goto done; + } + + oldInterface = SCNetworkServiceGetInterface(service); + interfaceEntity = __SCNetworkInterfaceCopyInterfaceEntity(oldInterface); + if (interfaceEntity == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: interfaceEntity does not exist")); + goto done; + } + interfaceEntityMutable = CFDictionaryCreateMutableCopy(NULL, 0, interfaceEntity); + CFRelease(interfaceEntity); + + if (isA_CFDictionary(bsdMapping) != NULL) { + deviceName = CFDictionaryGetValue(interfaceEntityMutable, kSCPropNetInterfaceDeviceName); + if (isA_CFString(deviceName) != NULL) { + targetDeviceName = CFDictionaryGetValue(bsdMapping, deviceName); + if (targetDeviceName != NULL) { + // update mapping + CFDictionarySetValue(interfaceEntityMutable, kSCPropNetInterfaceDeviceName, targetDeviceName); + ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs); + ni_interface = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, ni_prefs, targetDeviceName); + if (ni_interface != NULL) { + userDefinedNameInterface = __SCNetworkInterfaceGetUserDefinedName(ni_interface); + } + } + } + if (userDefinedNameInterface == NULL) { + userDefinedNameInterface = CFDictionaryGetValue(interfaceEntityMutable, kSCPropUserDefinedName); + } + } + subType = CFDictionaryGetValue(interfaceEntityMutable, kSCPropNetInterfaceSubType); + interface = _SCNetworkInterfaceCreateWithEntity(NULL, interfaceEntityMutable, NULL); + if (userDefinedNameInterface != NULL) { + __SCNetworkInterfaceSetUserDefinedName(interface, userDefinedNameInterface); + } + // Supporting PPPoE subtype + if (subType != NULL && + CFEqual(subType, kSCValNetInterfaceSubTypePPPoE)) { + SCNetworkInterfaceRef childInterface = SCNetworkInterfaceGetInterface(interface); + if (childInterface != NULL) { + __SCNetworkInterfaceSetUserDefinedName(childInterface, userDefinedNameInterface); + } + } + newService = SCNetworkServiceCreate(prefs, interface); + + if (newService == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Could not create new service")); + goto done; + } + + enabled = SCNetworkServiceGetEnabled(service); + SCNetworkServiceSetEnabled(newService, enabled); + + if (SCNetworkServiceEstablishDefaultConfiguration(newService) == FALSE) { + SCNetworkServiceRemove(newService); + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: SCNetworkServiceEstablishDefaultConfiguration failed")); + goto done; + } + + // Set service ID + _SCNetworkServiceSetServiceID(newService, serviceID); + + userDefinedName = SCNetworkServiceGetName(service); + if (userDefinedName != NULL && + SCNetworkServiceSetName(newService, userDefinedName) == FALSE) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Could not set service name to %@"), userDefinedName); + } + + // Determine which sets to add service + if (setMapping != NULL && + serviceSetMapping != NULL) { + setList = CFDictionaryGetValue(serviceSetMapping, service); + if (setList != NULL) { + for (CFIndex idx = 0; idx < CFArrayGetCount(setList); idx++) { + oldSet = CFArrayGetValueAtIndex(setList, idx); + newSet = CFDictionaryGetValue(setMapping, oldSet); + + if (newSet == NULL) { + continue; + } + if (SCNetworkSetAddService(newSet, newService) == FALSE) { + SCLog(_sc_debug, LOG_DEBUG, CFSTR("__SCNetworkServiceMigrateNew: Could not add service to set: %@"), newSet); + continue; + } + } + } + } + + protocols = SCNetworkServiceCopyProtocols(service); + if (protocols != NULL) { + + for (CFIndex idx = 0; idx < CFArrayGetCount(protocols); idx++) { + SCNetworkProtocolRef protocol = CFArrayGetValueAtIndex(protocols, idx); + CFDictionaryRef configuration = SCNetworkProtocolGetConfiguration(protocol); + CFStringRef protocolType = SCNetworkProtocolGetProtocolType(protocol); + enabled = SCNetworkProtocolGetEnabled(protocol); + addProtocolToService(newService, protocolType, configuration, enabled); + } + CFRelease(protocols); + } + + copyInterfaceConfiguration(service, newService); + + success = TRUE; +done: + if (interface != NULL) { + CFRelease(interface); + } + if (interfaceEntityMutable != NULL) { + CFRelease(interfaceEntityMutable); + } + if (newService != NULL) { + CFRelease(newService); + } + if (servicesMutable != NULL) { + CFRelease(servicesMutable); + } + if (ni_prefs != NULL) { + CFRelease(ni_prefs); + } + if (ni_interface != NULL) { + CFRelease(ni_interface); + } + return success; +} + + +__private_extern__ +Boolean +__SCNetworkServiceCreate(SCPreferencesRef prefs, + SCNetworkInterfaceRef interface, + CFStringRef userDefinedName) +{ + SCNetworkSetRef currentSet = NULL; + Boolean ok = FALSE; + SCNetworkServiceRef service = NULL; + + if (interface == NULL) { + goto done; + } + + if (userDefinedName == NULL) { + userDefinedName = __SCNetworkInterfaceGetUserDefinedName(interface); + if (userDefinedName == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: userDefinedName is NULL")); + goto done; + } + } + service = SCNetworkServiceCreate(prefs, interface); + if (service == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Failed to create service: %s"), SCErrorString(SCError())); + } else { + ok = SCNetworkServiceSetName(service, userDefinedName); + if (ok == FALSE) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Failed to set name: %s"), SCErrorString(SCError())); + SCNetworkServiceRemove(service); + goto done; + } + + ok = SCNetworkServiceEstablishDefaultConfiguration(service); + if (ok == FALSE) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Failed to establish default configuration: %s"), SCErrorString(SCError())); + SCNetworkServiceRemove(service); + goto done; + } + } + currentSet = SCNetworkSetCopyCurrent(prefs); + if (currentSet == NULL) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Could not copy current set")); + if (service != NULL) { + SCNetworkServiceRemove(service); + } + goto done; + } + if (service != NULL) { + ok = SCNetworkSetAddService(currentSet, service); + if (ok == FALSE) { + SCLog(TRUE, LOG_DEBUG, CFSTR("__SCNetworkServiceCreate: Could not add service to the current set")); + SCNetworkServiceRemove(service); + goto done; + } + } + + done: + if (service != NULL) { + CFRelease(service); + } + if (currentSet != NULL) { + CFRelease(currentSet); + } + return ok; +} diff --git a/SystemConfiguration.fproj/SCNetworkSet.c b/SystemConfiguration.fproj/SCNetworkSet.c index 41dd8d2..d9576f6 100644 --- a/SystemConfiguration.fproj/SCNetworkSet.c +++ b/SystemConfiguration.fproj/SCNetworkSet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2007, 2009-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -291,6 +291,108 @@ _serviceOrder_remove(SCNetworkSetRef set, SCNetworkServiceRef service) #define N_QUICK 16 +#define PREVENT_DUPLICATE_SERVICE_NAMES +#ifdef PREVENT_DUPLICATE_SERVICE_NAMES +static CFStringRef +copy_next_name(CFStringRef name) +{ + CFArrayRef components; + CFIndex n; + CFMutableArrayRef newComponents; + SInt32 suffix = 2; + + if (name == NULL) { + return NULL; + } + + components = CFStringCreateArrayBySeparatingStrings(NULL, name, CFSTR(" ")); + if (components != NULL) { + newComponents = CFArrayCreateMutableCopy(NULL, 0, components); + CFRelease(components); + } else { + newComponents = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFArrayAppendValue(newComponents, name); + } + + n = CFArrayGetCount(newComponents); + if (n > 1) { + CFStringRef str; + + str = CFArrayGetValueAtIndex(newComponents, n - 1); + suffix = CFStringGetIntValue(str); + if (suffix++ > 0) { + CFArrayRemoveValueAtIndex(newComponents, n - 1); + } else { + suffix = 2; + } + } + + name = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), (int)suffix); + CFArrayAppendValue(newComponents, name); + CFRelease(name); + + name = CFStringCreateByCombiningStrings(NULL, newComponents, CFSTR(" ")); + CFRelease(newComponents); + + return name; +} + + +static Boolean +ensure_unique_service_name(SCNetworkServiceRef service) +{ + SCNetworkInterfaceRef interface; + CFStringRef name; + Boolean ok = TRUE; + + interface = SCNetworkServiceGetInterface(service); + + name = SCNetworkServiceGetName(service); + if (name != NULL) { + CFRetain(name); + } + + while (TRUE) { + CFStringRef newName; + + ok = SCNetworkServiceSetName(service, name); + if (ok) { + break; + } + + if (SCError() != kSCStatusKeyExists) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("could not update service name for \"%@\": %s"), + SCNetworkInterfaceGetLocalizedDisplayName(interface), + SCErrorString(SCError())); + break; + } + + newName = copy_next_name(name); + if (newName == NULL) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("could not create unique name for \"%@\": %s"), + SCNetworkInterfaceGetLocalizedDisplayName(interface), + SCErrorString(SCError())); + break; + } + + // try again with the "new" name + if (name != NULL) { + CFRelease(name); + } + name = newName; + } + + if (name != NULL) { + CFRelease(name); + } + + return ok; +} +#endif // PREVENT_DUPLICATE_SERVICE_NAMES + + Boolean SCNetworkSetAddService(SCNetworkSetRef set, SCNetworkServiceRef service) { @@ -321,42 +423,6 @@ SCNetworkSetAddService(SCNetworkSetRef set, SCNetworkServiceRef service) return FALSE; } -#define PREVENT_DUPLICATE_SERVICE_NAMES -#ifdef PREVENT_DUPLICATE_SERVICE_NAMES - CFStringRef name; - - name = SCNetworkServiceGetName(service); - if (name != NULL) { - CFArrayRef services; - - services = SCNetworkSetCopyServices(set); - if (services != NULL) { - CFIndex i; - CFIndex n; - - n = CFArrayGetCount(services); - for (i = 0; i < n; i++) { - CFStringRef otherName; - SCNetworkServiceRef otherService; - - otherService = CFArrayGetValueAtIndex(services, i); - otherName = SCNetworkServiceGetName(otherService); - if ((otherName != NULL) && CFEqual(name, otherName)) { - /* - * if a service with the same "name" is - * already a member of the set. - */ - CFRelease(services); - _SCErrorSet(kSCStatusKeyExists); - return FALSE; - } - } - - CFRelease(services); - } - } -#endif // PREVENT_DUPLICATE_SERVICE_NAMES - //#define PREVENT_DUPLICATE_SETS #ifdef PREVENT_DUPLICATE_SETS CFArrayRef sets; @@ -405,6 +471,16 @@ SCNetworkSetAddService(SCNetworkSetRef set, SCNetworkServiceRef service) servicePrivate->serviceID, // service NULL); // entity ok = SCPreferencesPathSetLink(setPrivate->prefs, path, link); +#ifdef PREVENT_DUPLICATE_SERVICE_NAMES + if (ok) { + ok = ensure_unique_service_name(service); + if (!ok) { + // if we could not ensure a unique name, remove the (just added) + // link between the "set" and the "service" + (void) SCPreferencesPathRemoveValue(setPrivate->prefs, path); + } + } +#endif // PREVENT_DUPLICATE_SERVICE_NAMES CFRelease(path); CFRelease(link); if (!ok) { @@ -544,8 +620,8 @@ SCNetworkSetCopyAvailableInterfaces(SCNetworkSetRef set) CFMutableSetRef excluded = NULL; int i; CFArrayRef interfaces; - int n_interfaces; - int n_exclusions = 0; + CFIndex n_interfaces; + CFIndex n_exclusions = 0; SCPreferencesRef prefs; SCNetworkSetPrivateRef setPrivate; @@ -1369,8 +1445,23 @@ updateServices(CFArrayRef services, SCNetworkInterfaceRef interface) #endif // !TARGET_OS_IPHONE +static __inline__ Boolean +skipInterface(SCNetworkInterfaceRef interface) +{ + CFStringRef action; + + action = _SCNetworkInterfaceGetConfigurationAction(interface); + if (isA_CFString(action) && + CFEqual(action, kSCNetworkInterfaceConfigurationActionValueNone)) { + return TRUE; + } + + return FALSE; +} + + static Boolean -__SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CFArrayRef interfaces) +__SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CFArrayRef interfaces, Boolean excludeHidden) { CFSetRef excluded = NULL; CFIndex i; @@ -1420,6 +1511,12 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF SCNetworkInterfaceRef interface; interface = CFArrayGetValueAtIndex(interfaces, i); + + if (excludeHidden && skipInterface(interface)) { + // if not auto-configure + continue; + } + if ((excluded != NULL) && CFSetContainsValue(excluded, interface)) { // if this interface is a member of a Bond or Bridge @@ -1508,6 +1605,12 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF CFMutableArrayRef interface_list; interface = CFArrayGetValueAtIndex(interfaces, i); + + if (excludeHidden && skipInterface(interface)) { + // if not auto-configure + continue; + } + if ((excluded != NULL) && CFSetContainsValue(excluded, interface)) { // if this interface is a member of a Bond or Bridge @@ -1552,53 +1655,15 @@ __SCNetworkSetEstablishDefaultConfigurationForInterfaces(SCNetworkSetRef set, CF goto nextInterface; } - while (TRUE) { - CFStringRef newName; - - ok = SCNetworkSetAddService(set, service); - if (ok) { - break; - } - - if (SCError() != kSCStatusKeyExists) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("could not add service for \"%@\": %s\n"), - SCNetworkInterfaceGetLocalizedDisplayName(interface), - SCErrorString(SCError())); - SCNetworkServiceRemove(service); - CFRelease(service); - goto nextInterface; - } - - // we have two interfaces with the same service - // name, acquire a new, hopefully unique, name - - newName = __SCNetworkServiceNextName(service); - if (newName == NULL) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("could not set unique name for \"%@\": %s\n"), - SCNetworkInterfaceGetLocalizedDisplayName(interface), - SCErrorString(SCError())); - SCNetworkServiceRemove(service); - CFRelease(service); - goto nextInterface; - } - - ok = SCNetworkServiceSetName(service, newName); - CFRelease(newName); - if (ok) { - continue; - } - - if (SCError() != kSCStatusKeyExists) { - SCLog(TRUE, LOG_DEBUG, - CFSTR("could not set unique name for \"%@\": %s\n"), - SCNetworkInterfaceGetLocalizedDisplayName(interface), - SCErrorString(SCError())); - SCNetworkServiceRemove(service); - CFRelease(service); - goto nextInterface; - } + ok = SCNetworkSetAddService(set, service); + if (!ok) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("could not add service for \"%@\": %s\n"), + SCNetworkInterfaceGetLocalizedDisplayName(interface), + SCErrorString(SCError())); + SCNetworkServiceRemove(service); + CFRelease(service); + goto nextInterface; } CFRelease(service); @@ -1663,7 +1728,7 @@ SCNetworkSetEstablishDefaultConfiguration(SCNetworkSetRef set) interfaces = _SCNetworkInterfaceCopyAllWithPreferences(setPrivate->prefs); if (interfaces != NULL) { - updated = __SCNetworkSetEstablishDefaultConfigurationForInterfaces(set, interfaces); + updated = __SCNetworkSetEstablishDefaultConfigurationForInterfaces(set, interfaces, TRUE); CFRelease(interfaces); } @@ -1689,7 +1754,7 @@ SCNetworkSetEstablishDefaultInterfaceConfiguration(SCNetworkSetRef set, SCNetwor interfaces = CFArrayCreate(NULL, (const void **)&interface, 1, &kCFTypeArrayCallBacks); assert(interfaces != NULL); - updated = __SCNetworkSetEstablishDefaultConfigurationForInterfaces(set, interfaces); + updated = __SCNetworkSetEstablishDefaultConfigurationForInterfaces(set, interfaces, FALSE); CFRelease(interfaces); return updated; @@ -1841,3 +1906,88 @@ SCNetworkSetSetSelectedVPNService(SCNetworkSetRef set, SCNetworkServiceRef servi if (services != NULL) CFRelease(services); return ok; } + + +Boolean +_SCNetworkSetSetSetID(SCNetworkSetRef set, CFStringRef newSetID) +{ + SCNetworkSetRef currentSet = NULL; + SCNetworkSetPrivateRef currentSetPrivate = NULL; + CFDictionaryRef entity; + CFStringRef newPath; + Boolean ok = FALSE; + CFStringRef oldPath = NULL; + SCNetworkSetPrivateRef setPrivate = (SCNetworkSetPrivateRef)set; + Boolean updateCurrentSet = FALSE; + + if (!isA_SCNetworkSet(set)) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + + if (!isA_CFString(newSetID)) { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } + + // If newSetID is equal to current setID, our work is done + if (CFEqual(newSetID, setPrivate->setID)) { + return TRUE; + } + + newPath = SCPreferencesPathKeyCreateSet(NULL, newSetID); + entity = SCPreferencesPathGetValue(setPrivate->prefs, newPath); + if (isA_CFDictionary(entity)) { + // if the new set already exists + _SCErrorSet(kSCStatusKeyExists); + goto done; + } + + oldPath = SCPreferencesPathKeyCreateSet(NULL, setPrivate->setID); + entity = SCPreferencesPathGetValue(setPrivate->prefs, oldPath); + if (!isA_CFDictionary(entity)) { + // if the set has already been removed + _SCErrorSet(kSCStatusNoKey); + goto done; + } + + ok = SCPreferencesPathSetValue(setPrivate->prefs, newPath, entity); + if (!ok) { + goto done; + } + + ok = SCPreferencesPathRemoveValue(setPrivate->prefs, oldPath); + if (!ok) { + goto done; + } + + // update current set (if needed) + currentSet = SCNetworkSetCopyCurrent(setPrivate->prefs); + if (currentSet != NULL) { + currentSetPrivate = (SCNetworkSetPrivateRef)currentSet; + if (CFEqual(currentSetPrivate->setID, setPrivate->setID)) { + updateCurrentSet = TRUE; + } + CFRelease(currentSet); + } + + CFRetain(newSetID); + CFRelease(setPrivate->setID); + + setPrivate->setID = newSetID; + + if (updateCurrentSet) { + SCNetworkSetSetCurrent(set); + } + + done: + + if (oldPath != NULL) { + CFRelease(oldPath); + } + if (newPath != NULL) { + CFRelease(newPath); + } + + return ok; +} diff --git a/SystemConfiguration.fproj/SCNetworkSignature.c b/SystemConfiguration.fproj/SCNetworkSignature.c index 0a86bc4..4e2541f 100644 --- a/SystemConfiguration.fproj/SCNetworkSignature.c +++ b/SystemConfiguration.fproj/SCNetworkSignature.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2009, 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -236,7 +236,7 @@ CFArrayRef /* of CFStringRef's */ SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc) { CFMutableArrayRef active = NULL; - int count = 0; + CFIndex count = 0; CFStringRef global_setup_v4_key = NULL; CFDictionaryRef global_v4_dict; int i; @@ -280,7 +280,7 @@ SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc) global_v4_dict = CFDictionaryGetValue(info, global_setup_v4_key); - if (isA_CFDictionary(global_v4_dict) == NULL) { + if (isA_CFDictionary(global_v4_dict) != NULL) { service_order = CFDictionaryGetValue(global_v4_dict, kSCPropNetServiceOrder); if (isA_CFArray(service_order) != NULL) { @@ -329,7 +329,6 @@ SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc) } count = CFDictionaryGetCount(services_dict); - if (count != 0) { if (count > KEYS_STATIC_COUNT) { values = (const void * *)malloc(sizeof(*values) * count); @@ -400,12 +399,12 @@ SCNetworkSignatureCopyIdentifierForConnectedSocket(CFAllocatorRef alloc, { CFStringRef addresses_key; int af; - int count; + CFIndex count; int i; char if_name[IFNAMSIZ]; CFStringRef if_name_cf = NULL; - conninfo_t * info = NULL; - const void * * keys = NULL; + conninfo_t * info = NULL; + const void * * keys = NULL; #define KEYS_STATIC_COUNT 10 const void * keys_static[KEYS_STATIC_COUNT]; const void * local_ip_p; @@ -479,16 +478,26 @@ SCNetworkSignatureCopyIdentifierForConnectedSocket(CFAllocatorRef alloc, continue; } if (if_name_cf != NULL) { + CFStringRef confirmed_if; CFStringRef this_if; this_if = CFDictionaryGetValue(value, kSCPropInterfaceName); - if (isA_CFString(this_if) != NULL - && !CFEqual(this_if, if_name_cf)) { - /* interface name doesn't match */ + if (isA_CFString(this_if) == NULL + || !CFEqual(this_if, if_name_cf)) { + /* no interface or it doesn't match */ + continue; + } + confirmed_if + = CFDictionaryGetValue(value, + kSCPropConfirmedInterfaceName); + if (isA_CFString(confirmed_if) != NULL + && !CFEqual(confirmed_if, if_name_cf)) { + /* confirmed interface doesn't match */ continue; } } + addrs = CFDictionaryGetValue(value, addresses_key); if (isA_CFArray(addrs) == NULL) { continue; diff --git a/SystemConfiguration.fproj/SCP.c b/SystemConfiguration.fproj/SCP.c index 344b420..bc55bb0 100644 --- a/SystemConfiguration.fproj/SCP.c +++ b/SystemConfiguration.fproj/SCP.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2007-2009, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2007-2009, 2011, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,6 +34,7 @@ #include #include #include "SCPreferencesInternal.h" +#include "SCNetworkConfigurationInternal.h" #include #include @@ -104,7 +105,15 @@ __SCPreferencesPath(CFAllocatorRef allocator, */ pathStr = _SC_cfstring_to_cstring(path, NULL, 0, kCFStringEncodingASCII); if (pathStr == NULL) { - SCLog(_sc_verbose, LOG_DEBUG, CFSTR("could not convert path to C string")); + CFIndex pathLen; + + pathLen = CFStringGetMaximumSizeOfFileSystemRepresentation(path); + pathStr = CFAllocatorAllocate(NULL, pathLen, 0); + if (CFStringGetFileSystemRepresentation(path, pathStr, pathLen) == FALSE) { + SCLog(_sc_verbose, LOG_DEBUG, CFSTR("could not convert path to C string")); + CFAllocatorDeallocate(NULL, pathStr); + pathStr = NULL; + } } CFRelease(path); @@ -112,6 +121,77 @@ __SCPreferencesPath(CFAllocatorRef allocator, } +__private_extern__ +Boolean +__SCPreferencesGetLimitSCNetworkConfiguration(SCPreferencesRef prefs) +{ + SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; + + if (prefs == NULL) { + return FALSE; + } + return prefsPrivate->limit_SCNetworkConfiguration; +} + + +__private_extern__ +Boolean +__SCPreferencesUsingDefaultPrefs(SCPreferencesRef prefs) +{ + char *curPath; + Boolean isDefault = FALSE; + SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; + + curPath = prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path; + if (curPath != NULL) { + char* defPath; + + defPath = __SCPreferencesPath(NULL, + NULL, + (prefsPrivate->newPath == NULL)); + if (defPath != NULL) { + if (strcmp(curPath, defPath) == 0) { + isDefault = TRUE; + } + CFAllocatorDeallocate(NULL, defPath); + } + } + return isDefault; +} + +__private_extern__ +SCPreferencesRef +__SCPreferencesCreateNIPrefsFromPrefs(SCPreferencesRef prefs) +{ + CFMutableStringRef newPath = NULL; + CFURLRef newURL = NULL; + SCPreferencesRef ni_prefs = NULL; + SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; + char * prefsPath = __SCPreferencesPath(NULL, prefsPrivate->prefsID, FALSE); + + + newPath = CFStringCreateMutable(NULL, 0); + CFStringAppendFormat(newPath, NULL, CFSTR("%s"), prefsPath); + + CFStringFindAndReplace(newPath, PREFS_DEFAULT_CONFIG, + NETWORK_INTERFACES_PREFS, + CFRangeMake(0, CFStringGetLength(newPath)), + kCFCompareBackwards); + + newURL = CFURLCreateWithFileSystemPath(NULL, newPath, kCFURLPOSIXPathStyle, FALSE); + if (CFURLResourceIsReachable(newURL, NULL) == FALSE) { + ni_prefs = __SCNetworkCreateDefaultNIPrefs(newPath); + } + else { + ni_prefs = SCPreferencesCreate(NULL, prefsPrivate->name, newPath); + } + CFAllocatorDeallocate(NULL, prefsPath); + CFRelease(newPath); + CFRelease(newURL); + + return ni_prefs; +} + CFDataRef SCPreferencesGetSignature(SCPreferencesRef prefs) { @@ -183,3 +263,16 @@ SCDynamicStoreKeyCreatePreferences(CFAllocatorRef allocator, { return _SCPNotificationKey(allocator, prefsID, keyType); } + + +__private_extern__ void +__SCPreferencesSetLimitSCNetworkConfiguration(SCPreferencesRef prefs, + Boolean limit_SCNetworkConfiguration) +{ + SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; + + if (prefs == NULL) { + return; + } + prefsPrivate->limit_SCNetworkConfiguration = limit_SCNetworkConfiguration; +} diff --git a/SystemConfiguration.fproj/SCPCommit.c b/SystemConfiguration.fproj/SCPCommit.c index 6418cfc..15f5ef8 100644 --- a/SystemConfiguration.fproj/SCPCommit.c +++ b/SystemConfiguration.fproj/SCPCommit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2010-2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010-2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -200,7 +200,7 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs) if (save) { int fd; CFDataRef newPrefs; - int pathLen; + CFIndex pathLen; char * thePath; if (stat(prefsPrivate->path, &statBuf) == -1) { @@ -261,27 +261,6 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs) goto done; } -#if !TARGET_OS_IPHONE - /* synchronize the file's in-core state with that on disk */ - if (fsync(fd) == -1) { - _SCErrorSet(errno); - SCLog(_sc_verbose, LOG_ERR, CFSTR("SCPreferencesCommitChanges fsync() failed: %s"), strerror(errno)); - SCLog(_sc_verbose, LOG_ERR, CFSTR(" path = %s"), thePath); - (void) unlink(thePath); - CFAllocatorDeallocate(NULL, thePath); - (void) close(fd); - CFRelease(newPrefs); - goto done; - } - - /* - * ... and ask the drive to flush to the media - * - * Note: at present, this only works on HFS filesystems - */ - (void) fcntl(fd, F_FULLFSYNC, 0); -#endif // !TARGET_OS_IPHONE - /* new preferences have been written */ if (close(fd) == -1) { _SCErrorSet(errno); diff --git a/SystemConfiguration.fproj/SCPLock.c b/SystemConfiguration.fproj/SCPLock.c index fe2eca0..ba5201b 100644 --- a/SystemConfiguration.fproj/SCPLock.c +++ b/SystemConfiguration.fproj/SCPLock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2004-2010 Apple Inc. All rights reserved. + * Copyright (c) 2000-2010, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -195,7 +195,7 @@ createParentDirectory(const char *path) static void reportDelay(SCPreferencesRef prefs, struct timeval *delay, Boolean isStale) { - aslmsg m; + asl_object_t m; SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; char str[256]; @@ -217,7 +217,7 @@ reportDelay(SCPreferencesRef prefs, struct timeval *delay, Boolean isStale) (int)delay->tv_sec, delay->tv_usec / 1000, isStale ? " (stale)" : ""); - asl_free(m); + asl_release(m); return; } @@ -393,7 +393,7 @@ SCPreferencesLock(SCPreferencesRef prefs, Boolean wait) if (prefsPrivate->lockPath == NULL) { char *path; - int pathLen; + CFIndex pathLen; path = prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path; pathLen = strlen(path) + sizeof("-lock"); diff --git a/SystemConfiguration.fproj/SCPOpen.c b/SystemConfiguration.fproj/SCPOpen.c index 125ba24..89ccbf4 100644 --- a/SystemConfiguration.fproj/SCPOpen.c +++ b/SystemConfiguration.fproj/SCPOpen.c @@ -1,15 +1,15 @@ /* - * Copyright(c) 2000-2013 Apple Inc. All rights reserved. + * Copyright(c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -209,6 +209,7 @@ __SCPreferencesCreatePrivate(CFAllocatorRef allocator) prefsPrivate->accessed = FALSE; prefsPrivate->changed = FALSE; prefsPrivate->isRoot = (geteuid() == 0); + prefsPrivate->limit_SCNetworkConfiguration = FALSE; prefsPrivate->authorizationData = NULL; prefsPrivate->authorizationRequired = FALSE; prefsPrivate->helper_port = MACH_PORT_NULL; @@ -553,9 +554,9 @@ __SCPreferencesAccess(SCPreferencesRef prefs) /* * extract property list */ - xmlData = CFDataCreateMutable(allocator, statBuf.st_size); - CFDataSetLength(xmlData, statBuf.st_size); - if (read(fd, (void *)CFDataGetBytePtr(xmlData), statBuf.st_size) != statBuf.st_size) { + xmlData = CFDataCreateMutable(allocator, (CFIndex)statBuf.st_size); + CFDataSetLength(xmlData, (CFIndex)statBuf.st_size); + if (read(fd, (void *)CFDataGetBytePtr(xmlData), (CFIndex)statBuf.st_size) != (CFIndex)statBuf.st_size) { /* corrupt prefs file, start fresh */ SCLog(_sc_verbose, LOG_DEBUG, CFSTR("__SCPreferencesAccess read(): could not load preference data.")); CFRelease(xmlData); diff --git a/SystemConfiguration.fproj/SCPUnlock.c b/SystemConfiguration.fproj/SCPUnlock.c index 4a87fa9..d47c6c5 100644 --- a/SystemConfiguration.fproj/SCPUnlock.c +++ b/SystemConfiguration.fproj/SCPUnlock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2004-2010 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004-2010, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -89,7 +89,7 @@ __SCPreferencesUnlock_helper(SCPreferencesRef prefs) static void reportDelay(SCPreferencesRef prefs, struct timeval *delay) { - aslmsg m; + asl_object_t m; SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; char str[256]; @@ -110,7 +110,7 @@ reportDelay(SCPreferencesRef prefs, struct timeval *delay) prefsPrivate->prefsID, (int)delay->tv_sec, delay->tv_usec / 1000); - asl_free(m); + asl_release(m); return; } diff --git a/SystemConfiguration.fproj/SCPreferencesGetSpecificPrivate.h b/SystemConfiguration.fproj/SCPreferencesGetSpecificPrivate.h index d0d56e8..27374fb 100644 --- a/SystemConfiguration.fproj/SCPreferencesGetSpecificPrivate.h +++ b/SystemConfiguration.fproj/SCPreferencesGetSpecificPrivate.h @@ -54,6 +54,16 @@ SCPreferencesGetHostName ( SCPreferencesRef prefs ); +CFStringRef +_SCPreferencesCopyLocalHostName ( + SCPreferencesRef prefs + ); + +CFStringRef +_SCPreferencesCopyComputerName ( + SCPreferencesRef prefs, + CFStringEncoding *nameEncoding + ); __END_DECLS #endif /* _SCPREFERENCESGETSPECIFICPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCPreferencesInternal.h b/SystemConfiguration.fproj/SCPreferencesInternal.h index f4ab7da..78de1f8 100644 --- a/SystemConfiguration.fproj/SCPreferencesInternal.h +++ b/SystemConfiguration.fproj/SCPreferencesInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2007-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2007-2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -42,6 +42,9 @@ #define PREFS_DEFAULT_USER_DIR CFSTR("Library/Preferences") +#define NETWORK_INTERFACES_PREFS CFSTR("NetworkInterfaces.plist") +#define INTERFACES CFSTR("Interfaces") + /* Define the per-preference-handle structure */ typedef struct { @@ -97,6 +100,7 @@ typedef struct { Boolean accessed; Boolean changed; Boolean isRoot; + Boolean limit_SCNetworkConfiguration; /* authorization, helper */ CFDataRef authorizationData; @@ -141,6 +145,19 @@ CFStringRef _SCPNotificationKey (CFAllocatorRef allocator, CFStringRef prefsID, int keyType); +Boolean +__SCPreferencesGetLimitSCNetworkConfiguration (SCPreferencesRef prefs); + +void +__SCPreferencesSetLimitSCNetworkConfiguration + (SCPreferencesRef prefs, + Boolean limit_SCNetworkConfiguration); + +Boolean +__SCPreferencesUsingDefaultPrefs (SCPreferencesRef prefs); + +SCPreferencesRef +__SCPreferencesCreateNIPrefsFromPrefs (SCPreferencesRef prefs); __END_DECLS diff --git a/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c b/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c index 30029da..36dd87b 100644 --- a/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c +++ b/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2007, 2010 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2007, 2010, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -252,31 +252,10 @@ SecKeychainRef _SCSecKeychainCopySystemKeychain(void) { #if !TARGET_OS_IPHONE - SecPreferencesDomain domain; SecKeychainRef keychain = NULL; OSStatus status; - status = SecKeychainGetPreferenceDomain(&domain); - if (status != noErr) { - _SCErrorSet(status); - return NULL; - } - - status = SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem); - if (status != noErr) { - _SCErrorSet(status); - return NULL; - } - status = SecKeychainCopyDomainDefault(kSecPreferencesDomainSystem, &keychain); - if (status != noErr) { - _SCErrorSet(status); - (void) SecKeychainSetPreferenceDomain(domain); - if (keychain != NULL) CFRelease(keychain); - return NULL; - } - - status = SecKeychainSetPreferenceDomain(domain); if (status != noErr) { _SCErrorSet(status); if (keychain != NULL) CFRelease(keychain); @@ -465,7 +444,7 @@ _SCSecKeychainPasswordItemSet(SecKeychainRef keychain, code = CFErrorGetCode(error); CFRelease(error); } - _SCErrorSet(code); + _SCErrorSet((int)code); return FALSE; } #endif // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070) @@ -505,7 +484,7 @@ _SCSecKeychainPasswordItemSet(SecKeychainRef keychain, attributes[n].tag = tag; attributes[n].data = _SC_cfstring_to_cstring(str, NULL, 0, kCFStringEncodingUTF8); - attributes[n].length = strlen(attributes[n].data); + attributes[n].length = (UInt32)strlen(attributes[n].data); n++; } @@ -518,10 +497,10 @@ _SCSecKeychainPasswordItemSet(SecKeychainRef keychain, // keychain item exists if (password != NULL) { pw = CFDataGetBytePtr(password); - pw_len = CFDataGetLength(password); + pw_len = (UInt32)CFDataGetLength(password); } - attributeList.count = n; + attributeList.count = (UInt32)n; status = SecKeychainItemModifyContent(item, &attributeList, pw_len, @@ -537,10 +516,10 @@ _SCSecKeychainPasswordItemSet(SecKeychainRef keychain, goto done; } - attributeList.count = n; + attributeList.count = (UInt32)n; status = SecKeychainItemCreateFromContent(kSecGenericPasswordItemClass, &attributeList, - CFDataGetLength(password), + (UInt32)CFDataGetLength(password), CFDataGetBytePtr(password), keychain, access, diff --git a/SystemConfiguration.fproj/SCPrivate.h b/SystemConfiguration.fproj/SCPrivate.h index 6846033..e68fac8 100644 --- a/SystemConfiguration.fproj/SCPrivate.h +++ b/SystemConfiguration.fproj/SCPrivate.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -68,6 +68,8 @@ #define _SC_SERVER_PROG "configd_sim" #endif // !TARGET_IPHONE_SIMULATOR +#define INSTALL_ENVIRONMENT "__OSINSTALL_ENVIRONMENT" +#define INSTALL_FACILITY "install" /* atomic operations */ #define _SC_ATOMIC_CMPXCHG(p, o, n) __sync_bool_compare_and_swap((p), (o), (n)) @@ -119,6 +121,13 @@ extern int _sc_log; /* 0 if SC messages should be written to stdout/stderr, */ #define kSCNetworkReachabilityOptionLocalAddress CFSTR("local-address") +/*! + @constant kSCNetworkReachabilityOptionPTRAddress + @discussion A CFData wrapping a "struct sockaddr" that represents + the reverse-address to be queried. + */ +#define kSCNetworkReachabilityOptionPTRAddress CFSTR("ptr-address") + /*! @constant kSCNetworkReachabilityOptionRemoteAddress @discussion A CFData wrapping a "struct sockaddr" that represents @@ -403,7 +412,7 @@ CFStringRef _SCCopyDescription (CFTypeRef cf, void SCLog (Boolean condition, int level, CFStringRef formatString, - ...); + ...) CF_FORMAT_FUNCTION(3, 4); enum { kSCLoggerFlagsNone = 0x0, @@ -431,7 +440,8 @@ typedef struct SCLogger * SCLoggerRef; void SCLoggerLog (SCLoggerRef logger, int level, CFStringRef formatString, - ...) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0); + ...) CF_FORMAT_FUNCTION(3, 4) + __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0); /*! @function SCLoggerVLog @@ -470,11 +480,11 @@ void SCLoggerVLog (SCLoggerRef logger, @result The specified message will be written to the system message logger (See syslogd(8)). */ -void SCLOG (aslclient asl, - aslmsg msg, +void SCLOG (asl_object_t asl, + asl_object_t msg, int level, CFStringRef formatString, - ...); + ...) CF_FORMAT_FUNCTION(4, 5); #endif @@ -491,7 +501,7 @@ void SCLOG (aslclient asl, void SCPrint (Boolean condition, FILE *stream, CFStringRef formatString, - ...); + ...) CF_FORMAT_FUNCTION(3, 4); @@ -507,7 +517,7 @@ void SCPrint (Boolean condition, void SCTrace (Boolean condition, FILE *stream, CFStringRef formatString, - ...); + ...) CF_FORMAT_FUNCTION(3, 4); /*! @function SCLoggerCreate @@ -563,6 +573,38 @@ SCNetworkProxiesCopyMatching (CFDictionaryRef globalConfiguration, CFStringRef server, CFStringRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +#define kSCProxiesMatchServer CFSTR("Server") /* CFString */ +#define kSCProxiesMatchInterface CFSTR("Interface") /* CFString */ +#define kSCProxiesMatchExecutableUUID CFSTR("UUID") /* CFUUID */ + +/*! + @function SCNetworkProxiesCopyMatchingWithOptions + @discussion + @param globalConfiguration the proxy dictionary currently returned + by SCDynamicStoreCopyProxies(). + @param options A dictionary containing any (or none) of the following: + key value description + ------------------------------------------------------------------------------------------------ + kSCProxiesMatchServer CFString The hostname of interest; do not include if no + specific hostname should be used in selecting the + proxy configurations. + kSCProxiesMatchInterface CFString If present, specifies the network interface + (e.g. "en0", "en1", ...) whose proxy configuration + should be returned. If not present, then proxy usage + will not be scoped to an interface. + kSCProxiesMatchExecutableUUID CFUUID If present, specifies the Mach-O UUID of the executable + on whose behalf the match operation is being performed. + If kSCProxiesMatchInterface is present then this option + is ignored. If not present, then the Mach-O UUID of + the current process is used. The Mach-O UUID is used + to match application-specific proxy configurations + (i.e., if per-app VPN rules are in effect). + @result A CFArray containing the proxy configurations associated with the given options. + */ +CFArrayRef +SCNetworkProxiesCopyMatchingWithOptions (CFDictionaryRef globalConfiguration, + CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); + extern const CFStringRef kSCProxiesNoGlobal; /*! @@ -668,6 +710,33 @@ Boolean _SC_domainEndsWithDomain (CFStringRef compare_domain, CFStringRef match_domain); +/*! + @function _SC_hostMatchesDomain + @discussion Checks if a hostname matches a domain. "*" not accepted as a domain. Top-level domain matching not supported. + The algorithm is as follows: + + 1. Trim .’s and *’s from the front and back of hostname and domain. + 2. If the number of .’s left in the hostname and domain are equal, require an exact match. + 3. Else, if the number of .’s in the hostname is greater than the number of .’s in the domain, and the number of .’s in the domain is greater than zero, append a . to the front of the domain and do a suffix match on the hostname. + 4. Else, fail. + + Examples + www.apple.com > * : NO + www.apple.com > apple.com : YES + www.badapple.com > apple.com : NO + www.apple.com > .com : NO + foobar > foobar : YES + www.apple.com > www.apple.com : YES + www.apple.com... > .*.apple.com. : YES + + @param hostname The specific hostname to check. + @param domain The domain to be matched. + @return TRUE if the hostname matches the domain. FALSE otherwise. + */ +Boolean +_SC_hostMatchesDomain (CFStringRef hostname, + CFStringRef domain); + #pragma mark - #pragma mark NetBIOS @@ -776,36 +845,8 @@ _SC_isAppleInternal() #define MODEL CFSTR("Model") -static __inline__ CFStringRef -_SC_hw_model() -{ - /* - * S_model - * Hardware model for this network configuration. - */ - static CFStringRef model = NULL; - - if (model == NULL) { - char hwModel[64]; - int mib[] = { CTL_HW, HW_MODEL }; - size_t n = sizeof(hwModel); - int ret; - - // get HW model name - bzero(&hwModel, sizeof(hwModel)); - ret = sysctl(mib, sizeof(mib) / sizeof(mib[0]), &hwModel, &n, NULL, 0); - if (ret != 0) { - SCLog(TRUE, LOG_ERR, CFSTR("sysctl() CTL_HW/HW_MODEL failed: %s"), strerror(errno)); - return NULL; - } - hwModel[sizeof(hwModel) - 1] = '\0'; - - model = CFStringCreateWithCString(NULL, hwModel, kCFStringEncodingASCII); - } - - return model; - -} +CFStringRef +_SC_hw_model (Boolean trim); /* * debugging diff --git a/SystemConfiguration.fproj/SCProxies.c b/SystemConfiguration.fproj/SCProxies.c index 9fe060d..a7e288e 100644 --- a/SystemConfiguration.fproj/SCProxies.c +++ b/SystemConfiguration.fproj/SCProxies.c @@ -446,26 +446,46 @@ SCDynamicStoreCopyProxiesWithOptions(SCDynamicStoreRef store, CFDictionaryRef op } -CFArrayRef -SCNetworkProxiesCopyMatching(CFDictionaryRef globalConfiguration, - CFStringRef server, - CFStringRef interface) +static CFArrayRef +_SCNetworkProxiesCopyMatchingInternal(CFDictionaryRef globalConfiguration, + CFStringRef server, + CFStringRef interface, + CFDictionaryRef options) { CFMutableDictionaryRef newProxy; - static const audit_token_t null_audit = KERNEL_AUDIT_TOKEN_VALUE; - UUID_DEFINE(null_uuid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + uuid_t match_uuid; CFArrayRef proxies = NULL; CFDictionaryRef proxy; int sc_status = kSCStatusOK; - CFStringRef serviceID; CFStringRef trimmed = NULL; + if (!isA_CFDictionary(globalConfiguration)) { // if no proxy configuration _SCErrorSet(kSCStatusOK); return NULL; } + uuid_clear(match_uuid); + + if (isA_CFDictionary(options)) { + CFUUIDRef euuid; + + interface = CFDictionaryGetValue(options, kSCProxiesMatchInterface); + interface = isA_CFString(interface); + + server = CFDictionaryGetValue(options, kSCProxiesMatchServer); + server = isA_CFString(server); + + euuid = CFDictionaryGetValue(options, kSCProxiesMatchExecutableUUID); + euuid = isA_CFType(euuid, CFUUIDGetTypeID()); + + if (euuid != NULL) { + CFUUIDBytes uuid_bytes = CFUUIDGetUUIDBytes(euuid); + uuid_copy(match_uuid, (const uint8_t *)&uuid_bytes); + } + } + if (interface != NULL) { CFDictionaryRef scoped; @@ -506,48 +526,6 @@ SCNetworkProxiesCopyMatching(CFDictionaryRef globalConfiguration, return proxies; } - // Check for app-layer VPN proxy results (with or without server) - serviceID = VPNAppLayerCopyMatchingService(null_audit, 0, null_uuid, NULL, server, NULL, NULL); - if (serviceID != NULL) { - CFDictionaryRef serviceProxies = NULL; - - serviceProxies = CFDictionaryGetValue(globalConfiguration, kSCPropNetProxiesServices); - if (serviceProxies == NULL) { - _SCErrorSet(kSCStatusOK); - CFRelease(serviceID); - goto app_layer_no_proxies; - } - if (!isA_CFDictionary(serviceProxies)) { - _SCErrorSet(kSCStatusFailed); - CFRelease(serviceID); - goto app_layer_no_proxies; - } - - proxy = CFDictionaryGetValue(serviceProxies, serviceID); - CFRelease(serviceID); - if (proxy == NULL) { - _SCErrorSet(kSCStatusOK); - goto app_layer_no_proxies; - } - if (!isA_CFDictionary(proxy)) { - _SCErrorSet(kSCStatusFailed); - goto app_layer_no_proxies; - } - - proxies = CFArrayCreate(NULL, (const void **)&proxy, 1, &kCFTypeArrayCallBacks); - return proxies; - - app_layer_no_proxies: - - /* - * Rather than returning NULL, return an empty proxy configuration. - * This ensures that the global proxy configuration will not be used. - */ - proxy = CFDictionaryCreate(NULL, NULL, NULL, 0, NULL, NULL); - proxies = CFArrayCreate(NULL, (const void **)&proxy, 1, &kCFTypeArrayCallBacks); - CFRelease(proxy); - return proxies; - } if (server != NULL) { CFIndex i; @@ -662,3 +640,18 @@ SCNetworkProxiesCopyMatching(CFDictionaryRef globalConfiguration, return proxies; } + +CFArrayRef +SCNetworkProxiesCopyMatching(CFDictionaryRef globalConfiguration, + CFStringRef server, + CFStringRef interface) +{ + return _SCNetworkProxiesCopyMatchingInternal(globalConfiguration, server, interface, NULL); +} + +CFArrayRef +SCNetworkProxiesCopyMatchingWithOptions(CFDictionaryRef globalConfiguration, + CFDictionaryRef options) +{ + return _SCNetworkProxiesCopyMatchingInternal(globalConfiguration, NULL, NULL, options); +} diff --git a/SystemConfiguration.fproj/SCSchemaDefinitions.c b/SystemConfiguration.fproj/SCSchemaDefinitions.c index 4df5ad6..02b3bf8 100644 --- a/SystemConfiguration.fproj/SCSchemaDefinitions.c +++ b/SystemConfiguration.fproj/SCSchemaDefinitions.c @@ -13,6 +13,7 @@ const CFStringRef kSCPropInterfaceName = CFSTR("Inte const CFStringRef kSCPropMACAddress = CFSTR("MACAddress"); const CFStringRef kSCPropUserDefinedName = CFSTR("UserDefinedName"); const CFStringRef kSCPropVersion = CFSTR("Version"); +const CFStringRef kSCPropConfirmedInterfaceName = CFSTR("ConfirmedInterfaceName"); const CFStringRef kSCPrefCurrentSet = CFSTR("CurrentSet"); const CFStringRef kSCPrefNetworkServices = CFSTR("NetworkServices"); const CFStringRef kSCPrefSets = CFSTR("Sets"); @@ -28,9 +29,9 @@ const CFStringRef kSCCompUsers = CFSTR("User const CFStringRef kSCCompAnyRegex = CFSTR("[^/]+"); const CFStringRef kSCEntNetAirPort = CFSTR("AirPort"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCEntNetAppleTalk = CFSTR("AppleTalk"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE const CFStringRef kSCEntNetDHCP = CFSTR("DHCP"); const CFStringRef kSCEntNetDNS = CFSTR("DNS"); @@ -44,9 +45,9 @@ const CFStringRef kSCEntNetL2TP = CFSTR("L2TP const CFStringRef kSCEntNetLink = CFSTR("Link"); const CFStringRef kSCEntNetModem = CFSTR("Modem"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCEntNetNetInfo = CFSTR("NetInfo"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE const CFStringRef kSCEntNetPPP = CFSTR("PPP"); const CFStringRef kSCEntNetPPPoE = CFSTR("PPPoE"); @@ -54,15 +55,19 @@ const CFStringRef kSCEntNetPPPSerial = CFSTR("PPPS const CFStringRef kSCEntNetPPTP = CFSTR("PPTP"); const CFStringRef kSCEntNetProxies = CFSTR("Proxies"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCEntNetSMB = CFSTR("SMB"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE const CFStringRef kSCEntNet6to4 = CFSTR("6to4"); +const CFStringRef kSCEntNetActiveDuringSleepRequested = CFSTR("ActiveDuringSleepRequested"); +const CFStringRef kSCEntNetActiveDuringSleepSupported = CFSTR("ActiveDuringSleepSupported"); +const CFStringRef kSCEntNetAppLayer = CFSTR("AppLayer"); -const CFStringRef kSCEntNetAppLayer = CFSTR("AppLayer"); const CFStringRef kSCEntNetEAPOL = CFSTR("EAPOL"); +const CFStringRef kSCEntNetIPv4RouterARPFailure = CFSTR("IPv4RouterARPFailure"); +const CFStringRef kSCEntNetIPv4RouterARPAlive = CFSTR("IPv4RouterARPAlive"); const CFStringRef kSCEntNetLinkIssues = CFSTR("LinkIssues"); const CFStringRef kSCEntNetLinkQuality = CFSTR("LinkQuality"); const CFStringRef kSCEntNetLoopback = CFSTR("Loopback"); @@ -89,7 +94,7 @@ const CFStringRef kSCValNetAirPortJoinModeRecent = CFSTR("Rece const CFStringRef kSCValNetAirPortJoinModeStrongest = CFSTR("Strongest"); const CFStringRef kSCValNetAirPortAuthPasswordEncryptionKeychain = CFSTR("Keychain"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCPropNetAppleTalkComputerName = CFSTR("ComputerName"); const CFStringRef kSCPropNetAppleTalkComputerNameEncoding = CFSTR("ComputerNameEncoding"); const CFStringRef kSCPropNetAppleTalkConfigMethod = CFSTR("ConfigMethod"); @@ -102,7 +107,7 @@ const CFStringRef kSCPropNetAppleTalkSeedZones = CFSTR("Seed const CFStringRef kSCValNetAppleTalkConfigMethodNode = CFSTR("Node"); const CFStringRef kSCValNetAppleTalkConfigMethodRouter = CFSTR("Router"); const CFStringRef kSCValNetAppleTalkConfigMethodSeedRouter = CFSTR("SeedRouter"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE @@ -145,6 +150,8 @@ const CFStringRef kSCValNetInterfaceSubTypePPPoE = CFSTR("PPPo const CFStringRef kSCValNetInterfaceSubTypePPPSerial = CFSTR("PPPSerial"); const CFStringRef kSCValNetInterfaceSubTypePPTP = CFSTR("PPTP"); const CFStringRef kSCValNetInterfaceSubTypeL2TP = CFSTR("L2TP"); + + const CFStringRef kSCValNetInterfaceTypeLoopback = CFSTR("Loopback"); const CFStringRef kSCValNetInterfaceTypeVPN = CFSTR("VPN"); const CFStringRef kSCPropNetIPSecAuthenticationMethod = CFSTR("AuthenticationMethod"); @@ -188,12 +195,14 @@ const CFStringRef kSCValNetIPv4ConfigMethodINFORM = CFSTR("INFO const CFStringRef kSCValNetIPv4ConfigMethodLinkLocal = CFSTR("LinkLocal"); const CFStringRef kSCValNetIPv4ConfigMethodManual = CFSTR("Manual"); const CFStringRef kSCValNetIPv4ConfigMethodPPP = CFSTR("PPP"); +const CFStringRef kSCPropNetIPv4AdditionalRoutes = CFSTR("AdditionalRoutes"); const CFStringRef kSCPropNetIPv4ExcludedRoutes = CFSTR("ExcludedRoutes"); const CFStringRef kSCPropNetIPv4IncludedRoutes = CFSTR("IncludedRoutes"); const CFStringRef kSCValNetIPv4ConfigMethodFailover = CFSTR("Failover"); const CFStringRef kSCPropNetIPv4RouteDestinationAddress = CFSTR("DestinationAddress"); const CFStringRef kSCPropNetIPv4RouteSubnetMask = CFSTR("SubnetMask"); const CFStringRef kSCPropNetIPv4RouteGatewayAddress = CFSTR("GatewayAddress"); +const CFStringRef kSCPropNetIPv4RouteInterfaceName = CFSTR("InterfaceName"); const CFStringRef kSCPropNetIPv4ARPResolvedHardwareAddress = CFSTR("ARPResolvedHardwareAddress"); const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress = CFSTR("ARPResolvedIPAddress"); const CFStringRef kSCPropNetIPv6Addresses = CFSTR("Addresses"); @@ -207,14 +216,17 @@ const CFStringRef kSCValNetIPv6ConfigMethodLinkLocal = CFSTR("Link const CFStringRef kSCValNetIPv6ConfigMethodManual = CFSTR("Manual"); const CFStringRef kSCValNetIPv6ConfigMethodRouterAdvertisement = CFSTR("RouterAdvertisement"); const CFStringRef kSCValNetIPv6ConfigMethod6to4 = CFSTR("6to4"); +const CFStringRef kSCPropNetIPv6AdditionalRoutes = CFSTR("AdditionalRoutes"); const CFStringRef kSCPropNetIPv6ExcludedRoutes = CFSTR("ExcludedRoutes"); const CFStringRef kSCPropNetIPv6IncludedRoutes = CFSTR("IncludedRoutes"); const CFStringRef kSCPropNetIPv6RouteDestinationAddress = CFSTR("DestinationAddress"); const CFStringRef kSCPropNetIPv6RoutePrefixLength = CFSTR("PrefixLength"); const CFStringRef kSCPropNetIPv6RouteGatewayAddress = CFSTR("GatewayAddress"); +const CFStringRef kSCPropNetIPv6RouteInterfaceName = CFSTR("InterfaceName"); const CFStringRef kSCPropNet6to4Relay = CFSTR("Relay"); const CFStringRef kSCPropNetLinkActive = CFSTR("Active"); const CFStringRef kSCPropNetLinkDetaching = CFSTR("Detaching"); +const CFStringRef kSCPropNetLinkExpensive = CFSTR("Expensive"); const CFStringRef kSCPropNetLinkIssuesModuleID = CFSTR("ModuleID"); const CFStringRef kSCPropNetLinkIssuesInfo = CFSTR("Info"); const CFStringRef kSCPropNetLinkIssuesTimeStamp = CFSTR("TimeStamp"); @@ -242,7 +254,7 @@ const CFStringRef kSCValNetModemDialModeIgnoreDialTone = CFSTR("Igno const CFStringRef kSCValNetModemDialModeManual = CFSTR("Manual"); const CFStringRef kSCValNetModemDialModeWaitForDialTone = CFSTR("WaitForDialTone"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCPropNetNetInfoBindingMethods = CFSTR("BindingMethods"); const CFStringRef kSCPropNetNetInfoServerAddresses = CFSTR("ServerAddresses"); const CFStringRef kSCPropNetNetInfoServerTags = CFSTR("ServerTags"); @@ -251,7 +263,7 @@ const CFStringRef kSCValNetNetInfoBindingMethodsBroadcast = CFSTR("Broa const CFStringRef kSCValNetNetInfoBindingMethodsDHCP = CFSTR("DHCP"); const CFStringRef kSCValNetNetInfoBindingMethodsManual = CFSTR("Manual"); const CFStringRef kSCValNetNetInfoDefaultServerTag = CFSTR("network"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE const CFStringRef kSCPropNetPPPACSPEnabled = CFSTR("ACSPEnabled"); const CFStringRef kSCPropNetPPPConnectTime = CFSTR("ConnectTime"); @@ -371,8 +383,9 @@ const CFStringRef kSCPropNetServiceUserDefinedName = CFSTR("User const CFStringRef kSCValNetServicePrimaryRankFirst = CFSTR("First"); const CFStringRef kSCValNetServicePrimaryRankLast = CFSTR("Last"); const CFStringRef kSCValNetServicePrimaryRankNever = CFSTR("Never"); +const CFStringRef kSCValNetServicePrimaryRankScoped = CFSTR("Scoped"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCPropNetSMBNetBIOSName = CFSTR("NetBIOSName"); const CFStringRef kSCPropNetSMBNetBIOSNodeType = CFSTR("NetBIOSNodeType"); const CFStringRef kSCPropNetSMBNetBIOSScope = CFSTR("NetBIOSScope"); @@ -382,7 +395,7 @@ const CFStringRef kSCValNetSMBNetBIOSNodeTypeBroadcast = CFSTR("Broa const CFStringRef kSCValNetSMBNetBIOSNodeTypePeer = CFSTR("Peer"); const CFStringRef kSCValNetSMBNetBIOSNodeTypeMixed = CFSTR("Mixed"); const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid = CFSTR("Hybrid"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE const CFStringRef kSCPropNetVPNAppRules = CFSTR("AppRules"); const CFStringRef kSCPropNetVPNAuthCredentialPassword = CFSTR("AuthCredentialPassword"); @@ -419,6 +432,7 @@ const CFStringRef kSCValNetVPNAppRuleExecutableMatch = CFSTR("Exec const CFStringRef kSCValNetVPNAppRuleIdentifier = CFSTR("Identifier"); const CFStringRef kSCValNetVPNAppRuleExecutableDesignatedRequirement = CFSTR("DesignatedRequirement"); const CFStringRef kSCValNetVPNAppRuleExecutableSigningIdentifier = CFSTR("SigningIdentifier"); +const CFStringRef kSCValNetVPNAppRuleExecutableUUID = CFSTR("UUID"); const CFStringRef kSCValNetVPNAuthenticationMethodPassword = CFSTR("Password"); const CFStringRef kSCValNetVPNAuthenticationMethodCertificate = CFSTR("Certificate"); const CFStringRef kSCValNetVPNAuthPasswordEncryptionExternal = CFSTR("External"); @@ -449,9 +463,9 @@ const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi = CFSTR("WiFi const CFStringRef kSCValNetVPNPluginCapabilityAuth = CFSTR("Auth"); const CFStringRef kSCValNetVPNPluginCapabilityConnect = CFSTR("Connect"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCEntUsersConsoleUser = CFSTR("ConsoleUser"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE const CFStringRef kSCPropSystemComputerName = CFSTR("ComputerName"); const CFStringRef kSCPropSystemComputerNameEncoding = CFSTR("ComputerNameEncoding"); @@ -477,9 +491,9 @@ const CFStringRef kSCPropVirtualNetworkInterfacesVLANInterface = CFSTR("Inte const CFStringRef kSCPropVirtualNetworkInterfacesVLANTag = CFSTR("Tag"); const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions = CFSTR("Options"); -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE const CFStringRef kSCPropUsersConsoleUserName = CFSTR("Name"); const CFStringRef kSCPropUsersConsoleUserUID = CFSTR("UID"); const CFStringRef kSCPropUsersConsoleUserGID = CFSTR("GID"); -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE diff --git a/SystemConfiguration.fproj/SCSchemaDefinitions.h b/SystemConfiguration.fproj/SCSchemaDefinitions.h index af6f711..17d5e29 100644 --- a/SystemConfiguration.fproj/SCSchemaDefinitions.h +++ b/SystemConfiguration.fproj/SCSchemaDefinitions.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -2471,7 +2471,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"AirPort" \ ,CFDictionary ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntNetAppleTalk, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA)) #define kSCEntNetAppleTalk \ @@ -2479,7 +2479,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"AppleTalk" \ ,CFDictionary ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntNetDHCP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/)) #define kSCEntNetDHCP \ @@ -2547,7 +2547,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"Modem" \ ,CFDictionary ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntNetNetInfo, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA)) #define kSCEntNetNetInfo \ @@ -2555,7 +2555,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"NetInfo" \ ,CFDictionary ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntNetPPP, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/)) #define kSCEntNetPPP \ @@ -2587,7 +2587,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"Proxies" \ ,CFDictionary ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntNetSMB, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/)) #define kSCEntNetSMB \ @@ -2595,7 +2595,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"SMB" \ ,CFDictionary ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntNet6to4, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/)) #define kSCEntNet6to4 \ @@ -2711,7 +2711,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"Keychain" \ , ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropNetAppleTalkComputerName, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA)) #define kSCPropNetAppleTalkComputerName \ @@ -2785,7 +2785,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"SeedRouter" \ , ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropNetDNSDomainName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/)) #define kSCPropNetDNSDomainName \ @@ -3369,7 +3369,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"WaitForDialTone" \ , ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropNetNetInfoBindingMethods, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA)) #define kSCPropNetNetInfoBindingMethods \ @@ -3419,7 +3419,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"network" \ , ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropNetPPPACSPEnabled, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/)) #define kSCPropNetPPPACSPEnabled \ @@ -3955,7 +3955,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"ProxyAutoDiscoveryEnable" \ ,CFNumber (0 or 1) ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropNetSMBNetBIOSName, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/)) #define kSCPropNetSMBNetBIOSName \ @@ -4011,9 +4011,9 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"Hybrid" \ , ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCEntUsersConsoleUser, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/)) #define kSCEntUsersConsoleUser \ @@ -4021,7 +4021,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"ConsoleUser" \ , ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropSystemComputerName, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/)) #define kSCPropSystemComputerName \ @@ -4101,7 +4101,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"ServiceIDs" \ ,CFArray[CFString] ) -#if !TARGET_OS_IPHONE +#if !TARGET_OS_IPHONE SC_SCHEMA_DECLARATION(kSCPropUsersConsoleUserName, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA)) #define kSCPropUsersConsoleUserName \ @@ -4121,7 +4121,7 @@ extern const CFStringRef kSCPropUsersConsoleUserGID; ,"GID" \ ,CFNumber ) -#endif // !TARGET_OS_IPHONE +#endif // !TARGET_OS_IPHONE #endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCSCHEMADEFINITIONS_H */ diff --git a/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h b/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h index 509be00..f42980a 100644 --- a/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h +++ b/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -27,15 +27,23 @@ */ /* + * Generic Keys + * + * kSCPropConfirmedInterfaceName "ConfirmedInterfaceName" CFString + * * Preference Keys * * kSCPrefVirtualNetworkInterfaces "VirtualNetworkInterfaces" CFDictionary * * Network Entity Keys * - * kSCEntNetCommCenter "com.apple.CommCenter" CFDictionary + * kSCEntNetActiveDuringSleepRequested "ActiveDuringSleepRequested" CFDictionary + * kSCEntNetActiveDuringSleepSupported "ActiveDuringSleepSupported" CFDictionary * kSCEntNetAppLayer "AppLayer" CFDictionary + * kSCEntNetCommCenter "com.apple.CommCenter" CFDictionary * kSCEntNetEAPOL "EAPOL" CFDictionary + * kSCEntNetIPv4RouterARPFailure "IPv4RouterARPFailure" + * kSCEntNetIPv4RouterARPAlive "IPv4RouterARPAlive" * kSCEntNetLinkIssues "LinkIssues" CFDictionary * kSCEntNetLinkQuality "LinkQuality" CFDictionary * kSCEntNetLoopback "Loopback" CFDictionary @@ -73,6 +81,7 @@ * kSCEntNetInterface Entity Keys * * --- kSCPropNetInterfaceType values --- + * kSCValNetInterfaceTypeCellular "Cellular" * kSCValNetInterfaceTypeLoopback "Loopback" * kSCValNetInterfaceTypeVPN "VPN" * @@ -90,35 +99,43 @@ * * kSCEntNetIPv4 Entity Keys * + * kSCPropNetIPv4AdditionalRoutes "AdditionalRoutes" CFArray[CFDictionary] * kSCPropNetIPv4ExcludedRoutes "ExcludedRoutes" CFArray[CFDictionary] * kSCPropNetIPv4IncludedRoutes "IncludedRoutes" CFArray[CFDictionary] * * --- kSCPropNetIPv4ConfigMethod values --- * kSCValNetIPv4ConfigMethodFailover "Failover" * - * --- kSCPropNetIPv4IncludedRoutes, kSCPropNetIPv4ExcludedRoutes [CFDictionary] keys --- + * --- kSCPropNetIPv4AdditionalRoutes, kSCPropNetIPv4ExcludedRoutes, kSCPropNetIPv4IncludedRoutes [CFDictionary] keys --- * kSCPropNetIPv4RouteDestinationAddress "DestinationAddress" CFString * kSCPropNetIPv4RouteSubnetMask "SubnetMask" CFString * kSCPropNetIPv4RouteGatewayAddress "GatewayAddress" CFString + * kSCPropNetIPv4RouteInterfaceName "InterfaceName" CFString * * kSCPropNetIPv4ARPResolvedHardwareAddress "ARPResolvedHardwareAddress" CFString * kSCPropNetIPv4ARPResolvedIPAddress "ARPResolvedIPAddress" CFString * * kSCEntNetIPv6 Entity Keys * + * kSCPropNetIPv6AdditionalRoutes "AdditionalRoutes" CFArray[CFDictionary] * kSCPropNetIPv6ExcludedRoutes "ExcludedRoutes" CFArray[CFDictionary] * kSCPropNetIPv6IncludedRoutes "IncludedRoutes" CFArray[CFDictionary] * - * --- kSCPropNetIPv6IncludedRoutes, kSCPropNetIPv6ExcludedRoutes [CFDictionary] keys --- + * --- kSCPropNetIPv6AdditionalRoutes, kSCPropNetIPv6IncludedRoutes, kSCPropNetIPv6ExcludedRoutes [CFDictionary] keys --- * kSCPropNetIPv6RouteDestinationAddress "DestinationAddress" CFString * kSCPropNetIPv6RoutePrefixLength "PrefixLength" CFNumber * kSCPropNetIPv6RouteGatewayAddress "GatewayAddress" CFString + * kSCPropNetIPv6RouteInterfaceName "InterfaceName" CFString + * + * kSCEntNetLink Entity Keys + * + * kSCPropNetLinkExpensive "Expensive" CFBoolean * * kSCEntNetLinkIssues Entity Keys * * kSCPropNetLinkIssuesModuleID "ModuleID" CFData * kSCPropNetLinkIssuesInfo "Info" CFData - * kSCPropNetLinkIssuesTimeStamp "TimeStamp" CFDATE + * kSCPropNetLinkIssuesTimeStamp "TimeStamp" CFDate * * kSCEntNetLinkQuality Entity Keys * @@ -169,6 +186,7 @@ * kSCValNetServicePrimaryRankFirst "First" * kSCValNetServicePrimaryRankLast "Last" * kSCValNetServicePrimaryRankNever "Never" + * kSCValNetServicePrimaryRankScoped "Scoped" * * kSCEntNetVPN Entity Keys * @@ -211,6 +229,7 @@ * --- kSCValNetVPNAppRuleExecutableMatch [CFDictionary] keys --- * kSCValNetVPNAppRuleExecutableDesignatedRequirement "DesignatedRequirement" CFString * kSCValNetVPNAppRuleExecutableSigningIdentifier "SigningIdentifier" CFString + * kSCValNetVPNAppRuleExecutableUUID "UUID" CFString * * --- kSCPropNetVPNAuthenticationMethod values --- * kSCValNetVPNAuthenticationMethodPassword "Password" @@ -291,6 +310,12 @@ * @header SCSchemaDefinitionsPrivate */ +/*! + @const kSCPropConfirmedInterfaceName + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCPropConfirmedInterfaceName; + /*! @group Preference Keys */ @@ -306,10 +331,16 @@ extern const CFStringRef kSCPrefVirtualNetworkInterfaces; */ /*! - @const kSCEntNetCommCenter - @availability Introduced in iPhone OS 2.0. + @const kSCEntNetActiveDuringSleepRequested + @availability Introduced in Mac OS X 10.10. */ -extern const CFStringRef kSCEntNetCommCenter; +extern const CFStringRef kSCEntNetActiveDuringSleepRequested; + +/*! + @const kSCEntNetActiveDuringSleepSupported + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCEntNetActiveDuringSleepSupported; /*! @const kSCEntNetAppLayer @@ -317,12 +348,30 @@ extern const CFStringRef kSCEntNetCommCenter; */ extern const CFStringRef kSCEntNetAppLayer; +/*! + @const kSCEntNetCommCenter + @availability Introduced in iPhone OS 2.0. + */ +extern const CFStringRef kSCEntNetCommCenter; + /*! @const kSCEntNetEAPOL @availability Introduced in Mac OS X 10.5. */ extern const CFStringRef kSCEntNetEAPOL; +/*! + @const kSCEntNetIPv4RouterARPFailure + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCEntNetIPv4RouterARPFailure; + +/*! + @const kSCEntNetIPv4RouterARPAlive + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCEntNetIPv4RouterARPAlive; + /*! @const kSCEntNetLinkIssues @availability Introduced in Mac OS X 10.9. @@ -469,6 +518,12 @@ extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_MTU; @group kSCEntNetInterface Entity Keys */ +/*! + @const kSCValNetInterfaceTypeCellular + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCValNetInterfaceTypeCellular; + /*! @const kSCValNetInterfaceTypeLoopback @availability Introduced in Mac OS X 10.7. @@ -531,6 +586,12 @@ extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsNever; @group kSCEntNetIPv4 Entity Keys */ +/*! + @const kSCPropNetIPv4AdditionalRoutes + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCPropNetIPv4AdditionalRoutes; + /*! @const kSCPropNetIPv4ExcludedRoutes @availability Introduced in Mac OS X 10.7. @@ -567,6 +628,12 @@ extern const CFStringRef kSCPropNetIPv4RouteSubnetMask; */ extern const CFStringRef kSCPropNetIPv4RouteGatewayAddress; +/*! + @const kSCPropNetIPv4RouteInterfaceName + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCPropNetIPv4RouteInterfaceName; + /*! @const kSCPropNetIPv4ARPResolvedHardwareAddress @availability Introduced in Mac OS X 10.7. @@ -583,6 +650,12 @@ extern const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress; @group kSCEntNetIPv6 Entity Keys */ +/*! + @const kSCPropNetIPv6AdditionalRoutes + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCPropNetIPv6AdditionalRoutes; + /*! @const kSCPropNetIPv6ExcludedRoutes @availability Introduced in Mac OS X 10.7. @@ -613,6 +686,22 @@ extern const CFStringRef kSCPropNetIPv6RoutePrefixLength; */ extern const CFStringRef kSCPropNetIPv6RouteGatewayAddress; +/*! + @const kSCPropNetIPv6RouteInterfaceName + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCPropNetIPv6RouteInterfaceName; + +/*! + @group kSCEntNetLink Entity Keys + */ + +/*! + @const kSCPropNetLinkExpensive + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCPropNetLinkExpensive; + /*! @group kSCEntNetLinkIssues Entity Keys */ @@ -831,6 +920,12 @@ extern const CFStringRef kSCValNetServicePrimaryRankLast; */ extern const CFStringRef kSCValNetServicePrimaryRankNever; +/*! + @const kSCValNetServicePrimaryRankScoped + @availability Introduced in Mac OS X 10.10. + */ +extern const CFStringRef kSCValNetServicePrimaryRankScoped; + /*! @group kSCEntNetVPN Entity Keys */ @@ -1045,6 +1140,12 @@ extern const CFStringRef kSCValNetVPNAppRuleExecutableDesignatedRequirement; */ extern const CFStringRef kSCValNetVPNAppRuleExecutableSigningIdentifier; +/*! + @const kSCValNetVPNAppRuleExecutableUUID + @availability Introduced in Mac OS X 10.9. + */ +extern const CFStringRef kSCValNetVPNAppRuleExecutableUUID; + /*! @const kSCValNetVPNAuthenticationMethodPassword @availability Introduced in Mac OS X 10.7. @@ -1287,12 +1388,29 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; /* -------------------- Schema declarations -------------------- */ + SC_SCHEMA_DECLARATION(kSCPropConfirmedInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCPropConfirmedInterfaceName \ + SC_SCHEMA_KV(kSCPropConfirmedInterfaceName \ + ,"ConfirmedInterfaceName" \ + ,CFString ) + SC_SCHEMA_DECLARATION(kSCPrefVirtualNetworkInterfaces, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/)) #define kSCPrefVirtualNetworkInterfaces \ SC_SCHEMA_KV(kSCPrefVirtualNetworkInterfaces \ ,"VirtualNetworkInterfaces" \ ,CFDictionary ) + SC_SCHEMA_DECLARATION(kSCEntNetActiveDuringSleepRequested, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/)) + #define kSCEntNetActiveDuringSleepRequested \ + SC_SCHEMA_KV(kSCEntNetActiveDuringSleepRequested \ + ,"ActiveDuringSleepRequested" \ + ,CFDictionary ) + + SC_SCHEMA_DECLARATION(kSCEntNetActiveDuringSleepSupported, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/)) + #define kSCEntNetActiveDuringSleepSupported \ + SC_SCHEMA_KV(kSCEntNetActiveDuringSleepSupported \ + ,"ActiveDuringSleepSupported" \ + ,CFDictionary ) SC_SCHEMA_DECLARATION(kSCEntNetAppLayer, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)) #define kSCEntNetAppLayer \ @@ -1300,12 +1418,25 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"AppLayer" \ ,CFDictionary ) + SC_SCHEMA_DECLARATION(kSCEntNetEAPOL, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/)) #define kSCEntNetEAPOL \ SC_SCHEMA_KV(kSCEntNetEAPOL \ ,"EAPOL" \ ,CFDictionary ) + SC_SCHEMA_DECLARATION(kSCEntNetIPv4RouterARPFailure, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCEntNetIPv4RouterARPFailure \ + SC_SCHEMA_KV(kSCEntNetIPv4RouterARPFailure \ + ,"IPv4RouterARPFailure" \ + , ) + + SC_SCHEMA_DECLARATION(kSCEntNetIPv4RouterARPAlive, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCEntNetIPv4RouterARPAlive \ + SC_SCHEMA_KV(kSCEntNetIPv4RouterARPAlive \ + ,"IPv4RouterARPAlive" \ + , ) + SC_SCHEMA_DECLARATION(kSCEntNetLinkIssues, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)) #define kSCEntNetLinkIssues \ SC_SCHEMA_KV(kSCEntNetLinkIssues \ @@ -1421,6 +1552,7 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"VLAN_MTU" \ ,CFNumber (0 or 1) ) + SC_SCHEMA_DECLARATION(kSCValNetInterfaceTypeLoopback, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/)) #define kSCValNetInterfaceTypeLoopback \ SC_SCHEMA_KV(kSCValNetInterfaceTypeLoopback \ @@ -1475,6 +1607,12 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"OnDemandMatchDomainsNever" \ ,CFArray[CFString] ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv4AdditionalRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCPropNetIPv4AdditionalRoutes \ + SC_SCHEMA_KV(kSCPropNetIPv4AdditionalRoutes \ + ,"AdditionalRoutes" \ + ,CFArray[CFDictionary] ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv4ExcludedRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/)) #define kSCPropNetIPv4ExcludedRoutes \ SC_SCHEMA_KV(kSCPropNetIPv4ExcludedRoutes \ @@ -1511,6 +1649,12 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"GatewayAddress" \ ,CFString ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv4RouteInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCPropNetIPv4RouteInterfaceName \ + SC_SCHEMA_KV(kSCPropNetIPv4RouteInterfaceName \ + ,"InterfaceName" \ + ,CFString ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv4ARPResolvedHardwareAddress, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/)) #define kSCPropNetIPv4ARPResolvedHardwareAddress \ SC_SCHEMA_KV(kSCPropNetIPv4ARPResolvedHardwareAddress \ @@ -1523,6 +1667,12 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"ARPResolvedIPAddress" \ ,CFString ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv6AdditionalRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCPropNetIPv6AdditionalRoutes \ + SC_SCHEMA_KV(kSCPropNetIPv6AdditionalRoutes \ + ,"AdditionalRoutes" \ + ,CFArray[CFDictionary] ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv6ExcludedRoutes, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/)) #define kSCPropNetIPv6ExcludedRoutes \ SC_SCHEMA_KV(kSCPropNetIPv6ExcludedRoutes \ @@ -1553,6 +1703,18 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"GatewayAddress" \ ,CFString ) + SC_SCHEMA_DECLARATION(kSCPropNetIPv6RouteInterfaceName, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCPropNetIPv6RouteInterfaceName \ + SC_SCHEMA_KV(kSCPropNetIPv6RouteInterfaceName \ + ,"InterfaceName" \ + ,CFString ) + + SC_SCHEMA_DECLARATION(kSCPropNetLinkExpensive, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCPropNetLinkExpensive \ + SC_SCHEMA_KV(kSCPropNetLinkExpensive \ + ,"Expensive" \ + ,CFBoolean ) + SC_SCHEMA_DECLARATION(kSCPropNetLinkIssuesModuleID, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)) #define kSCPropNetLinkIssuesModuleID \ SC_SCHEMA_KV(kSCPropNetLinkIssuesModuleID \ @@ -1751,6 +1913,12 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"Never" \ , ) + SC_SCHEMA_DECLARATION(kSCValNetServicePrimaryRankScoped, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/)) + #define kSCValNetServicePrimaryRankScoped \ + SC_SCHEMA_KV(kSCValNetServicePrimaryRankScoped \ + ,"Scoped" \ + , ) + SC_SCHEMA_DECLARATION(kSCPropNetVPNAppRules, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)) #define kSCPropNetVPNAppRules \ SC_SCHEMA_KV(kSCPropNetVPNAppRules \ @@ -1961,6 +2129,12 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"SigningIdentifier" \ ,CFString ) + SC_SCHEMA_DECLARATION(kSCValNetVPNAppRuleExecutableUUID, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/)) + #define kSCValNetVPNAppRuleExecutableUUID \ + SC_SCHEMA_KV(kSCValNetVPNAppRuleExecutableUUID \ + ,"UUID" \ + ,CFString ) + SC_SCHEMA_DECLARATION(kSCValNetVPNAuthenticationMethodPassword, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/)) #define kSCValNetVPNAuthenticationMethodPassword \ SC_SCHEMA_KV(kSCValNetVPNAuthenticationMethodPassword \ @@ -2184,4 +2358,4 @@ extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions; ,"Options" \ ,CFDictionary ) -#endif /* _SCSCHEMADEFINITIONSPRIVATE_H */ +#endif /* _SCSCHEMADEFINITIONSPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SNHelper.c b/SystemConfiguration.fproj/SNHelper.c index 4ae0fd9..097232b 100644 --- a/SystemConfiguration.fproj/SNHelper.c +++ b/SystemConfiguration.fproj/SNHelper.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Apple Inc. + * Copyright (c) 2013, 2014 Apple Inc. * All rights reserved. */ #include @@ -60,7 +60,7 @@ flow_divert_uuid_policy_operate(const uuid_t uuid, int operation) response = copy_response(request); if (isa_xpc_dictionary(response)) { - result = xpc_dictionary_get_int64(request, kSNHelperMessageResult); + result = (int)xpc_dictionary_get_int64(response, kSNHelperMessageResult); } else { result = EINVAL; } @@ -95,7 +95,35 @@ snhelper_flow_divert_uuid_policy_clear(void) response = copy_response(request); if (isa_xpc_dictionary(response)) { - result = xpc_dictionary_get_int64(request, kSNHelperMessageResult); + result = (int)xpc_dictionary_get_int64(response, kSNHelperMessageResult); + } else { + result = EINVAL; + } + + xpc_release(response); + xpc_release(request); + + return result; +} + +int +snhelper_get_uuid_for_app(const char *appID, uuid_t uuid) +{ + int result; + xpc_object_t request = xpc_dictionary_create(NULL, NULL, 0); + xpc_object_t response; + + xpc_dictionary_set_uint64(request, kSNHelperMessageType, kSNHelperMessageTypeGetUUIDForApp); + xpc_dictionary_set_string(request, kSNHelperMessageAppID, appID); + + response = copy_response(request); + + if (isa_xpc_dictionary(response)) { + result = (int)xpc_dictionary_get_int64(response, kSNHelperMessageResult); + const uint8_t *uuidBytes = xpc_dictionary_get_uuid(response, kSNHelperMessageResultData); + if (result == 0 && uuid != NULL && uuidBytes != NULL) { + memcpy(uuid, uuidBytes, sizeof(uuid_t)); + } } else { result = EINVAL; } diff --git a/SystemConfiguration.fproj/SNHelperPrivate.h b/SystemConfiguration.fproj/SNHelperPrivate.h index 4d2aefb..b71de61 100644 --- a/SystemConfiguration.fproj/SNHelperPrivate.h +++ b/SystemConfiguration.fproj/SNHelperPrivate.h @@ -12,17 +12,21 @@ #define kSNHelperMessageType "message-type" #define kSNHelperMessageUUID "uuid" +#define kSNHelperMessageAppID "app-id" #define kSNHelperMessageResult "result-code" +#define kSNHelperMessageResultData "result-data" enum { kSNHelperMessageTypeFlowDivertUUIDAdd, kSNHelperMessageTypeFlowDivertUUIDRemove, kSNHelperMessageTypeFlowDivertUUIDClear, + kSNHelperMessageTypeGetUUIDForApp, }; int snhelper_flow_divert_uuid_policy_add(const uuid_t uuid); int snhelper_flow_divert_uuid_policy_remove(const uuid_t uuid); int snhelper_flow_divert_uuid_policy_clear(void); +int snhelper_get_uuid_for_app(const char *, uuid_t); bool isa_xpc_connection(xpc_object_t obj); bool isa_xpc_bool(xpc_object_t obj); diff --git a/SystemConfiguration.fproj/VLANConfiguration.c b/SystemConfiguration.fproj/VLANConfiguration.c index dc07360..badc2c7 100644 --- a/SystemConfiguration.fproj/VLANConfiguration.c +++ b/SystemConfiguration.fproj/VLANConfiguration.c @@ -37,6 +37,7 @@ #include #include "SCNetworkConfigurationInternal.h" +#include "SCPreferencesInternal.h" #include #include @@ -72,6 +73,7 @@ inet_dgram_socket() typedef struct { CFMutableArrayRef vlans; + SCPreferencesRef ni_prefs; SCPreferencesRef prefs; } addContext, *addContextRef; @@ -86,7 +88,7 @@ add_configured_interface(const void *key, const void *value, void *context) CFDictionaryRef vlan_info = (CFDictionaryRef)value; CFStringRef vlan_name; CFDictionaryRef vlan_options; - SCNetworkInterfaceRef vlan_physical; + SCNetworkInterfaceRef vlan_physical = NULL; CFStringRef vlan_physical_if; CFNumberRef vlan_tag; @@ -107,8 +109,14 @@ add_configured_interface(const void *key, const void *value, void *context) assert(vlan != NULL); // set physical interface and tag - vlan_physical = _SCNetworkInterfaceCreateWithBSDName(NULL, vlan_physical_if, - kIncludeBondInterfaces); + if (myContext->ni_prefs != NULL) { + vlan_physical = __SCNetworkInterfaceCreateWithNIPreferencesUsingBSDName(NULL, myContext->ni_prefs, + vlan_physical_if); + } + if (vlan_physical == NULL) { + vlan_physical = _SCNetworkInterfaceCreateWithBSDName(NULL, vlan_physical_if, + kIncludeBondInterfaces); + } assert(vlan_physical != NULL); // since we KNOW that the physical interface supported VLANs when @@ -211,9 +219,18 @@ SCVLANInterfaceCopyAll(SCPreferencesRef prefs) { addContext context; CFDictionaryRef dict; + SCPreferencesRef ni_prefs; CFStringRef path; - + + if ((prefs == NULL) || + (__SCPreferencesUsingDefaultPrefs(prefs) == TRUE)) { + ni_prefs = NULL; + } + else { + ni_prefs = __SCPreferencesCreateNIPrefsFromPrefs(prefs); + } context.vlans = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + context.ni_prefs = ni_prefs; context.prefs = prefs; path = CFStringCreateWithFormat(NULL, @@ -226,7 +243,9 @@ SCVLANInterfaceCopyAll(SCPreferencesRef prefs) if (isA_CFDictionary(dict)) { my_CFDictionaryApplyFunction(dict, add_configured_interface, &context); } - + if (ni_prefs != NULL) { + CFRelease(ni_prefs); + } return context.vlans; } @@ -368,7 +387,7 @@ _SCVLANInterfaceCopyActive(void) ifr.ifr_data = (caddr_t)&vreq; if (ioctl(s, SIOCGIFVLAN, (caddr_t)&ifr) == -1) { - SCLog(TRUE, LOG_ERR, CFSTR("ioctl() failed: %s"), strerror(errno)); + SCLog(TRUE, LOG_ERR, CFSTR("ioctl(SIOCGIFVLAN) failed: %s"), strerror(errno)); CFRelease(vlans); vlans = NULL; _SCErrorSet(kSCStatusFailed); @@ -424,7 +443,7 @@ SCVLANInterfaceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef physical, CF _SCErrorSet(kSCStatusInvalidArgument); return NULL; } - + if (!isA_SCNetworkInterface(physical)) { _SCErrorSet(kSCStatusInvalidArgument); return NULL; @@ -432,8 +451,13 @@ SCVLANInterfaceCreate(SCPreferencesRef prefs, SCNetworkInterfaceRef physical, CF interfacePrivate = (SCNetworkInterfacePrivateRef)physical; if (!interfacePrivate->supportsVLAN) { - _SCErrorSet(kSCStatusInvalidArgument); - return NULL; + if (__SCPreferencesUsingDefaultPrefs(prefs) == FALSE) { + interfacePrivate->supportsVLAN = TRUE; + } + else { + _SCErrorSet(kSCStatusInvalidArgument); + return NULL; + } } if (isA_CFNumber(tag)) { @@ -591,7 +615,8 @@ SCVLANInterfaceSetPhysicalInterfaceAndTag(SCVLANInterfaceRef vlan, SCNetworkInte { SCNetworkInterfacePrivateRef interfacePrivate; Boolean ok = TRUE; - + SCPreferencesRef prefs; + if (!isA_SCVLANInterface(vlan)) { _SCErrorSet(kSCStatusInvalidArgument); return FALSE; @@ -603,9 +628,16 @@ SCVLANInterfaceSetPhysicalInterfaceAndTag(SCVLANInterfaceRef vlan, SCNetworkInte } interfacePrivate = (SCNetworkInterfacePrivateRef)physical; + prefs = interfacePrivate->prefs; + if (!interfacePrivate->supportsVLAN) { - _SCErrorSet(kSCStatusInvalidArgument); - return FALSE; + if (__SCPreferencesUsingDefaultPrefs(prefs) == FALSE) { + interfacePrivate->supportsVLAN = TRUE; + } + else { + _SCErrorSet(kSCStatusInvalidArgument); + return FALSE; + } } if (isA_CFNumber(tag)) { diff --git a/SystemConfiguration.fproj/VPNAppLayer.c b/SystemConfiguration.fproj/VPNAppLayer.c index 01901ca..b6763c5 100644 --- a/SystemConfiguration.fproj/VPNAppLayer.c +++ b/SystemConfiguration.fproj/VPNAppLayer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. + * Copyright (c) 2012-2014 Apple Inc. * All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNAppLayerPrivate.h b/SystemConfiguration.fproj/VPNAppLayerPrivate.h index 01901ca..b6763c5 100644 --- a/SystemConfiguration.fproj/VPNAppLayerPrivate.h +++ b/SystemConfiguration.fproj/VPNAppLayerPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. + * Copyright (c) 2012-2014 Apple Inc. * All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNConfiguration.c b/SystemConfiguration.fproj/VPNConfiguration.c index 58acb55..834c983 100644 --- a/SystemConfiguration.fproj/VPNConfiguration.c +++ b/SystemConfiguration.fproj/VPNConfiguration.c @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2013 Apple Inc. All rights reserved. + * Copyright (c) 2009-2014 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNConfiguration.h b/SystemConfiguration.fproj/VPNConfiguration.h index d7d8fa0..31255b2 100644 --- a/SystemConfiguration.fproj/VPNConfiguration.h +++ b/SystemConfiguration.fproj/VPNConfiguration.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2009-2011, 2013, 2014 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNFlow.c b/SystemConfiguration.fproj/VPNFlow.c index d286c3d..ea516fb 100644 --- a/SystemConfiguration.fproj/VPNFlow.c +++ b/SystemConfiguration.fproj/VPNFlow.c @@ -1,4 +1,4 @@ /* - * Copyright (c) 2012-2013 Apple Inc. All rights reserved. + * Copyright (c) 2012-2014 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNFlowPrivate.h b/SystemConfiguration.fproj/VPNFlowPrivate.h index a24886f..ea516fb 100644 --- a/SystemConfiguration.fproj/VPNFlowPrivate.h +++ b/SystemConfiguration.fproj/VPNFlowPrivate.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012-2014 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNPrivate.c b/SystemConfiguration.fproj/VPNPrivate.c index b4b9a4b..bb973ec 100644 --- a/SystemConfiguration.fproj/VPNPrivate.c +++ b/SystemConfiguration.fproj/VPNPrivate.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013 Apple Inc. All rights reserved. + * Copyright (c) 2009-2014 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNPrivate.h b/SystemConfiguration.fproj/VPNPrivate.h index 4e587a2..b22496f 100644 --- a/SystemConfiguration.fproj/VPNPrivate.h +++ b/SystemConfiguration.fproj/VPNPrivate.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2009-2011, 2014 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNService.c b/SystemConfiguration.fproj/VPNService.c index 8be02b4..d5091c9 100644 --- a/SystemConfiguration.fproj/VPNService.c +++ b/SystemConfiguration.fproj/VPNService.c @@ -3,7 +3,23 @@ */ #include -#include +#include +#include "dy_framework.h" + +static CFStringRef g_apple_app_prefix = CFSTR("com.apple."); + +static struct { + CFStringRef signing_id; + Boolean domains_required; +} g_apple_app_exceptions[] = { +#if TARGET_OS_IPHONE + { CFSTR("com.apple.mobilesafari"), TRUE }, + { CFSTR("com.apple.webapp"), TRUE }, +#else + { CFSTR("com.apple.WebKit.NetworkProcess"), TRUE }, +#endif +}; + static Boolean isA_VPNService(CFTypeRef cf) @@ -87,16 +103,17 @@ find_app_rule(CFDictionaryRef vpn_config, CFStringRef ruleIdentifier) } static Boolean -validate_app_rule(CFDictionaryRef ruleSettings) +validate_app_rule(CFDictionaryRef ruleSettings, Boolean check_for_apple_apps) { - CFIndex account_count; + CFIndex account_count = 0; CFArrayRef accounts; - Boolean accounts_valid = FALSE; + CFIndex exception_idx = -1; CFArrayRef executables; - Boolean executables_valid = FALSE; - CFIndex executable_count; + CFIndex executable_count = 0; + Boolean found_exception = FALSE; CFIndex idx; CFArrayRef match_domains; + CFIndex match_domain_count = 0; if (!isA_CFDictionary(ruleSettings)) { return FALSE; @@ -105,7 +122,6 @@ validate_app_rule(CFDictionaryRef ruleSettings) /* Validate the executable array. It needs to have at least one value. */ executables = CFDictionaryGetValue(ruleSettings, kSCValNetVPNAppRuleExecutableMatch); if (isA_CFArray(executables) && (executable_count = CFArrayGetCount(executables)) > 0) { - executables_valid = TRUE; for (idx = 0; idx < executable_count; idx++) { CFDictionaryRef executable = CFArrayGetValueAtIndex(executables, idx); @@ -114,19 +130,47 @@ validate_app_rule(CFDictionaryRef ruleSettings) CFStringRef requirement = CFDictionaryGetValue(executable, kSCValNetVPNAppRuleExecutableDesignatedRequirement); if (!isA_CFString(signingID) || CFStringGetLength(signingID) == 0) { - executables_valid = FALSE; - break; + return FALSE; + } + + if (check_for_apple_apps && CFStringHasPrefix(signingID, g_apple_app_prefix)) { + for (exception_idx = 0; + exception_idx < sizeof(g_apple_app_exceptions) / sizeof(g_apple_app_exceptions[0]); + exception_idx++) + { + if (CFStringCompare(signingID, g_apple_app_exceptions[exception_idx].signing_id, 0) == 0) { + found_exception = TRUE; + break; + } + } + + if (!found_exception) { + Boolean can_set_apple_app_rules = FALSE; + SecTaskRef current_task = SecTaskCreateFromSelf(kCFAllocatorDefault); + if (current_task != NULL) { + CFBooleanRef entitlement = + SecTaskCopyValueForEntitlement(current_task, + CFSTR("com.apple.private.app-vpn-config"), + NULL); + can_set_apple_app_rules = (isA_CFBoolean(entitlement) && CFBooleanGetValue(entitlement)); + if (entitlement != NULL) { + CFRelease(entitlement); + } + CFRelease(current_task); + } + if (!can_set_apple_app_rules) { + return FALSE; + } + } } if (requirement != NULL) { if (!isA_CFString(requirement) || CFStringGetLength(requirement) == 0) { - executables_valid = FALSE; - break; + return FALSE; } #if !TARGET_OS_IPHONE } else { - executables_valid = FALSE; - break; + return FALSE; #endif /* !TARGET_OS_IPHONE */ } } @@ -136,26 +180,22 @@ validate_app_rule(CFDictionaryRef ruleSettings) /* Validate the accounts array. It needs to have at least one value. */ accounts = CFDictionaryGetValue(ruleSettings, kSCValNetVPNAppRuleAccountIdentifierMatch); if (isA_CFArray(accounts) && (account_count = CFArrayGetCount(accounts)) > 0) { - accounts_valid = TRUE; for (idx = 0; idx < account_count; idx++) { CFStringRef account = CFArrayGetValueAtIndex(accounts, idx); if (!isA_CFString(account)) { - accounts_valid = FALSE; - break; + return FALSE; } } } /* Either executables or accounts must be present */ - if (!executables_valid && !accounts_valid) { + if (executable_count == 0 && account_count == 0) { return FALSE; } /* Validate the domains array. It's optional, so just make sure that it contains only strings if it's present. */ match_domains = CFDictionaryGetValue(ruleSettings, kSCValNetVPNAppRuleDNSDomainMatch); if (match_domains != NULL) { - CFIndex match_domain_count; - if (!isA_CFArray(match_domains)) { return FALSE; } @@ -169,6 +209,15 @@ validate_app_rule(CFDictionaryRef ruleSettings) } } + /* Require at least one match domain for some Apple apps (like Safari) */ + if (match_domain_count == 0 && + found_exception && + exception_idx >= 0 && + g_apple_app_exceptions[exception_idx].domains_required) + { + return FALSE; + } + return TRUE; } @@ -274,7 +323,7 @@ VPNServiceSetAppRule(VPNServiceRef service, CFStringRef ruleIdentifier, CFDictio return FALSE; } - if (!validate_app_rule(ruleSettings)) { + if (!validate_app_rule(ruleSettings, TRUE)) { _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -356,7 +405,7 @@ VPNServiceCopyAppRule(VPNServiceRef service, CFStringRef ruleIdentifier) CFArrayRef app_rules = CFDictionaryGetValue(vpn_config, kSCPropNetVPNAppRules); CFDictionaryRef ruleSettings = CFArrayGetValueAtIndex(app_rules, idx); - if (validate_app_rule(ruleSettings)) { + if (validate_app_rule(ruleSettings, FALSE)) { return (CFDictionaryRef)CFRetain(ruleSettings); } else { _SCErrorSet(kSCStatusFailed); @@ -421,3 +470,18 @@ VPNServiceRemoveAppRule(VPNServiceRef service, CFStringRef ruleIdentifier) return FALSE; } + +Boolean +VPNServiceIsManagedAppVPN(VPNServiceRef service) +{ + Boolean result = FALSE; + CFStringRef mc_external_id = SCNetworkServiceCopyExternalID(service, CFSTR("MCVPNUUID")); + if (isA_CFString(mc_external_id)) { + result = TRUE; + } + if (mc_external_id != NULL) { + CFRelease(mc_external_id); + } + return result; +} + diff --git a/SystemConfiguration.fproj/dy_framework.c b/SystemConfiguration.fproj/dy_framework.c index e2c1089..8af8be9 100644 --- a/SystemConfiguration.fproj/dy_framework.c +++ b/SystemConfiguration.fproj/dy_framework.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2008, 2010-2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2008, 2010-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -139,6 +139,91 @@ _IOObjectRelease(io_object_t object) } +#if !TARGET_OS_IPHONE + +__private_extern__ IOReturn +_IOPMConnectionAcknowledgeEvent(IOPMConnection myConnection, IOPMConnectionMessageToken token) +{ + #undef IOPMConnectionAcknowledgeEvent + static typeof (IOPMConnectionAcknowledgeEvent) *dyfunc = NULL; + if (!dyfunc) { + void *image = __loadIOKit(); + if (image) dyfunc = dlsym(image, "IOPMConnectionAcknowledgeEvent"); + } + return dyfunc ? dyfunc(myConnection, token) : kIOReturnError; +} + + +__private_extern__ IOReturn +_IOPMConnectionCreate(CFStringRef myName, IOPMCapabilityBits interests, IOPMConnection *newConnection) +{ + #undef IOPMConnectionCreate + static typeof (IOPMConnectionCreate) *dyfunc = NULL; + if (!dyfunc) { + void *image = __loadIOKit(); + if (image) dyfunc = dlsym(image, "IOPMConnectionCreate"); + } + return dyfunc ? dyfunc(myName, interests, newConnection) : kIOReturnError; +} + + +__private_extern__ IOPMCapabilityBits +_IOPMConnectionGetSystemCapabilities(void) +{ + #undef IOPMConnectionGetSystemCapabilities + static typeof (IOPMConnectionGetSystemCapabilities) *dyfunc = NULL; + if (!dyfunc) { + void *image = __loadIOKit(); + if (image) dyfunc = dlsym(image, "IOPMConnectionGetSystemCapabilities"); + } + return dyfunc ? dyfunc() : kIOPMSleepWakeInterest; +} + + +__private_extern__ IOReturn +_IOPMConnectionRelease(IOPMConnection myConnection) +{ + #undef IOPMConnectionRelease + static typeof (IOPMConnectionRelease) *dyfunc = NULL; + if (!dyfunc) { + void *image = __loadIOKit(); + if (image) dyfunc = dlsym(image, "IOPMConnectionRelease"); + } + return dyfunc ? dyfunc(myConnection) : kIOReturnError; +} + + +__private_extern__ void +_IOPMConnectionSetDispatchQueue(IOPMConnection myConnection, dispatch_queue_t myQueue) +{ + #undef IOPMConnectionSetDispatchQueue + static typeof (IOPMConnectionSetDispatchQueue) *dyfunc = NULL; + if (!dyfunc) { + void *image = __loadIOKit(); + if (image) dyfunc = dlsym(image, "IOPMConnectionSetDispatchQueue"); + } + if (dyfunc) { + dyfunc(myConnection, myQueue); + } + return; +} + + +__private_extern__ IOReturn +_IOPMConnectionSetNotification(IOPMConnection myConnection, void *param, IOPMEventHandlerType handler) +{ + #undef IOPMConnectionSetNotification + static typeof (IOPMConnectionSetNotification) *dyfunc = NULL; + if (!dyfunc) { + void *image = __loadIOKit(); + if (image) dyfunc = dlsym(image, "IOPMConnectionSetNotification"); + } + return dyfunc ? dyfunc(myConnection, param, handler) : kIOReturnError; +} + +#endif // !TARGET_OS_IPHONE + + __private_extern__ CFTypeRef _IORegistryEntryCreateCFProperty(io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options) { @@ -415,18 +500,6 @@ _SecKeychainCopyDomainDefault(SecPreferencesDomain domain, SecKeychainRef *keych return dyfunc ? dyfunc(domain, keychain) : -1; } -__private_extern__ OSStatus -_SecKeychainGetPreferenceDomain(SecPreferencesDomain *domain) -{ - #undef SecKeychainGetPreferenceDomain - static typeof (SecKeychainGetPreferenceDomain) *dyfunc = NULL; - if (!dyfunc) { - void *image = __loadSecurity(); - if (image) dyfunc = dlsym(image, "SecKeychainGetPreferenceDomain"); - } - return dyfunc ? dyfunc(domain) : -1; -} - __private_extern__ OSStatus _SecKeychainOpen(const char *pathName, SecKeychainRef *keychain) { @@ -451,18 +524,6 @@ _SecKeychainSetDomainDefault(SecPreferencesDomain domain, SecKeychainRef keychai return dyfunc ? dyfunc(domain, keychain) : -1; } -__private_extern__ OSStatus -_SecKeychainSetPreferenceDomain(SecPreferencesDomain domain) -{ - #undef SecKeychainSetPreferenceDomain - static typeof (SecKeychainSetPreferenceDomain) *dyfunc = NULL; - if (!dyfunc) { - void *image = __loadSecurity(); - if (image) dyfunc = dlsym(image, "SecKeychainSetPreferenceDomain"); - } - return dyfunc ? dyfunc(domain) : -1; -} - __private_extern__ OSStatus _SecKeychainItemCopyContent(SecKeychainItemRef itemRef, SecItemClass *itemClass, SecKeychainAttributeList *attrList, UInt32 *length, void **outData) { @@ -568,3 +629,6 @@ _SecCertificateCreateWithData(CFAllocatorRef allocator, CFDataRef data) } + + + diff --git a/SystemConfiguration.fproj/dy_framework.h b/SystemConfiguration.fproj/dy_framework.h index 0faee13..c37e1ca 100644 --- a/SystemConfiguration.fproj/dy_framework.h +++ b/SystemConfiguration.fproj/dy_framework.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002-2008, 2010-2013 Apple Inc. All rights reserved. + * Copyright (c) 2002-2008, 2010-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -31,10 +31,14 @@ #include #include #include +#if !TARGET_OS_IPHONE +#include +#endif // !TARGET_OS_IPHONE #include #include #include // only needed for Mac OS X 10.6[.x] + __BEGIN_DECLS #pragma mark - @@ -81,6 +85,50 @@ _IOObjectRelease ( ); #define IOObjectRelease _IOObjectRelease +#if !TARGET_OS_IPHONE + +IOReturn +_IOPMConnectionAcknowledgeEvent ( + IOPMConnection myConnection, + IOPMConnectionMessageToken token + ); +#define IOPMConnectionAcknowledgeEvent _IOPMConnectionAcknowledgeEvent + +IOReturn +_IOPMConnectionCreate ( + CFStringRef myName, + IOPMCapabilityBits interests, + IOPMConnection *newConnection + ); +#define IOPMConnectionCreate _IOPMConnectionCreate + +IOPMCapabilityBits +_IOPMConnectionGetSystemCapabilities (void); +#define IOPMConnectionGetSystemCapabilities _IOPMConnectionGetSystemCapabilities + +IOReturn +_IOPMConnectionRelease ( + IOPMConnection myConnection + ); +#define IOPMConnectionRelease _IOPMConnectionRelease + +void +_IOPMConnectionSetDispatchQueue ( + IOPMConnection myConnection, + dispatch_queue_t myQueue + ); +#define IOPMConnectionSetDispatchQueue _IOPMConnectionSetDispatchQueue + +IOReturn +_IOPMConnectionSetNotification ( + IOPMConnection myConnection, + void *param, + IOPMEventHandlerType handler + ); +#define IOPMConnectionSetNotification _IOPMConnectionSetNotification + +#endif // !TARGET_OS_IPHONE + CFTypeRef _IORegistryEntryCreateCFProperty ( io_registry_entry_t entry, @@ -263,12 +311,6 @@ _SecKeychainCopyDomainDefault ( ); #define SecKeychainCopyDomainDefault _SecKeychainCopyDomainDefault -OSStatus -_SecKeychainGetPreferenceDomain ( - SecPreferencesDomain *domain - ); -#define SecKeychainGetPreferenceDomain _SecKeychainGetPreferenceDomain - OSStatus _SecKeychainOpen ( const char *pathName, @@ -283,12 +325,6 @@ _SecKeychainSetDomainDefault ( ); #define SecKeychainSetDomainDefault _SecKeychainSetDomainDefault -OSStatus -_SecKeychainSetPreferenceDomain ( - SecPreferencesDomain domain - ); -#define SecKeychainSetPreferenceDomain _SecKeychainSetPreferenceDomain - OSStatus _SecKeychainItemCopyContent ( SecKeychainItemRef itemRef, @@ -366,6 +402,9 @@ _SecCertificateCreateWithData ( + + + __END_DECLS #endif // _DY_FRAMEWORK_H diff --git a/SystemConfiguration.fproj/genSCPreferences.c b/SystemConfiguration.fproj/genSCPreferences.c index 69114d5..7689c0e 100644 --- a/SystemConfiguration.fproj/genSCPreferences.c +++ b/SystemConfiguration.fproj/genSCPreferences.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -59,7 +59,7 @@ char copyright_string[] = "/*\n" -" * Copyright (c) 2000-2013 Apple Inc. All rights reserved.\n" +" * Copyright (c) 2000-2014 Apple Inc. All rights reserved.\n" " *\n" " * @APPLE_LICENSE_HEADER_START@\n" " * \n" @@ -114,6 +114,8 @@ typedef enum { SC_10_8_IPHONE_6_0_PRIVATE, SC_10_9_IPHONE_6_0_PRIVATE, SC_10_9_IPHONE_7_0_PRIVATE, + SC_10_10_IPHONE_7_0_PRIVATE, + SC_10_10_IPHONE_8_0_PRIVATE, SC_IPHONE_2_0_PRIVATE, COMMENT_DEPRECATED, GROUP_DEPRECATED, @@ -148,7 +150,7 @@ typedef enum { #define CFARRAY_CFSTRING "CFArray[CFString]" #define CFBOOLEAN "CFBoolean" #define CFDATA "CFData" -#define CFDATE "CFDATE" +#define CFDATE "CFDate" #define CFDICTIONARY "CFDictionary" #define CFNUMBER "CFNumber" #define CFNUMBER_BOOL "CFNumber (0 or 1)" @@ -161,12 +163,14 @@ typedef enum { #define ACSP "ACSP" // Apple Client Server Protocol #define ACTION "Action" #define ACTIVE "Active" +#define ADDITIONAL "Additional" #define ADDRESS "Address" #define ADDRESSES "Addresses" #define AFTER "After" #define AGGRESSIVE "Aggressive" #define AIRPORT "AirPort" #define ALERT "Alert" +#define ALIVE "Alive" #define ALLOW "Allow" #define ALLOWED "Allowed" #define ALLOWNETCREATION "AllowNetCreation" @@ -202,6 +206,7 @@ typedef enum { #define COMPRESSIONVJ "CompressionVJ" #define COMPUTERNAME "ComputerName" #define CONFIGMETHOD "ConfigMethod" +#define CONFIRMED "Confirmed" #define CONNECT "Connect" #define CONNECTDELAY "ConnectDelay" #define CONNECTION "Connection" @@ -239,6 +244,7 @@ typedef enum { #define DNS "DNS" #define DOMAIN "Domain" #define DOMAINS "Domains" +#define DURINGSLEEP "DuringSleep" #define EAP "EAP" #define EAPOL "EAPOL" #define ECHO "Echo" @@ -255,8 +261,10 @@ typedef enum { #define EXCLUDED "Excluded" #define EXCLUDESIMPLEHOSTNAMES "ExcludeSimpleHostnames" #define EXECUTABLE "Executable" +#define EXPENSIVE "Expensive" #define EXTERNAL "External" #define FAILOVER "Failover" +#define FAILURE "Failure" #define FALLBACK "FallBack" #define FILE "File" #define FIREWIRE "FireWire" @@ -385,6 +393,7 @@ typedef enum { #define REMINDER "Reminder" #define REMINDERTIME "ReminderTime" #define REMOTEADDRESS "RemoteAddress" +#define REQUESTED "Requested" #define REQUIRED "Required" #define REQUIREMENT "Requirement" #define RESOLVED "Resolved" @@ -430,6 +439,7 @@ typedef enum { #define SUBNETMASKS "SubnetMasks" #define SUBTYPE "SubType" #define SUPPLEMENTAL "Supplemental" +#define SUPPORTED "Supported" #define SUPPORTSMODEMONHOLD "SupportsModemOnHold" #define SUSPENDED "Suspended" #define SYSTEM "System" @@ -452,6 +462,7 @@ typedef enum { #define USERDEFINEDNAME "UserDefinedName" #define USE "Use" #define USERS "Users" +#define UUID "UUID" #define VENDOR "Vendor" #define VERBOSELOGGING "VerboseLogging" #define VIRTUALNETWORKINTERFACES "VirtualNetworkInterfaces" @@ -490,6 +501,11 @@ static schemaDefinition names[] = { { SC_10_1, PROP, VERSION, NULL, CFSTRING }, { COMMENT, "", NULL, NULL, NULL }, + { GROUP_PRIVATE, NULL, "Generic Keys", NULL, NULL }, + { SC_10_10_IPHONE_8_0_PRIVATE, PROP, CONFIRMED INTERFACENAME, NULL, CFSTRING }, + { COMMENT_PRIVATE, "", NULL, NULL, NULL }, + + { GROUP, PREF, "Preference Keys", NULL, NULL }, { SC_10_1, PREF, CURRENTSET, NULL, CFSTRING }, @@ -551,8 +567,12 @@ static schemaDefinition names[] = { { GROUP_PRIVATE, NETENT, "Network Entity Keys", NULL, NULL }, + { SC_10_10_IPHONE_7_0_PRIVATE, NETENT, ACTIVE DURINGSLEEP REQUESTED, NULL, CFDICTIONARY}, + { SC_10_10_IPHONE_7_0_PRIVATE, NETENT, ACTIVE DURINGSLEEP SUPPORTED, NULL, CFDICTIONARY}, { SC_10_9_IPHONE_7_0_PRIVATE, NETENT, APP LAYER, NULL, CFDICTIONARY}, { SC_10_5_PRIVATE, NETENT, EAPOL, NULL, CFDICTIONARY }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETENT, IPV4 ROUTER ARP FAILURE, NULL, NULL}, + { SC_10_10_IPHONE_8_0_PRIVATE, NETENT, IPV4 ROUTER ARP ALIVE, NULL, NULL}, { SC_10_9_IPHONE_7_0_PRIVATE, NETENT, LINKISSUES, NULL, CFDICTIONARY}, { SC_10_7_IPHONE_5_0_PRIVATE, NETENT, LINKQUALITY, NULL, CFDICTIONARY}, { SC_10_7_IPHONE_4_0_PRIVATE, NETENT, LOOPBACK, NULL, CFDICTIONARY }, @@ -572,7 +592,7 @@ static schemaDefinition names[] = { { SC_10_5_PRIVATE, NETPROP, IGNORELINKSTATUS, NULL, CFBOOLEAN }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, - + { GROUP, NETPROP INTERFACES, KEY_PREFIX COMP NETWORK INTERFACE " Properties", NULL, NULL }, { SC_10_2, NETPROP, INTERFACES, NULL, CFARRAY_CFSTRING }, @@ -653,7 +673,7 @@ static schemaDefinition names[] = { { COMMENT, "", NULL, NULL, NULL }, { GROUP_PRIVATE, NETPROP ETHERNET, KEY_PREFIX NETENT ETHERNET " (Hardware) Entity Keys", NULL, NULL }, - + { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY AV, AV, CFNUMBER_BOOL }, { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY JUMBO_MTU, JUMBO_MTU, CFNUMBER_BOOL }, { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY LRO, LRO, CFNUMBER_BOOL }, @@ -665,7 +685,7 @@ static schemaDefinition names[] = { { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY VLAN_HWTAGGING, VLAN_HWTAGGING, CFNUMBER_BOOL }, { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY VLAN_MTU, VLAN_MTU, CFNUMBER_BOOL }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, - + { GROUP, NETPROP FIREWIRE, KEY_PREFIX NETENT FIREWIRE " (Hardware) Entity Keys", NULL, NULL }, { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL }, @@ -692,9 +712,9 @@ static schemaDefinition names[] = { { SC_10_2, NETVAL INTERFACE SUBTYPE, PPTP, NULL, NULL }, { SC_10_3, NETVAL INTERFACE SUBTYPE, L2TP, NULL, NULL }, { COMMENT, "", NULL, NULL, NULL }, - + { GROUP_PRIVATE, NETPROP INTERFACE, KEY_PREFIX NETENT INTERFACE " Entity Keys", NULL, NULL }, - + { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP INTERFACE TYPE " values ---", NULL, NULL, NULL }, { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL INTERFACE TYPE, LOOPBACK, NULL, NULL }, { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL INTERFACE TYPE, VPN, NULL, NULL }, @@ -766,17 +786,23 @@ static schemaDefinition names[] = { { COMMENT, "", NULL, NULL, NULL }, { GROUP_PRIVATE, NETPROP IPV4, KEY_PREFIX NETENT IPV4 " Entity Keys", NULL, NULL }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP IPV4, ADDITIONAL ROUTES, NULL, CFARRAY_CFDICTIONARY }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4, EXCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4, INCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP IPV4 CONFIGMETHOD " values ---", NULL, NULL, NULL }, { SC_10_5_PRIVATE, NETVAL IPV4 CONFIGMETHOD, FAILOVER, NULL, NULL }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, - { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP IPV4 INCLUDED ROUTES ", " - KEY_PREFIX NETPROP IPV4 EXCLUDED ROUTES " [CFDictionary] keys ---", NULL, NULL, NULL }, + { COMMENT_PRIVATE, + "--- " + KEY_PREFIX NETPROP IPV4 ADDITIONAL ROUTES ", " + KEY_PREFIX NETPROP IPV4 EXCLUDED ROUTES ", " + KEY_PREFIX NETPROP IPV4 INCLUDED ROUTES + " [CFDictionary] keys ---", NULL, NULL, NULL }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4 ROUTE, DESTINATION ADDRESS, NULL, CFSTRING }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4 ROUTE, SUBNETMASK, NULL, CFSTRING }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4 ROUTE, GATEWAY ADDRESS, NULL, CFSTRING }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP IPV4 ROUTE, INTERFACENAME, NULL, CFSTRING }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP IPV4, ARP RESOLVED HARDWARE ADDRESS, NULL, CFSTRING }, { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP IPV4, ARP RESOLVED IP ADDRESS, NULL, CFSTRING }, @@ -800,16 +826,22 @@ static schemaDefinition names[] = { { COMMENT, "", NULL, NULL, NULL }, { GROUP_PRIVATE, NETPROP IPV6, KEY_PREFIX NETENT IPV6 " Entity Keys", NULL, NULL }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP IPV6, ADDITIONAL ROUTES, NULL, CFARRAY_CFDICTIONARY }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6, EXCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6, INCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, - { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP IPV6 INCLUDED ROUTES ", " - KEY_PREFIX NETPROP IPV6 EXCLUDED ROUTES " [CFDictionary] keys ---", NULL, NULL, NULL }, + { COMMENT_PRIVATE, + "--- " + KEY_PREFIX NETPROP IPV6 ADDITIONAL ROUTES ", " + KEY_PREFIX NETPROP IPV6 INCLUDED ROUTES ", " + KEY_PREFIX NETPROP IPV6 EXCLUDED ROUTES + " [CFDictionary] keys ---", NULL, NULL, NULL }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6 ROUTE, DESTINATION ADDRESS, NULL, CFSTRING }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6 ROUTE, PREFIXLENGTH, NULL, CFNUMBER }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6 ROUTE, GATEWAY ADDRESS, NULL, CFSTRING }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP IPV6 ROUTE, INTERFACENAME, NULL, CFSTRING }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, - + { GROUP, NETPROP STF, KEY_PREFIX NETENT STF " Entity Keys", NULL, NULL }, { SC_10_3, NETPROP STF, RELAY, NULL, CFSTRING }, @@ -821,6 +853,10 @@ static schemaDefinition names[] = { { SC_10_2, NETPROP LINK, DETACHING, NULL, CFBOOLEAN }, { COMMENT, "", NULL, NULL, NULL }, + { GROUP_PRIVATE, NETPROP LINK, KEY_PREFIX NETENT LINK " Entity Keys", NULL, NULL }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP LINK, EXPENSIVE, NULL, CFBOOLEAN }, + { COMMENT_PRIVATE, "", NULL, NULL, NULL }, + { GROUP_PRIVATE, NETPROP LINK, KEY_PREFIX NETENT LINKISSUES " Entity Keys", NULL, NULL }, { SC_10_9_IPHONE_7_0_PRIVATE, NETPROP LINKISSUES, MODULEID, NULL, CFDATA }, @@ -1057,9 +1093,9 @@ static schemaDefinition names[] = { { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL, "__SUPPLEMENTAL__", CFARRAY_CFDICTIONARY}, { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH DOMAIN, "__MATCH_DOMAIN__", CFSTRING}, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, - + { GROUP_PRIVATE, NETPROP SERVICE, KEY_PREFIX NETENT SERVICE " Entity Keys", NULL, NULL }, - + { SC_10_6_IPHONE_2_0_PRIVATE, NETPROP SERVICE, PRIMARYRANK, NULL, CFSTRING }, { SC_10_6_IPHONE_2_0_PRIVATE, NETPROP SERVICE, USERDEFINEDNAME, NULL, CFSTRING }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, @@ -1067,6 +1103,7 @@ static schemaDefinition names[] = { { SC_10_6_IPHONE_2_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, FIRST, NULL }, { SC_10_6_IPHONE_2_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, LAST, NULL }, { SC_10_6_IPHONE_2_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, NEVER, NULL }, + { SC_10_10_IPHONE_8_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, SCOPED, NULL }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, { GROUP, NETPROP SMB, KEY_PREFIX NETENT SMB " Entity Keys", NULL, NULL }, @@ -1127,6 +1164,7 @@ static schemaDefinition names[] = { { COMMENT_PRIVATE, "--- " KEY_PREFIX NETVAL VPN APP RULE EXECUTABLE MATCH " [CFDictionary] keys ---", NULL, NULL, NULL }, { SC_10_9_IPHONE_7_0_PRIVATE, NETVAL VPN APP RULE EXECUTABLE, DESIGNATED REQUIREMENT, NULL, CFSTRING }, { SC_10_9_IPHONE_7_0_PRIVATE, NETVAL VPN APP RULE EXECUTABLE, SIGNING IDENTIFIER, NULL, CFSTRING }, + { SC_10_9_IPHONE_7_0_PRIVATE, NETVAL VPN APP RULE EXECUTABLE, UUID, NULL, CFSTRING }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP VPN AUTHENTICATIONMETHOD " values ---", NULL, NULL, NULL }, { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL VPN AUTHENTICATIONMETHOD, PASSWORD, NULL, NULL }, @@ -1280,7 +1318,7 @@ print_comment(schemaDefinition *def) def->prefix, def->key); snprintf(vbuf, sizeof(vbuf), "\"%s\"", def->value ? def->value : def->key); - + if (def->type) printf(" * %-50s %-30s %s\n", kbuf, vbuf, def->type); @@ -1294,7 +1332,7 @@ print_comment(schemaDefinition *def) void print_define(schemaDefinition *def) { - printf("%s %s\n", def->prefix, def->key); + printf("%s\t%s\n", def->prefix, def->key); return; } @@ -1382,6 +1420,10 @@ print_headerdoc(schemaDefinition *def) case SC_10_9_IPHONE_7_0_PRIVATE: printf(" @availability Introduced in Mac OS X 10.9.\n"); break; + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: + printf(" @availability Introduced in Mac OS X 10.10.\n"); + break; case SC_IPHONE_2_0_PRIVATE: printf(" @availability Introduced in iPhone OS 2.0.\n"); break; @@ -1478,6 +1520,12 @@ print_hfile(schemaDefinition *def) case SC_10_9_IPHONE_7_0_PRIVATE: printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/))\n", kbuf); break; + case SC_10_10_IPHONE_7_0_PRIVATE: + printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/))\n", kbuf); + break; + case SC_10_10_IPHONE_8_0_PRIVATE: + printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/))\n", kbuf); + break; case SC_IPHONE_2_0_PRIVATE: printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/))\n", kbuf); break; @@ -1586,7 +1634,7 @@ dump_names(int type) } break; } - + case GROUP: case GROUP_DEPRECATED: { switch (type) { @@ -1662,6 +1710,8 @@ dump_names(int type) case SC_10_8_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: // don't report private definitions break; @@ -1690,6 +1740,8 @@ dump_names(int type) case SC_10_8_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: print_comment(&names[i]); break; @@ -1709,6 +1761,8 @@ dump_names(int type) case SC_10_8_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: // don't report private definitions break; @@ -1727,6 +1781,8 @@ dump_names(int type) case SC_10_8_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: print_headerdoc(&names[i]); break; @@ -1746,6 +1802,8 @@ dump_names(int type) case SC_10_8_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: break; // don't report private definitions @@ -1764,6 +1822,8 @@ dump_names(int type) case SC_10_8_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_6_0_PRIVATE: case SC_10_9_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_7_0_PRIVATE: + case SC_10_10_IPHONE_8_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: print_hfile(&names[i]); break; @@ -1898,7 +1958,7 @@ main(int argc, char * argv[]) printf("/* -------------------- Schema declarations -------------------- */\n\n"); - + dump_names(gen_hfile_e); printf("\n"); @@ -1934,7 +1994,7 @@ main(int argc, char * argv[]) dump_names(gen_hfile_private_e); printf("\n"); - printf("#endif /* _SCSCHEMADEFINITIONSPRIVATE_H */\n"); + printf("#endif\t/* _SCSCHEMADEFINITIONSPRIVATE_H */\n"); } else if (strcmp(type, "cfile") == 0) { printf("/*\n"); diff --git a/SystemConfiguration.fproj/helper/SCHelper_client.c b/SystemConfiguration.fproj/helper/SCHelper_client.c index 1dc443c..7525dc1 100644 --- a/SystemConfiguration.fproj/helper/SCHelper_client.c +++ b/SystemConfiguration.fproj/helper/SCHelper_client.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2007, 2010, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2005-2008, 2010, 2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -251,9 +251,9 @@ _SCHelperExec(mach_port_t port, uint32_t msgID, CFDataRef data, uint32_t *status kr = helperexec(port, msgID, (data != NULL) ? (void *)CFDataGetBytePtr(data) : NULL, - (data != NULL) ? CFDataGetLength(data) : 0, + (data != NULL) ? (mach_msg_type_number_t)CFDataGetLength(data) : 0, (traceData != NULL) ? (void *)CFDataGetBytePtr(traceData) : NULL, - (traceData != NULL) ? CFDataGetLength(traceData) : 0, + (traceData != NULL) ? (mach_msg_type_number_t)CFDataGetLength(traceData) : 0, &replyStatus, &replyRef, &replyLen); diff --git a/SystemConfiguration.fproj/helper/SCHelper_server.c b/SystemConfiguration.fproj/helper/SCHelper_server.c index 160dd69..23ad5e0 100644 --- a/SystemConfiguration.fproj/helper/SCHelper_server.c +++ b/SystemConfiguration.fproj/helper/SCHelper_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2013 Apple Inc. All rights reserved. + * Copyright (c) 2005-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -23,11 +23,11 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -45,9 +45,6 @@ #include "SCHelper_client.h" #include "helper_types.h" -#include - - #pragma mark - #pragma mark SCHelper session managment @@ -163,8 +160,15 @@ __SCHelperSessionSetAuthorization(SCHelperSessionRef session, CFTypeRef authoriz if (sessionPrivate->authorization != NULL) { #if !TARGET_OS_IPHONE if (!__SCHelperSessionUseEntitlement(session)) { - AuthorizationFree(sessionPrivate->authorization, kAuthorizationFlagDefaults); -// AuthorizationFree(sessionPrivate->authorization, kAuthorizationFlagDestroyRights); + OSStatus status; + + status = AuthorizationFree(sessionPrivate->authorization, kAuthorizationFlagDefaults); +// status = AuthorizationFree(sessionPrivate->authorization, kAuthorizationFlagDestroyRights); + if (status != errAuthorizationSuccess) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("AuthorizationFree() failed: status = %d"), + (int)status); + } } else { CFRelease(sessionPrivate->authorization); } @@ -180,15 +184,15 @@ __SCHelperSessionSetAuthorization(SCHelperSessionRef session, CFTypeRef authoriz AuthorizationExternalForm extForm; if (CFDataGetLength(authorizationData) == sizeof(extForm.bytes)) { - OSStatus err; + OSStatus status; bcopy(CFDataGetBytePtr(authorizationData), extForm.bytes, sizeof(extForm.bytes)); - err = AuthorizationCreateFromExternalForm(&extForm, - &sessionPrivate->authorization); - if (err != errAuthorizationSuccess) { + status = AuthorizationCreateFromExternalForm(&extForm, + &sessionPrivate->authorization); + if (status != errAuthorizationSuccess) { SCLog(TRUE, LOG_ERR, CFSTR("AuthorizationCreateFromExternalForm() failed: status = %d"), - (int)err); + (int)status); sessionPrivate->authorization = NULL; ok = FALSE; } @@ -374,7 +378,7 @@ __SCHelperSessionLog(const void *value, void *context) SCLog(TRUE, LOG_NOTICE, CFSTR(" %p {port = %p, caller = %@, path = %s%s}"), session, - CFMachPortGetPort(sessionPrivate->mp), + (void *)(uintptr_t)CFMachPortGetPort(sessionPrivate->mp), prefsPrivate->name, prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path, prefsPrivate->locked ? ", locked" : ""); @@ -1589,9 +1593,9 @@ checkEntitlement(SCHelperSessionRef session, CFStringRef prefsID, CFStringRef en } } else { SCLog(TRUE, LOG_ERR, - CFSTR("hasAuthorization() entitlement=%@: not valid"), - entitlement_name, - sessionName(session)); + CFSTR("hasAuthorization() session=%@: entitlement=%@: not valid"), + sessionName(session), + entitlement_name); } CFRelease(entitlement); @@ -1661,6 +1665,9 @@ hasAuthorization(SCHelperSessionRef session, Boolean needWrite) flags, NULL); if (status != errAuthorizationSuccess) { + SCLog(TRUE, LOG_DEBUG, + CFSTR("AuthorizationCopyRights() failed: status = %d"), + (int)status); return FALSE; } @@ -1916,10 +1923,6 @@ helperCallback(CFMachPortRef port, void *msg, CFIndex size, void *info) static CFIndex bufSize = 0; mach_msg_return_t mr; int options; - int ret = 0; - uint64_t token; - - ret = proc_importance_assertion_begin_with_msg(&bufRequest->Head, NULL, &token); if (bufSize == 0) { // get max size for MiG reply buffers @@ -1996,10 +1999,6 @@ helperCallback(CFMachPortRef port, void *msg, CFIndex size, void *info) done : - if (ret == 0) { - proc_importance_assertion_complete(token); - } - if (bufReply != (mig_reply_error_t *)bufReply_q) CFAllocatorDeallocate(NULL, bufReply); return; @@ -2219,7 +2218,7 @@ _helperexec(mach_port_t server, CFIndex len; ok = _SCSerializeData(reply, (void **)replyRef, &len); - *replyLen = len; + *replyLen = (mach_msg_type_number_t)len; CFRelease(reply); reply = NULL; if (!ok) { @@ -2245,32 +2244,27 @@ helperMPCopyDescription(const void *info) } -static void -init_MiG_1(const launch_data_t l_obj, const char *name, void *info) +static int +init_MiG(const char *service_name, int *n_listeners) { - CFMachPortContext context = { 0 - , (void *)1 - , NULL - , NULL - , helperMPCopyDescription - }; - launch_data_type_t l_type; + CFMachPortContext context = { 0 + , (void *)1 + , NULL + , NULL + , helperMPCopyDescription + }; + kern_return_t kr; CFMachPortRef mp; - int *n_listeners = (int *)info; CFRunLoopSourceRef rls; - mach_port_t service_port; + mach_port_t service_port = MACH_PORT_NULL; - // get the mach port - l_type = (l_obj != NULL) ? launch_data_get_type(l_obj) : 0; - if (l_type != LAUNCH_DATA_MACHPORT) { + kr = bootstrap_check_in(bootstrap_port, service_name, &service_port); + if (kr != BOOTSTRAP_SUCCESS) { SCLog(TRUE, LOG_ERR, - CFSTR("SCHelper: error w/MachServices \"%s\" port (%p, %d)"), - (name != NULL) ? name : "?", - l_obj, - l_type); - return; + CFSTR("SCHelper: bootstrap_check_in() failed: %s"), + bootstrap_strerror(kr)); + return 1; } - service_port = launch_data_get_machport(l_obj); // add a run loop source to listen for new requests mp = _SC_CFMachPortCreateWithPort("SCHelper/server", @@ -2284,27 +2278,6 @@ init_MiG_1(const launch_data_t l_obj, const char *name, void *info) *n_listeners = *n_listeners + 1; - return; -} - - -static int -init_MiG(launch_data_t l_reply, int *n_listeners) -{ - launch_data_t l_machservices; - launch_data_type_t l_type; - - l_machservices = launch_data_dict_lookup(l_reply, LAUNCH_JOBKEY_MACHSERVICES); - l_type = (l_machservices != NULL) ? launch_data_get_type(l_machservices) : 0; - if (l_type != LAUNCH_DATA_DICTIONARY) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCHelper: error w/" LAUNCH_JOBKEY_MACHSERVICES " (%p, %d)"), - l_machservices, - l_type); - return 1; - } - - launch_data_dict_iterate(l_machservices, init_MiG_1, (void *)n_listeners); return 0; } @@ -2326,9 +2299,6 @@ main(int argc, char **argv) int err = 0; int gen_reported = 0; int idle = 0; - launch_data_t l_msg; - launch_data_t l_reply; - launch_data_type_t l_type; int n_listeners = 0; // extern int optind; int opt; @@ -2363,28 +2333,7 @@ main(int argc, char **argv) main_runLoop = CFRunLoopGetCurrent(); - l_msg = launch_data_new_string(LAUNCH_KEY_CHECKIN); - l_reply = launch_msg(l_msg); - launch_data_free(l_msg); - l_type = (l_reply != NULL) ? launch_data_get_type(l_reply) : 0; - if (l_type != LAUNCH_DATA_DICTIONARY) { - SCLog(TRUE, LOG_ERR, - CFSTR("SCHelper: error w/launchd " LAUNCH_KEY_CHECKIN " dictionary (%p, %d)"), - l_reply, - l_type); - err = 1; - goto done; - } - - err = init_MiG(l_reply, &n_listeners); - if (err != 0) { - goto done; - } - - done : - - if (l_reply != NULL) launch_data_free(l_reply); - + err = init_MiG("com.apple.SystemConfiguration.helper", &n_listeners); if ((err != 0) || (n_listeners == 0)) { exit(err); } diff --git a/SystemConfiguration.fproj/moh.c b/SystemConfiguration.fproj/moh.c index 0b87ff0..e4853aa 100644 --- a/SystemConfiguration.fproj/moh.c +++ b/SystemConfiguration.fproj/moh.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, 2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2002, 2003, 2005, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -144,7 +144,7 @@ MOHExec(int ref, bzero(&msg, sizeof(msg)); msg.m_type = cmd; msg.m_link = link; - msg.m_len = ((request != NULL) && (requestLen > 0)) ? requestLen : 0; + msg.m_len = ((request != NULL) && (requestLen > 0)) ? (uint32_t)requestLen : 0; // send the command n = writen(ref, &msg, sizeof(msg)); @@ -152,7 +152,7 @@ MOHExec(int ref, SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: %s"), strerror(errno)); return errno; } else if (n != sizeof(msg)) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: wrote=%d"), n); + SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: wrote=%ld"), n); return -1; } @@ -162,7 +162,7 @@ MOHExec(int ref, SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: %s"), strerror(errno)); return errno; } else if (n != (ssize_t)requestLen) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: wrote=%d"), n); + SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec writen() failed: wrote=%ld"), n); return -1; } } @@ -173,7 +173,7 @@ MOHExec(int ref, SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: error=%s"), strerror(errno)); return errno; } else if (n != sizeof(msg)) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: insufficent data, read=%d"), n); + SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: insufficent data, read=%ld"), n); return -1; } @@ -187,7 +187,7 @@ MOHExec(int ref, CFAllocatorDeallocate(NULL, buf); return errno; } else if (n != (ssize_t)msg.m_len) { - SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: insufficent data, read=%d"), n); + SCLog(_sc_verbose, LOG_ERR, CFSTR("MOHExec readn() failed: insufficent data, read=%ld"), n); CFAllocatorDeallocate(NULL, buf); return -1; } diff --git a/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c b/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c index 13196ea..41fc802 100644 --- a/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c +++ b/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_client.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -26,8 +26,6 @@ #include #include "SCNetworkReachabilityInternal.h" -#ifdef HAVE_REACHABILITY_SERVER - #include #include #include @@ -71,7 +69,13 @@ _rbt_compare_transaction_nodes(void *context, const void *n1, const void *n2) uint64_t a = (uintptr_t)(((reach_request_t *)n1)->target); uint64_t b = (uintptr_t)(((reach_request_t *)n2)->target); - return (a - b); + if (a == b) { + return 0; + } else if (a < b) { + return -1; + } else { + return 1; + } } @@ -81,7 +85,13 @@ _rbt_compare_transaction_key(void *context, const void *n1, const void *key) uint64_t a = (uintptr_t)(((reach_request_t *)n1)->target); uint64_t b = *(uint64_t *)key; - return (a - b); + if (a == b) { + return 0; + } else if (a < b) { + return -1; + } else { + return 1; + } } @@ -155,9 +165,7 @@ _reach_request_add(SCNetworkReachabilityRef target) request = rb_tree_find_node(rbt, &target_id); if (request == NULL) { request = _reach_request_create(target); - if (request == NULL || !rb_tree_insert_node(rbt, request)) { - __builtin_trap(); - } + rb_tree_insert_node(rbt, request); } }); @@ -220,7 +228,7 @@ handle_reachability_status(SCNetworkReachabilityRef target, xpc_object_t dict) // log_xpc_object(" status", dict); } - __SCNetworkReachabilityPerformConcurrent(target); + __SCNetworkReachabilityUpdateConcurrent(target); return; } @@ -238,7 +246,7 @@ handle_async_notification(SCNetworkReachabilityRef target, xpc_object_t dict) handle_reachability_status(target, dict); break; default : - SCLog(TRUE, LOG_ERR, CFSTR("%sgot [async] unknown reply : %d"), + SCLog(TRUE, LOG_ERR, CFSTR("%sgot [async] unknown reply : %lld"), targetPrivate->log_prefix, op); log_xpc_object(" reply", dict); @@ -270,14 +278,14 @@ _reach_connection_reconnect(xpc_connection_t connection); static xpc_connection_t _reach_connection_create() { - xpc_connection_t c; + xpc_connection_t c; #if !TARGET_IPHONE_SIMULATOR - const uint64_t flags = XPC_CONNECTION_MACH_SERVICE_PRIVILEGED; + const uint64_t flags = XPC_CONNECTION_MACH_SERVICE_PRIVILEGED; #else // !TARGET_IPHONE_SIMULATOR - const uint64_t flags = 0; + const uint64_t flags = 0; #endif // !TARGET_IPHONE_SIMULATOR - const char *name; - dispatch_queue_t q = _reach_xpc_queue(); + const char *name; + dispatch_queue_t q = _reach_xpc_queue(); // create XPC connection name = getenv("REACH_SERVER"); @@ -340,7 +348,7 @@ _reach_connection_create() } else { SCLog(TRUE, LOG_ERR, - CFSTR("reach client %p: unknown event type : %x"), + CFSTR("reach client %p: unknown event type : %p"), c, type); } @@ -359,7 +367,7 @@ _reach_connection() static dispatch_queue_t q; if (!serverAvailable) { - // if SCNetworkReachabilty [XPC] server not available + // if SCNetworkReachability [XPC] server not available return NULL; } @@ -416,22 +424,33 @@ _reach_server_target_add(xpc_connection_t connection, SCNetworkReachabilityRef t xpc_dictionary_set_int64(reqdict, REACH_REQUEST, REACH_REQUEST_CREATE); // add reachability target info - if (targetPrivate->name != NULL) { - xpc_dictionary_set_string(reqdict, - REACH_TARGET_NAME, - targetPrivate->name); - } - if (targetPrivate->localAddress != NULL) { - xpc_dictionary_set_data(reqdict, - REACH_TARGET_LOCAL_ADDR, - targetPrivate->localAddress, - targetPrivate->localAddress->sa_len); - } - if (targetPrivate->remoteAddress != NULL) { - xpc_dictionary_set_data(reqdict, - REACH_TARGET_REMOTE_ADDR, - targetPrivate->remoteAddress, - targetPrivate->remoteAddress->sa_len); + switch (targetPrivate->type) { + case reachabilityTypeName : + xpc_dictionary_set_string(reqdict, + REACH_TARGET_NAME, + targetPrivate->name); + break; + case reachabilityTypeAddress : + case reachabilityTypeAddressPair : + if (targetPrivate->localAddress != NULL) { + xpc_dictionary_set_data(reqdict, + REACH_TARGET_LOCAL_ADDR, + targetPrivate->localAddress, + targetPrivate->localAddress->sa_len); + } + if (targetPrivate->remoteAddress != NULL) { + xpc_dictionary_set_data(reqdict, + REACH_TARGET_REMOTE_ADDR, + targetPrivate->remoteAddress, + targetPrivate->remoteAddress->sa_len); + } + break; + case reachabilityTypePTR : + xpc_dictionary_set_data(reqdict, + REACH_TARGET_PTR_ADDR, + targetPrivate->remoteAddress, + targetPrivate->remoteAddress->sa_len); + break; } if (targetPrivate->if_index != 0) { xpc_dictionary_set_int64(reqdict, @@ -663,11 +682,11 @@ _reach_reply_set_reachability(SCNetworkReachabilityRef target, targetPrivate->serverInfo.cycle = xpc_dictionary_get_uint64(reply, REACH_STATUS_CYCLE); - targetPrivate->serverInfo.flags = xpc_dictionary_get_uint64(reply, - REACH_STATUS_FLAGS); + targetPrivate->serverInfo.flags = (SCNetworkReachabilityFlags)xpc_dictionary_get_uint64(reply, + REACH_STATUS_FLAGS); - targetPrivate->serverInfo.if_index = xpc_dictionary_get_uint64(reply, - REACH_STATUS_IF_INDEX); + targetPrivate->serverInfo.if_index = (unsigned int)xpc_dictionary_get_uint64(reply, + REACH_STATUS_IF_INDEX); bzero(&targetPrivate->serverInfo.if_name, sizeof(targetPrivate->serverInfo.if_name)); if_name = (void *)xpc_dictionary_get_data(reply, @@ -684,7 +703,7 @@ _reach_reply_set_reachability(SCNetworkReachabilityRef target, targetPrivate->serverInfo.sleeping = xpc_dictionary_get_bool(reply, REACH_STATUS_SLEEPING); - if (targetPrivate->type == reachabilityTypeName) { + if (isReachabilityTypeName(targetPrivate->type)) { xpc_object_t addresses; if (targetPrivate->resolvedAddresses != NULL) { @@ -692,8 +711,8 @@ _reach_reply_set_reachability(SCNetworkReachabilityRef target, targetPrivate->resolvedAddresses = NULL; } - targetPrivate->resolvedError = xpc_dictionary_get_int64(reply, - REACH_STATUS_RESOLVED_ERROR); + targetPrivate->resolvedError = (int)xpc_dictionary_get_int64(reply, + REACH_STATUS_RESOLVED_ERROR); addresses = xpc_dictionary_get_value(reply, REACH_STATUS_RESOLVED_ADDRESSES); if ((addresses != NULL) && (xpc_get_type(addresses) != XPC_TYPE_ARRAY)) { @@ -702,21 +721,31 @@ _reach_reply_set_reachability(SCNetworkReachabilityRef target, if ((targetPrivate->resolvedError == NETDB_SUCCESS) && (addresses != NULL)) { int i; - int n; + size_t n; CFMutableArrayRef newAddresses; newAddresses = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); n = xpc_array_get_count(addresses); for (i = 0; i < n; i++) { - struct addrinfo *sa; - size_t len; - CFDataRef newAddress; - - sa = (struct addrinfo *)xpc_array_get_data(addresses, i, &len); - newAddress = CFDataCreate(NULL, (const UInt8 *)sa, len); - CFArrayAppendValue(newAddresses, newAddress); - CFRelease(newAddress); + if (targetPrivate->type == reachabilityTypeName) { + struct sockaddr *sa; + size_t len; + CFDataRef newAddress; + + sa = (struct sockaddr *)xpc_array_get_data(addresses, i, &len); + newAddress = CFDataCreate(NULL, (const UInt8 *)sa, len); + CFArrayAppendValue(newAddresses, newAddress); + CFRelease(newAddress); + } else if (targetPrivate->type == reachabilityTypePTR) { + const char *str; + CFStringRef newName; + + str = xpc_array_get_string(addresses, i); + newName = CFStringCreateWithCString(NULL, str, kCFStringEncodingUTF8); + CFArrayAppendValue(newAddresses, newName); + CFRelease(newName); + } } targetPrivate->resolvedAddresses = newAddresses; @@ -724,6 +753,10 @@ _reach_reply_set_reachability(SCNetworkReachabilityRef target, /* save the error associated with the attempt to resolve the name */ targetPrivate->resolvedAddresses = CFRetain(kCFNull); } + + targetPrivate->dnsFlags = (uint32_t)xpc_dictionary_get_uint64(reply, + REACH_STATUS_DNS_FLAGS); + targetPrivate->needResolve = FALSE; } @@ -794,7 +827,7 @@ _reach_server_target_status(xpc_connection_t connection, SCNetworkReachabilityRe targetPrivate->log_prefix, targetPrivate->serverInfo.flags); if (targetPrivate->serverInfo.if_index != 0) { - SCLog(TRUE, LOG_INFO, CFSTR("%s device = %s (%hu%s)"), + SCLog(TRUE, LOG_INFO, CFSTR("%s device = %s (%u%s)"), targetPrivate->log_prefix, targetPrivate->serverInfo.if_name, targetPrivate->serverInfo.if_index, @@ -966,8 +999,8 @@ _reach_server_target_reconnect(xpc_connection_t connection, SCNetworkReachabilit // For addresses, update our status now. For names, queries will // be updated with a callback - if (targetPrivate->type != reachabilityTypeName) { - __SCNetworkReachabilityPerform(target); + if (isReachabilityTypeAddress(targetPrivate->type)) { + __SCNetworkReachabilityUpdate(target); } return; @@ -1183,5 +1216,3 @@ __SCNetworkReachabilityServer_targetUnschedule(SCNetworkReachabilityRef target) } - -#endif // HAVE_REACHABILITY_SERVER diff --git a/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c b/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c index 8527f32..50f090c 100644 --- a/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c +++ b/SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -26,8 +26,6 @@ #include #include "SCNetworkReachabilityInternal.h" -#ifdef HAVE_REACHABILITY_SERVER - #include #include #include @@ -96,7 +94,6 @@ _server_concurrent_queue() dispatch_once(&once, ^{ q = dispatch_queue_create(REACH_SERVICE_NAME ".concurrent", DISPATCH_QUEUE_CONCURRENT); - dispatch_queue_set_width(q, 32); }); return q; @@ -262,7 +259,7 @@ _target_reply_add_reachability(SCNetworkReachabilityRef target, xpc_dictionary_set_bool (reply, REACH_STATUS_SLEEPING, targetPrivate->info.sleeping); - if (targetPrivate->type == reachabilityTypeName) { + if (isReachabilityTypeName(targetPrivate->type)) { if (isA_CFArray(targetPrivate->resolvedAddresses)) { xpc_object_t addresses; CFIndex i; @@ -272,13 +269,22 @@ _target_reply_add_reachability(SCNetworkReachabilityRef target, n = CFArrayGetCount(targetPrivate->resolvedAddresses); for (i = 0; i < n; i++) { - CFDataRef address; - - address = CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i); - xpc_array_set_data(addresses, - XPC_ARRAY_APPEND, - CFDataGetBytePtr(address), - CFDataGetLength(address)); + if (targetPrivate->type == reachabilityTypeName) { + CFDataRef address; + + address = CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i); + xpc_array_set_data(addresses, + XPC_ARRAY_APPEND, + CFDataGetBytePtr(address), + CFDataGetLength(address)); + } else if (targetPrivate->type == reachabilityTypePTR) { + CFStringRef name; + char str[MAXHOSTNAMELEN]; + + name = CFArrayGetValueAtIndex(targetPrivate->resolvedAddresses, i); + _SC_cfstring_to_cstring(name, str, sizeof(str), kCFStringEncodingUTF8); + xpc_array_set_string(addresses, XPC_ARRAY_APPEND, str); + } } xpc_dictionary_set_value(reply, @@ -289,6 +295,10 @@ _target_reply_add_reachability(SCNetworkReachabilityRef target, xpc_dictionary_set_int64(reply, REACH_STATUS_RESOLVED_ERROR, targetPrivate->resolvedError); + xpc_dictionary_set_uint64(reply, + REACH_STATUS_DNS_FLAGS, + targetPrivate->dnsFlags); + } MUTEX_UNLOCK(&targetPrivate->lock); @@ -374,7 +384,7 @@ _target_watcher_add(SCNetworkReachabilityRef target, if (S_debug) { SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: watcher added, c=0x%0llx, n=%d"), + CFSTR("<%p> target %p: watcher added, c=0x%0llx, n=%ld"), connection, target, target_id, @@ -480,7 +490,7 @@ _target_watcher_remove(SCNetworkReachabilityRef target, if (S_debug) { SCLog(TRUE, LOG_INFO, - CFSTR("<%p> target %p: watcher removed, c=0x%0llx, n=%d"), + CFSTR("<%p> target %p: watcher removed, c=0x%0llx, n=%ld"), connection, target, // server target_id, // client @@ -536,7 +546,13 @@ _rbt_compare_transaction_nodes(void *context, const void *n1, const void *n2) uint64_t a = (uintptr_t)((reach_client_t *)n1)->connection; uint64_t b = (uintptr_t)((reach_client_t *)n2)->connection; - return (a - b); + if (a == b) { + return 0; + } else if (a < b) { + return -1; + } else { + return 1; + } } @@ -546,7 +562,13 @@ _rbt_compare_transaction_key(void *context, const void *n1, const void *key) uint64_t a = (uintptr_t)((reach_client_t *)n1)->connection; uint64_t b = *(uintptr_t *)key; - return (a - b); + if (a == b) { + return 0; + } else if (a < b) { + return -1; + } else { + return 1; + } } @@ -810,14 +832,16 @@ _reach_changed(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags return; } - /* - * Because we are actively watching for additional changes - * we mark the flags as "valid" - */ - if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { - if (S_debug) { - SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\""), - targetPrivate->log_prefix); + if (!isReachabilityTypeName(targetPrivate->type) || !targetPrivate->dnsNoAddressesSinceLastTimeout) { + /* + * Because we are actively watching for additional changes + * we mark the flags as "valid" + */ + if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { + if (S_debug) { + SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\""), + targetPrivate->log_prefix); + } } } @@ -933,11 +957,14 @@ target_add(reach_client_t *client, xpc_object_t request) struct sockaddr_storage localAddress0; const struct sockaddr *remoteAddress; struct sockaddr_storage remoteAddress0; + const struct sockaddr *ptrAddress; + struct sockaddr_storage ptrAddress0; int64_t if_index; const char *if_name = NULL; bool onDemandBypass = FALSE; bool resolverBypass = FALSE; uint64_t target_id; + uid_t uid = 0; unsigned char bytes[CC_SHA1_DIGEST_LENGTH]; @@ -983,7 +1010,7 @@ target_add(reach_client_t *client, xpc_object_t request) 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)); + CC_SHA1_Update(&ctx, name, (CC_LONG)strlen(name)); } localAddress = xpc_dictionary_get_data(request, REACH_TARGET_LOCAL_ADDR, &len); @@ -991,7 +1018,7 @@ target_add(reach_client_t *client, xpc_object_t request) 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); + CC_SHA1_Update(&ctx, &localAddress0, (CC_LONG)len); } else { xpc_dictionary_set_string(reply, REACH_REQUEST_REPLY_DETAIL, @@ -1005,7 +1032,7 @@ target_add(reach_client_t *client, xpc_object_t request) 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); + CC_SHA1_Update(&ctx, &remoteAddress0, (CC_LONG)len); } else { xpc_dictionary_set_string(reply, REACH_REQUEST_REPLY_DETAIL, @@ -1014,12 +1041,26 @@ target_add(reach_client_t *client, xpc_object_t request) } } + ptrAddress = xpc_dictionary_get_data(request, REACH_TARGET_PTR_ADDR, &len); + if (ptrAddress != NULL) { + if ((len == ptrAddress->sa_len) && (len <= sizeof(struct sockaddr_storage))) { + sanitize_address(ptrAddress, (struct sockaddr *)&ptrAddress0); + CC_SHA1_Update(&ctx, REACH_TARGET_PTR_ADDR, sizeof(REACH_TARGET_PTR_ADDR)); + CC_SHA1_Update(&ctx, &ptrAddress0, (CC_LONG)len); + } else { + xpc_dictionary_set_string(reply, + REACH_REQUEST_REPLY_DETAIL, + "ptr address: size error"); + goto done; + } + } + if_index = xpc_dictionary_get_int64(request, REACH_TARGET_IF_INDEX); 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)); + CC_SHA1_Update(&ctx, if_name, (CC_LONG)strlen(if_name)); } } @@ -1036,6 +1077,10 @@ target_add(reach_client_t *client, xpc_object_t request) CC_SHA1_Update(&ctx, &resolverBypass, sizeof(resolverBypass)); } + // Grab UID from XPC connection + uid = xpc_connection_get_euid(remote); + CC_SHA1_Update(&ctx, &uid, sizeof(uid)); + CC_SHA1_Final(bytes, &ctx); digest = CFDataCreate(NULL, bytes, sizeof(bytes)); @@ -1073,6 +1118,11 @@ target_add(reach_client_t *client, xpc_object_t request) CFDictionarySetValue(options, kSCNetworkReachabilityOptionRemoteAddress, data); CFRelease(data); } + if (ptrAddress != NULL) { + data = CFDataCreate(NULL, (const UInt8 *)&ptrAddress0, ptrAddress0.ss_len); + CFDictionarySetValue(options, kSCNetworkReachabilityOptionPTRAddress, data); + CFRelease(data); + } if (onDemandBypass) { CFDictionarySetValue(options, kSCNetworkReachabilityOptionConnectionOnDemandBypass, @@ -1096,13 +1146,16 @@ target_add(reach_client_t *client, xpc_object_t request) return; } + // Set the UID on the target + ((SCNetworkReachabilityPrivateRef)target)->uid = uid; + // because the interface name may not (no longer) be valid we set - // this after we've created the SCNetworkReachabilty object + // this after we've created the SCNetworkReachability object if ((if_index != 0) && (if_name != NULL)) { SCNetworkReachabilityPrivateRef targetPrivate; targetPrivate = (SCNetworkReachabilityPrivateRef)target; - targetPrivate->if_index = if_index; + targetPrivate->if_index = (unsigned int)if_index; strlcpy(targetPrivate->if_name, if_name, sizeof(targetPrivate->if_name)); } @@ -1364,7 +1417,7 @@ target_status(reach_client_t *client, xpc_object_t request) * ... and if it's not a "name" query then we can mark the * flags as valid. */ - if (targetPrivate->type != reachabilityTypeName) { + if (!isReachabilityTypeName(targetPrivate->type)) { if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { if (S_debug) { SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\"."), @@ -1448,7 +1501,7 @@ target_status(reach_client_t *client, xpc_object_t request) */ if (ok && targetPrivate->scheduled && - targetPrivate->type != reachabilityTypeName) { + !isReachabilityTypeName(targetPrivate->type)) { if (_SC_ATOMIC_CMPXCHG(&targetPrivate->serverInfoValid, FALSE, TRUE)) { if (S_debug) { SCLog(TRUE, LOG_INFO, CFSTR("%s flags are now \"valid\"!"), @@ -1651,22 +1704,22 @@ _snapshot_digest(const void *key, const void *value, void *context) SCPrint(TRUE, f, CFSTR("\n digest : %@\n"), digest); SCPrint(TRUE, f, CFSTR(" %@\n"), target); - SCPrint(TRUE, f, CFSTR(" valid = %s, async watchers = %u, sync queries = %u, refs = %u\n"), + SCPrint(TRUE, f, CFSTR(" valid = %s, async watchers = %ld, sync queries = %u, refs = %u\n"), targetPrivate->serverInfoValid ? "Y" : "N", nWatchers, targetPrivate->serverSyncQueryActive, targetPrivate->serverReferences); - SCPrint(TRUE, f, CFSTR(" network %d.%3.3d"), + SCPrint(TRUE, f, CFSTR(" network %ld.%3.3d"), targetPrivate->last_network.tv_sec, targetPrivate->last_network.tv_usec / 1000); #if !TARGET_OS_IPHONE - SCPrint(TRUE, f, CFSTR(", power %d.%3.3d"), + SCPrint(TRUE, f, CFSTR(", power %ld.%3.3d"), targetPrivate->last_power.tv_sec, targetPrivate->last_power.tv_usec / 1000); #endif // !TARGET_OS_IPHONE - if (targetPrivate->type == reachabilityTypeName) { - SCPrint(TRUE, f, CFSTR(", DNS %d.%3.3d"), + if (isReachabilityTypeName(targetPrivate->type)) { + SCPrint(TRUE, f, CFSTR(", DNS %ld.%3.3d"), targetPrivate->last_dns.tv_sec, targetPrivate->last_dns.tv_usec / 1000); if (timerisset(&targetPrivate->dnsQueryEnd)) { @@ -1675,7 +1728,7 @@ _snapshot_digest(const void *key, const void *value, void *context) timersub(&targetPrivate->dnsQueryEnd, &targetPrivate->dnsQueryStart, &dnsQueryElapsed); - SCPrint(TRUE, f, CFSTR(" (query %d.%3.3d / reply %d.%3.3d)"), + SCPrint(TRUE, f, CFSTR(" (query %ld.%3.3d / reply %ld.%3.3d)"), targetPrivate->dnsQueryStart.tv_sec, targetPrivate->dnsQueryStart.tv_usec / 1000, dnsQueryElapsed.tv_sec, @@ -1683,10 +1736,12 @@ _snapshot_digest(const void *key, const void *value, void *context) } } if (timerisset(&targetPrivate->last_push)) { - SCPrint(TRUE, f, CFSTR(", last notify %d.%3.3d"), + SCPrint(TRUE, f, CFSTR(", last notify %ld.%3.3d"), targetPrivate->last_push.tv_sec, targetPrivate->last_push.tv_usec / 1000); } + SCPrint(TRUE, f, CFSTR(", uid %d"), + targetPrivate->uid); SCPrint(TRUE, f, CFSTR("\n")); if (nWatchers > 0) { @@ -1874,7 +1929,7 @@ process_request(reach_client_t *client, xpc_object_t request) break; default : SCLog(TRUE, LOG_ERR, - CFSTR("<%p> unknown request : %d"), + CFSTR("<%p> unknown request : %lld"), client->connection, op); break; @@ -1964,7 +2019,7 @@ process_new_connection(xpc_connection_t connection) } else { SCLog(TRUE, LOG_ERR, - CFSTR("<%p:%d> Connection error: %d : %s"), + CFSTR("<%p:%d> Connection error: %p : %s"), connection, xpc_connection_get_pid(connection), xobj, @@ -1973,7 +2028,7 @@ process_new_connection(xpc_connection_t connection) } else { SCLog(TRUE, LOG_ERR, - CFSTR("<%p:%d> unknown event type : %x"), + CFSTR("<%p:%d> unknown event type : %p"), connection, xpc_connection_get_pid(connection), type); @@ -2035,14 +2090,14 @@ load_SCNetworkReachability(CFBundleRef bundle, Boolean bundleVerbose) SCLog(TRUE, LOG_ERR, CFSTR("reach server: %s"), desc); } else { SCLog(TRUE, LOG_ERR, - CFSTR("reach server: Connection error: %d : %s"), + CFSTR("reach server: Connection error: %p : %s"), event, desc); } } else { SCLog(TRUE, LOG_ERR, - CFSTR("reach server: unknown event type : %x"), + CFSTR("reach server: unknown event type : %p"), type); } }); @@ -2068,5 +2123,3 @@ main(int argc, char **argv) } #endif /* MAIN */ - -#endif // HAVE_REACHABILITY_SERVER diff --git a/SystemConfiguration.fproj/scprefs_observer.c b/SystemConfiguration.fproj/scprefs_observer.c index 6d9a074..7ac2898 100644 --- a/SystemConfiguration.fproj/scprefs_observer.c +++ b/SystemConfiguration.fproj/scprefs_observer.c @@ -68,7 +68,7 @@ iterate_dir(const char *d_name, const char *f_name, * the path and last modification time in * the digest */ - CC_SHA1_Update(ctxP, full_path, strlen(full_path)); + CC_SHA1_Update(ctxP, full_path, (CC_LONG)strlen(full_path)); CC_SHA1_Update(ctxP, (void *)&s.st_mtimespec.tv_sec, sizeof(s.st_mtimespec.tv_sec)); @@ -80,7 +80,7 @@ iterate_dir(const char *d_name, const char *f_name, return; } -static CFDataRef +static CF_RETURNS_RETAINED CFDataRef build_digest(const char *top_dir, const char *file) { unsigned char bytes[CC_SHA1_DIGEST_LENGTH]; @@ -215,8 +215,8 @@ prefs_observer_priv_create(_scprefs_observer_type type, dispatch_queue_t queue, dispatch_block_t block) { - scprefs_observer_t observer; - int path_buflen; + scprefs_observer_t observer; + size_t path_buflen; path_buflen = strlen(plist_name) + 1; @@ -242,17 +242,18 @@ _scprefs_observer_watch(_scprefs_observer_type type, const char *plist_name, scprefs_observer_t elem; static dispatch_once_t initialized; - dispatch_once(&initialized, ^{ _prefs_observer_init(); } ); + dispatch_once(&initialized, ^{ + _prefs_observer_init(); + }); elem = prefs_observer_priv_create(type, plist_name, queue, block); SCLog(_sc_verbose, LOG_NOTICE, CFSTR("Created a new element to watch for %s \n"), elem->file); - dispatch_sync(prefs_observer_queue, - ^{ - /* Enqueue the request */ - SLIST_INSERT_HEAD(&head, elem, next); - }); + dispatch_sync(prefs_observer_queue, ^{ + /* Enqueue the request */ + SLIST_INSERT_HEAD(&head, elem, next); + }); return (elem); } @@ -261,9 +262,9 @@ _scprefs_observer_watch(_scprefs_observer_type type, const char *plist_name, void _scprefs_observer_cancel(scprefs_observer_t observer) { - dispatch_sync(prefs_observer_queue, - ^{ prefs_observer_release((scprefs_observer_t)observer); }); - + dispatch_sync(prefs_observer_queue, ^{ + prefs_observer_release((scprefs_observer_t)observer); + }); } #pragma mark - @@ -306,19 +307,29 @@ int main() switch (random % 3) { case 0: - dispatch_async(q, ^{ _SC_prefs_observer_cancel(observer1); - observer1 = NULL; }); - dispatch_async(q, ^{ if (observer != NULL) _SC_prefs_observer_cancel(observer); - observer = _SC_prefs_observer_watch(SC_prefs_observer_type_mcx, - "test", q2, b2); } ); - dispatch_sync( q, ^{observer1 = observer; }); + dispatch_async(q, ^{ + _SC_prefs_observer_cancel(observer1); + observer1 = NULL; + }); + dispatch_async(q, ^{ + if (observer != NULL) _SC_prefs_observer_cancel(observer); + observer = _SC_prefs_observer_watch(SC_prefs_observer_type_mcx, "test", q2, b2); + }); + dispatch_sync(q, ^{ + observer1 = observer; + }); sleep(random); break; case 1: - dispatch_async(q, ^{ _SC_prefs_observer_cancel(observer2); }); - dispatch_async(q, ^{ if (observer != NULL) _SC_prefs_observer_cancel(observer); }); - dispatch_sync( q, ^{observer = _SC_prefs_observer_watch(SC_prefs_observer_type_mcx, - "test", q2, b2); } ); + dispatch_async(q, ^{ + _SC_prefs_observer_cancel(observer2); + }); + dispatch_async(q, ^{ + if (observer != NULL) _SC_prefs_observer_cancel(observer); + }); + dispatch_sync(q, ^{ + observer = _SC_prefs_observer_watch(SC_prefs_observer_type_mcx, "test", q2, b2); + }); sleep(random); break; case 2: diff --git a/SystemConfiguration.fproj/scprefs_observer.h b/SystemConfiguration.fproj/scprefs_observer.h index a80ef47..6839dc1 100644 --- a/SystemConfiguration.fproj/scprefs_observer.h +++ b/SystemConfiguration.fproj/scprefs_observer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,6 +24,11 @@ #ifndef _SCPREFS_OBSERVER_H #define _SCPREFS_OBSERVER_H +#include +#include +#include +#include + typedef enum { #if !TARGET_OS_IPHONE scprefs_observer_type_mcx = 1, @@ -35,14 +40,16 @@ typedef enum { typedef struct _scprefs_observer_t * scprefs_observer_t; +__BEGIN_DECLS + /*! @function prefs_observer_watch @discussion Sends a notification to interested configuration agents when a particular preference file has changed. - @param type - the type of preference (MCX on OSX, Global/Profiles on iOS) to watch. - @param plist - the name of the plist file to watch. - @param queue - the queue to be called back on. - @param block - the block to be called back on. + @param type the type of preference (MCX on OSX, Global/Profiles on iOS) to watch. + @param plist the name of the plist file to watch. + @param queue the queue to be called back on. + @param block the block to be called back on. @result Returns the created preferences observer */ scprefs_observer_t @@ -52,9 +59,11 @@ _scprefs_observer_watch(_scprefs_observer_type type, const char *plist_name, /*! @function prefs_observer_watch @discussion Cancells/deregisters the given preferences watcher. - @param observer - the watcher to be cancelled. + @param observer the watcher to be cancelled. */ void _scprefs_observer_cancel(scprefs_observer_t observer); +__END_DECLS + #endif /* _SCPREFS_OBSERVER_H */ diff --git a/configd.tproj/_configadd.c b/configd.tproj/_configadd.c index 8f01964..0f5b11e 100644 --- a/configd.tproj/_configadd.c +++ b/configd.tproj/_configadd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2004, 2006, 2008, 2011, 2012, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -197,6 +197,11 @@ _configadd_s(mach_port_t server, goto done; } + if (!hasWriteAccess(mySession, key)) { + *sc_status = kSCStatusAccessError; + goto done; + } + // force "useSessionKeys" storePrivate = (SCDynamicStorePrivateRef)mySession->store; useSessionKeys = storePrivate->useSessionKeys; diff --git a/configd.tproj/_configget.c b/configd.tproj/_configget.c index d2a334e..ec842f7 100644 --- a/configd.tproj/_configget.c +++ b/configd.tproj/_configget.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2008, 2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -109,7 +109,7 @@ _configget(mach_port_t server, /* serialize the data */ ok = _SCSerializeData(value, (void **)dataRef, &len); - *dataLen = len; + *dataLen = (mach_msg_type_number_t)len; CFRelease(value); if (!ok) { *sc_status = kSCStatusFailed; @@ -189,7 +189,7 @@ __SCDynamicStoreCopyMultiple(SCDynamicStoreRef store, CFArrayRef keys, CFArrayRe if (_configd_trace) { SCTrace(TRUE, _configd_trace, - CFSTR("copy m : %5d : %d keys, %d patterns\n"), + CFSTR("copy m : %5d : %ld keys, %ld patterns\n"), storePrivate->server, keys ? CFArrayGetCount(keys) : 0, patterns ? CFArrayGetCount(patterns) : 0); @@ -288,7 +288,7 @@ _configget_m(mach_port_t server, /* serialize the dictionary of matching keys/patterns */ ok = _SCSerialize(dict, NULL, (void **)dataRef, &len); - *dataLen = len; + *dataLen = (mach_msg_type_number_t)len; CFRelease(dict); if (!ok) { *sc_status = kSCStatusFailed; diff --git a/configd.tproj/_configlist.c b/configd.tproj/_configlist.c index 87ba955..95f655c 100644 --- a/configd.tproj/_configlist.c +++ b/configd.tproj/_configlist.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2006-2008, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -139,7 +139,7 @@ _configlist(mach_port_t server, /* serialize the list of keys */ ok = _SCSerialize(subKeys, NULL, (void **)listRef, &len); - *listLen = len; + *listLen = (mach_msg_type_number_t)len; CFRelease(subKeys); if (!ok) { *sc_status = kSCStatusFailed; diff --git a/configd.tproj/_configset.c b/configd.tproj/_configset.c index 0dd2b41..9ab2725 100644 --- a/configd.tproj/_configset.c +++ b/configd.tproj/_configset.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2011, 2012, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -329,7 +329,7 @@ __SCDynamicStoreSetMultiple(SCDynamicStoreRef store, CFDictionaryRef keysToSet, if (_configd_trace) { SCTrace(TRUE, _configd_trace, - CFSTR("set m : %5d : %d set, %d remove, %d notify\n"), + CFSTR("set m : %5d : %ld set, %ld remove, %ld notify\n"), storePrivate->server, keysToSet ? CFDictionaryGetCount(keysToSet) : 0, keysToRemove ? CFArrayGetCount (keysToRemove) : 0, diff --git a/configd.tproj/_notifyadd.c b/configd.tproj/_notifyadd.c index 22468ff..c486ce6 100644 --- a/configd.tproj/_notifyadd.c +++ b/configd.tproj/_notifyadd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2006, 2008, 2010, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008, 2010, 2011, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -248,7 +248,7 @@ __SCDynamicStoreSetNotificationKeys(SCDynamicStoreRef store, CFArrayRef keys, CF if (_configd_trace) { SCTrace(TRUE, _configd_trace, - CFSTR("watch : %5d : %d keys, %d patterns\n"), + CFSTR("watch : %5d : %ld keys, %ld patterns\n"), storePrivate->server, keys ? CFArrayGetCount(keys) : 0, patterns ? CFArrayGetCount(patterns) : 0); diff --git a/configd.tproj/_notifychanges.c b/configd.tproj/_notifychanges.c index a40fb6e..b8aad1b 100644 --- a/configd.tproj/_notifychanges.c +++ b/configd.tproj/_notifychanges.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003, 2006, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -97,7 +97,7 @@ _notifychanges(mach_port_t server, /* serialize the array of keys */ ok = _SCSerialize(notifierKeys, NULL, (void **)listRef, &len); - *listLen = len; + *listLen = (mach_msg_type_number_t)len; CFRelease(notifierKeys); if (!ok) { *sc_status = kSCStatusFailed; diff --git a/configd.tproj/com.apple.configd.plist b/configd.tproj/com.apple.configd.plist index e9c87cf..983b4ff 100644 --- a/configd.tproj/com.apple.configd.plist +++ b/configd.tproj/com.apple.configd.plist @@ -12,12 +12,6 @@ com.apple.SystemConfiguration.configd - com.apple.SystemConfiguration.SCNetworkReachability - - com.apple.SystemConfiguration.DNSConfiguration - - com.apple.SystemConfiguration.NetworkInformation - POSIXSpawnType Interactive diff --git a/configd.tproj/com.apple.configd_sim.plist b/configd.tproj/com.apple.configd_sim.plist index 39b9c8e..09464d4 100644 --- a/configd.tproj/com.apple.configd_sim.plist +++ b/configd.tproj/com.apple.configd_sim.plist @@ -12,12 +12,6 @@ com.apple.SystemConfiguration.configd_sim - com.apple.SystemConfiguration.SCNetworkReachability_sim - - com.apple.SystemConfiguration.DNSConfiguration_sim - - com.apple.SystemConfiguration.NetworkInformation_sim - POSIXSpawnType Interactive diff --git a/configd.tproj/configd.h b/configd.tproj/configd.h index 0a6b13c..15e251c 100644 --- a/configd.tproj/configd.h +++ b/configd.tproj/configd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2006, 2007, 2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -55,7 +55,6 @@ extern Boolean _configd_verbose; /* TRUE if verbose logging enabled */ extern FILE *_configd_trace; /* non-NULL if tracing enabled */ extern CFMutableSetRef _plugins_allowed; /* bundle identifiers to allow when loading */ extern CFMutableSetRef _plugins_exclude; /* bundle identifiers to exclude from loading */ -extern Boolean _plugins_fork; /* TRUE if plugins should be exec'd in their own process */ extern CFMutableSetRef _plugins_verbose; /* bundle identifiers to enable verbose logging */ __BEGIN_DECLS diff --git a/configd.tproj/configd.m b/configd.tproj/configd.m index 852c41a..c734112 100644 --- a/configd.tproj/configd.m +++ b/configd.tproj/configd.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -71,9 +71,6 @@ CFMutableSetRef _plugins_allowed = NULL; /* bundle identifiers to allow when lo __private_extern__ CFMutableSetRef _plugins_exclude = NULL; /* bundle identifiers to exclude from loading */ -__private_extern__ -Boolean _plugins_fork = FALSE; /* TRUE if plugins should be exec'd in their own process */ - __private_extern__ CFMutableSetRef _plugins_verbose = NULL; /* bundle identifiers to enable verbose logging */ @@ -85,7 +82,6 @@ static const struct option longopts[] = { // { "no-bundles", no_argument, 0, 'b' }, // { "exclude-plugin", required_argument, 0, 'B' }, // { "no-fork", no_argument, 0, 'd' }, -// { "fork-all", no_argument, 0, 'f' }, // { "test-bundle", required_argument, 0, 't' }, // { "verbose", no_argument, 0, 'v' }, // { "verbose-bundle", required_argument, 0, 'V' }, @@ -245,11 +241,11 @@ fork_child() (void) wait4(child_pid, (int *)&status, 0, 0); if (WIFEXITED(status)) { fprintf(stderr, - "*** configd (daemon) failed to start, exit status=%d", + "*** configd (daemon) failed to start, exit status=%d\n", WEXITSTATUS(status)); } else { fprintf(stderr, - "*** configd (daemon) failed to start, received signal=%d", + "*** configd (daemon) failed to start, received signal=%d\n", WTERMSIG(status)); } fflush (stderr); @@ -301,7 +297,7 @@ main(int argc, char * const argv[]) /* process any arguments */ - while ((opt = getopt_long(argc, argv, "A:bB:dt:vV:f", longopts, NULL)) != -1) { + while ((opt = getopt_long(argc, argv, "A:bB:dt:vV:", longopts, NULL)) != -1) { switch(opt) { case 'A': str = CFStringCreateWithCString(NULL, optarg, kCFStringEncodingMacRoman); @@ -334,9 +330,6 @@ main(int argc, char * const argv[]) CFRelease(str); } break; - case 'f': - _plugins_fork = TRUE; - break; case '?': default : usage(prog); diff --git a/configd.tproj/entitlements.plist b/configd.tproj/entitlements-ios.plist similarity index 84% rename from configd.tproj/entitlements.plist rename to configd.tproj/entitlements-ios.plist index f3624c6..a1438de 100644 --- a/configd.tproj/entitlements.plist +++ b/configd.tproj/entitlements-ios.plist @@ -8,20 +8,26 @@ com.apple.certificates com.apple.identities + com.apple.coretelephony.Identity.get + + com.apple.multitasking.unlimitedassertions + + com.apple.private.SCNetworkConnection-proxy-user + com.apple.private.mobileinstall.allowedSPI Uninstall Lookup - com.apple.springboard.launchapplications + com.apple.private.necp.match - com.apple.multitasking.unlimitedassertions + com.apple.private.snhelper - com.apple.wifi.manager-access + com.apple.springboard.launchapplications - com.apple.coretelephony.Identity.get + com.apple.wifi.manager-access - com.apple.private.SCNetworkConnection-proxy-user + com.apple.wlan.authentication diff --git a/configd.tproj/plugin_support.c b/configd.tproj/plugin_support.c index 90a85cc..9a130b9 100644 --- a/configd.tproj/plugin_support.c +++ b/configd.tproj/plugin_support.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2009, 2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -75,15 +75,14 @@ static const CFStringRef pluginWhitelist[] = { PLUGIN_ALL ("com.apple.SystemConfiguration.EAPOLController"), PLUGIN_ALL ("com.apple.SystemConfiguration.IPConfiguration"), PLUGIN_ALL ("com.apple.SystemConfiguration.IPMonitor"), + PLUGIN_MACOSX("com.apple.SystemConfiguration.ISPreference"), PLUGIN_ALL ("com.apple.SystemConfiguration.InterfaceNamer"), PLUGIN_ALL ("com.apple.SystemConfiguration.KernelEventMonitor"), PLUGIN_ALL ("com.apple.SystemConfiguration.LinkConfiguration"), PLUGIN_ALL ("com.apple.SystemConfiguration.Logger"), PLUGIN_ALL ("com.apple.SystemConfiguration.PPPController"), PLUGIN_ALL ("com.apple.SystemConfiguration.PreferencesMonitor"), -#ifdef HAVE_REACHABILITY_SERVER PLUGIN_ALL ("com.apple.SystemConfiguration.SCNetworkReachability"), -#endif // HAVE_REACHABILITY_SERVER PLUGIN_MACOSX("com.apple.print.notification"), }; #define N_PLUGIN_WHITELIST (sizeof(pluginWhitelist) / sizeof(pluginWhitelist[0])) @@ -124,9 +123,7 @@ extern SCDynamicStoreBundleLoadFunction load_LinkConfiguration; extern SCDynamicStoreBundleLoadFunction load_PreferencesMonitor; extern SCDynamicStoreBundlePrimeFunction prime_PreferencesMonitor; #endif // !TARGET_IPHONE_SIMULATOR -#ifdef HAVE_REACHABILITY_SERVER extern SCDynamicStoreBundleLoadFunction load_SCNetworkReachability; -#endif // HAVE_REACHABILITY_SERVER typedef struct { @@ -176,7 +173,6 @@ static const builtin builtin_plugins[] = { NULL }, #endif // !TARGET_IPHONE_SIMULATOR -#ifdef HAVE_REACHABILITY_SERVER { CFSTR("com.apple.SystemConfiguration.SCNetworkReachability"), &load_SCNetworkReachability, @@ -184,7 +180,6 @@ static const builtin builtin_plugins[] = { NULL, NULL }, -#endif // HAVE_REACHABILITY_SERVER }; @@ -308,7 +303,7 @@ static const char * getBundleDirNameAndPath(CFBundleRef bundle, char *buf, size_t buf_len) { char *cp; - int len; + size_t len; Boolean ok; CFURLRef url; @@ -332,7 +327,7 @@ getBundleDirNameAndPath(CFBundleRef bundle, char *buf, size_t buf_len) /* check if this directory entry is a valid bundle name */ len = strlen(cp); - if (len <= (int)sizeof(BUNDLE_DIR_EXTENSION)) { + if (len <= sizeof(BUNDLE_DIR_EXTENSION)) { /* if entry name isn't long enough */ return NULL; } @@ -351,50 +346,6 @@ getBundleDirNameAndPath(CFBundleRef bundle, char *buf, size_t buf_len) #pragma mark load -static void -forkBundle_setup(pid_t pid, void *setupContext) -{ - if (pid == 0) { - // if child - unsetenv("__LAUNCHD_FD"); - setenv("__FORKED_PLUGIN__", "Yes", 1); - } - - return; -} - - -static void -forkBundle(CFBundleRef bundle, CFStringRef bundleID) -{ - char *argv[] = { "configd", "-d", "-t", NULL, NULL }; - const char *name; - char path[MAXPATHLEN]; - pid_t pid; - - // get the bundle's path - name = getBundleDirNameAndPath(bundle, path, sizeof(path)); - if (name == NULL) { - SCLog(TRUE, LOG_ERR, CFSTR("skipped %@ (could not determine path)"), bundle); - return; - } - - // fork and exec configd opting to load only this plugin - argv[3] = path; - pid = _SCDPluginExecCommand2(NULL, NULL, 0, 0, "/usr/libexec/configd", argv, forkBundle_setup, NULL); - if (pid == -1) { - SCLog(TRUE, LOG_ERR, - CFSTR("skipped %@ (could not exec child) : %s"), - bundle, - strerror(errno)); - return; - } - - SCLog(TRUE, LOG_NOTICE, CFSTR("forked %@, pid=%d"), bundleID, pid); - return; -} - - static void loadBundle(const void *value, void *context) { CFStringRef bundleID; @@ -440,12 +391,6 @@ loadBundle(const void *value, void *context) { goto done; } - if (_plugins_fork && - !_SC_CFEqual(bundleID, CFSTR("com.apple.SystemConfiguration.SCNetworkReachability"))) { - forkBundle(bundleInfo->bundle, bundleID); - goto done; - } - if (!bundleInfo->verbose) { bundleInfo->verbose = CFSetContainsValue(_plugins_verbose, bundleID); if (!bundleInfo->verbose) { @@ -487,12 +432,20 @@ loadBundle(const void *value, void *context) { #endif /* DEBUG */ if (!CFBundleLoadExecutableAndReturnError(bundleInfo->bundle, &error)) { - CFStringRef description; - - description = CFErrorCopyDescription(error); + CFDictionaryRef user_info; + SCLog(TRUE, LOG_NOTICE, CFSTR("%@ load failed"), bundleID); - SCLog(TRUE, LOG_NOTICE, CFSTR(" %@"), description); - CFRelease(description); + user_info = CFErrorCopyUserInfo(error); + if (user_info != NULL) { + CFStringRef link_error_string; + + link_error_string = CFDictionaryGetValue(user_info, + CFSTR("NSDebugDescription")); + if (link_error_string != NULL) { + SCLog(TRUE, LOG_NOTICE, CFSTR("%@"), link_error_string); + } + CFRelease(user_info); + } CFRelease(error); goto done; } @@ -550,7 +503,7 @@ callStartFunction(const void *value, void *context) { bundleInfoRef bundleInfo = (bundleInfoRef)value; char bundleName[MAXNAMLEN + 1]; char bundlePath[MAXPATHLEN]; - int len; + size_t len; if (!bundleInfo->loaded) { return; @@ -878,10 +831,10 @@ sortBundles(CFMutableArrayRef orig) for (i = 0; i < n; i++) { bundleInfoRef bundleInfo1 = (bundleInfoRef)CFArrayGetValueAtIndex(orig, i); CFStringRef bundleID1 = CFBundleGetIdentifier(bundleInfo1->bundle); - int count; + CFIndex count; CFDictionaryRef dict; - int j; - int nRequires; + CFIndex j; + CFIndex nRequires; CFArrayRef requires = NULL; dict = isA_CFDictionary(CFBundleGetInfoDictionary(bundleInfo1->bundle)); @@ -897,8 +850,8 @@ sortBundles(CFMutableArrayRef orig) } count = nRequires = CFArrayGetCount(requires); for (j = 0; j < nRequires; j++) { - int k; - int nNew; + CFIndex k; + CFIndex nNew; CFStringRef r = CFArrayGetValueAtIndex(requires, j); if (!CFSetContainsValue(orig_bundleIDs, r)) { @@ -1219,7 +1172,7 @@ plugin_init() // pthread_attr_setstacksize(&tattr, 96 * 1024); // each thread gets a 96K stack pthread_create(&tid, &tattr, plugin_exec, NULL); pthread_attr_destroy(&tattr); - SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" thread id=0x%08x"), tid); + SCLog(_configd_verbose, LOG_DEBUG, CFSTR(" thread id=%p"), tid); return; } diff --git a/configd.tproj/session.c b/configd.tproj/session.c index 2a4d55e..60b824e 100644 --- a/configd.tproj/session.c +++ b/configd.tproj/session.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2007-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2007-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -116,13 +116,11 @@ tempSession(mach_port_t server, CFStringRef name, audit_token_t auditToken) temp_session->auditToken = auditToken; temp_session->callerEUID = 1; /* not "root" */ temp_session->callerRootAccess = UNKNOWN; -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) if ((temp_session->callerWriteEntitlement != NULL) && (temp_session->callerWriteEntitlement != kCFNull)) { CFRelease(temp_session->callerWriteEntitlement); } temp_session->callerWriteEntitlement = kCFNull; /* UNKNOWN */ -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) /* save name */ storePrivate = (SCDynamicStorePrivateRef)temp_session->store; @@ -278,9 +276,7 @@ addSession(mach_port_t server, CFStringRef (*copyDescription)(const void *info)) // sessions[n]->store = NULL; sessions[n]->callerEUID = 1; /* not "root" */ sessions[n]->callerRootAccess = UNKNOWN; -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) sessions[n]->callerWriteEntitlement = kCFNull; /* UNKNOWN */ -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) return newSession; } @@ -327,7 +323,6 @@ cleanupSession(mach_port_t server) (void) mach_port_mod_refs(mach_task_self(), server, MACH_PORT_RIGHT_RECEIVE, -1); #endif // HAVE_MACHPORT_GUARDS -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) /* * release any entitlement info */ @@ -335,7 +330,6 @@ cleanupSession(mach_port_t server) (thisSession->callerWriteEntitlement != kCFNull)) { CFRelease(thisSession->callerWriteEntitlement); } -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) /* * We don't need any remaining information in the @@ -427,8 +421,6 @@ listSessions(FILE *f) } -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) - #include #include @@ -489,8 +481,6 @@ copyEntitlement(serverSessionRef session, CFStringRef entitlement) return value; } -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) - static pid_t sessionPid(serverSessionRef session) @@ -602,7 +592,6 @@ hasWriteAccess(serverSessionRef session, CFStringRef key) //return FALSE; // return FALSE when rdar://9811832 has beed fixed } -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) if (session->callerWriteEntitlement == kCFNull) { session->callerWriteEntitlement = copyEntitlement(session, kSCWriteEntitlementName); @@ -652,7 +641,6 @@ hasWriteAccess(serverSessionRef session, CFStringRef key) } } } -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) return FALSE; } diff --git a/configd.tproj/session.h b/configd.tproj/session.h index ab4c4d6..273f8f3 100644 --- a/configd.tproj/session.h +++ b/configd.tproj/session.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2005-2007, 2009-2012 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2005-2007, 2009-2012, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -39,7 +39,6 @@ #include -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) /* * SCDynamicStore write access entitlement * @@ -57,7 +56,6 @@ * each SCDynamicStore key matching the regex pattern(s) */ #define kSCWriteEntitlementName CFSTR("com.apple.SystemConfiguration.SCDynamicStore-write-access") -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) typedef enum { NO = 0, YES, UNKNOWN } lazyBoolean; @@ -85,7 +83,6 @@ typedef struct { /* root access credential associated with this "open" session */ lazyBoolean callerRootAccess; -#if TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) /* * write access entitlement associated with this "open" session * @@ -96,7 +93,6 @@ typedef struct { * "patterns" = CFArray[writable patterns] */ CFTypeRef callerWriteEntitlement; -#endif // TARGET_OS_IPHONE || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080/*FIXME*/) } serverSession, *serverSessionRef; diff --git a/configd.tproj/update-mach-services b/configd.tproj/update-mach-services new file mode 100755 index 0000000..5846173 --- /dev/null +++ b/configd.tproj/update-mach-services @@ -0,0 +1,143 @@ +#!/bin/sh + +CONFIGD_LAUNCHD_PLIST=${INSTALL_DIR}/../../System/Library/LaunchDaemons/${1} +CONFIGD_PLUGINS=/tmp/plugins.$$ +EMBEDDED_PROJECTS=/tmp/projects.$$ +PLUGIN_MACHSERVICES=/tmp/plugin.$$ + +HAVE_CONFIGD_PLUGINS="MISSING" +HAVE_IPCONFIGURATION="MISSING" + +cp /dev/null ${CONFIGD_PLUGINS} +if [ -d ${INSTALL_DIR}/../../System/Library/SystemConfiguration ]; then + (cd ${INSTALL_DIR}/../../System/Library/SystemConfiguration ; ls -1d *.bundle >> ${CONFIGD_PLUGINS} 2>/dev/null ) +fi + +cp /dev/null ${EMBEDDED_PROJECTS} +if [ -n "${RC_EMBEDDEDPROJECT_DIR}" -a -d "${RC_EMBEDDEDPROJECT_DIR}" ]; then + ( cd ${RC_EMBEDDEDPROJECT_DIR} \ + ; ls -1d */System/Library/SystemConfiguration 2>/dev/null \ + | sed -e 's:/System/Library/SystemConfiguration::' \ + >> ${EMBEDDED_PROJECTS} ) + + if [ -s ${EMBEDDED_PROJECTS} ]; then + for PROJECT in `cat ${EMBEDDED_PROJECTS}` + do + ( cd ${RC_EMBEDDEDPROJECT_DIR}/${PROJECT}/System/Library/SystemConfiguration ; ls -1d *.bundle >> ${CONFIGD_PLUGINS} 2>/dev/null ) + done + fi +fi + +if [ -d ${SDKROOT}/System/Library/SystemConfiguration ]; then + ( cd ${SDKROOT}/System/Library/SystemConfiguration ; ls -1d *.bundle >> ${CONFIGD_PLUGINS} 2>/dev/null ) +fi + +if [ -n "${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}" -a -d "${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}" ]; then + ( cd ${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR} ; ls -1d *.bundle >> ${CONFIGD_PLUGINS} 2>/dev/null ) +fi + +for PLUGIN in `sort -u ${CONFIGD_PLUGINS}` +do + PLUGIN_PLIST="" + +# if [ -z "${PLUGIN_PLIST}" ]; then + PLUGIN_INF=${INSTALL_DIR}/../../System/Library/SystemConfiguration/${PLUGIN}/Contents/Info.plist + if [ -f ${PLUGIN_INF} ]; then + PLUGIN_PLIST=${PLUGIN_INF} + fi +# fi + + if [ -z "${PLUGIN_PLIST}" ]; then + PLUGIN_INF=${INSTALL_DIR}/../../System/Library/SystemConfiguration/${PLUGIN}/Info.plist + if [ -f ${PLUGIN_INF} ]; then + PLUGIN_PLIST=${PLUGIN_INF} + fi + fi + + if [ -z "${PLUGIN_PLIST}" -a -s ${EMBEDDED_PROJECTS} ]; then + for PROJECT in `cat ${EMBEDDED_PROJECTS}` + do + PROJECT_INF=${RC_EMBEDDEDPROJECT_DIR}/${PROJECT}/System/Library/SystemConfiguration/${PLUGIN}/Contents/Info.plist + if [ -f ${PROJECT_INF} ]; then + PLUGIN_PLIST=${PROJECT_INF} + break + fi + + PROJECT_INF=${RC_EMBEDDEDPROJECT_DIR}/${PROJECT}/System/Library/SystemConfiguration/${PLUGIN}/Info.plist + if [ -f ${PROJECT_INF} ]; then + PLUGIN_PLIST=${PROJECT_INF} + break + fi + done + fi + + if [ -z "${PLUGIN_PLIST}" ]; then + PLUGIN_INF=${SDKROOT}/System/Library/SystemConfiguration/${PLUGIN}/Contents/Info.plist + if [ -f ${PLUGIN_INF} ]; then + PLUGIN_PLIST=${PLUGIN_INF} + fi + fi + + if [ -z "${PLUGIN_PLIST}" ]; then + PLUGIN_INF=${SDKROOT}/System/Library/SystemConfiguration/${PLUGIN}/Info.plist + if [ -f ${PLUGIN_INF} ]; then + PLUGIN_PLIST=${PLUGIN_INF} + fi + fi + + if [ -n "${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}" ]; then + if [ -z "${PLUGIN_PLIST}" ]; then + PLUGIN_INF=${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}/${PLUGIN}/Contents/Info.plist + if [ -f ${PLUGIN_INF} ]; then + PLUGIN_PLIST=${PLUGIN_INF} + fi + fi + + if [ -z "${PLUGIN_PLIST}" ]; then + PLUGIN_INF=${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}/${PLUGIN}/Info.plist + if [ -f ${PLUGIN_INF} ]; then + PLUGIN_PLIST=${PLUGIN_INF} + fi + fi + fi + + if [ -z "${PLUGIN_PLIST}" ]; then + continue + fi + + /usr/libexec/PlistBuddy -c "Print :MachServices" -x ${PLUGIN_PLIST} > ${PLUGIN_MACHSERVICES} 2>/dev/null + if [ $? -eq 0 ]; then + echo "Merging \"MachServices\" from: ${PLUGIN_INF}" + /usr/libexec/PlistBuddy -c "Merge ${PLUGIN_MACHSERVICES} :MachServices" ${CONFIGD_LAUNCHD_PLIST} 2>/dev/null + if [ -n "${IPHONEOS_DEPLOYMENT_TARGET}" ]; then + /usr/bin/plutil -convert binary1 ${CONFIGD_LAUNCHD_PLIST} + else + /usr/bin/plutil -convert xml1 ${CONFIGD_LAUNCHD_PLIST} + fi + fi + + case "${PLUGIN}" in + "IPMonitor.bundle" ) + HAVE_CONFIGD_PLUGINS="OK" + ;; + "IPConfiguration.bundle" ) + HAVE_IPCONFIGURATION="OK" + ;; + esac +done + +rm -f ${PLUGIN_MACHSERVICES} ${CONFIGD_PLUGINS} ${EMBEDDED_PROJECTS} + +if [ "${HAVE_CONFIGD_PLUGINS}" != "OK" ]; then + echo "" + echo "**************************************************************************************" + echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (configd_plugins)" + echo "**************************************************************************************" + exit 1 +elif [ "${HAVE_IPCONFIGURATION}" != "OK" -a "${PLATFORM_NAME}" != "iphonesimulator" ] ; then + echo "" + echo "****************************************************************************" + echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (bootp)" + echo "****************************************************************************" + exit 1 +fi diff --git a/configd.xcodeproj/project.pbxproj b/configd.xcodeproj/project.pbxproj index 2fced37..41c044f 100644 --- a/configd.xcodeproj/project.pbxproj +++ b/configd.xcodeproj/project.pbxproj @@ -223,6 +223,12 @@ 1521400C0E93FFF500DACD2C /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 152140580E93FFFC00DACD2C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1559C4440D349A4E0098FD59 /* SystemConfiguration.framework */; }; 1522FCFB0FA7FE4B00B24128 /* dnsinfo_flatfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 1522FCE50FA7FD7000B24128 /* dnsinfo_flatfile.c */; }; + 152439E518038E5B00D91708 /* ev_extra.h in Headers */ = {isa = PBXBuildFile; fileRef = 152439E318038E5B00D91708 /* ev_extra.h */; }; + 152439E618038E5B00D91708 /* ev_extra.m in Sources */ = {isa = PBXBuildFile; fileRef = 152439E418038E5B00D91708 /* ev_extra.m */; }; + 152439E8180399D800D91708 /* CoreWLAN.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 152439E7180399D800D91708 /* CoreWLAN.framework */; }; + 152439E91805CC6C00D91708 /* ev_extra.h in Headers */ = {isa = PBXBuildFile; fileRef = 152439E318038E5B00D91708 /* ev_extra.h */; }; + 152439EA1805CC8400D91708 /* ev_extra.m in Sources */ = {isa = PBXBuildFile; fileRef = 152439E418038E5B00D91708 /* ev_extra.m */; }; + 152439EC180716ED00D91708 /* MobileWiFi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 152439EB180716ED00D91708 /* MobileWiFi.framework */; }; 152691DB1129EEA6006BD2D5 /* BridgeConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */; }; 152691DC1129EEAD006BD2D5 /* BridgeConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */; }; 152691DE1129EEC2006BD2D5 /* VLANConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B605C0722B0099E85F /* VLANConfiguration.c */; }; @@ -295,6 +301,8 @@ 155D223B0AF13A7300D52ED0 /* dns-configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D22380AF13A7300D52ED0 /* dns-configuration.h */; }; 155D223C0AF13A7300D52ED0 /* set-hostname.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D22390AF13A7300D52ED0 /* set-hostname.h */; }; 155D223D0AF13A7300D52ED0 /* smb-configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D223A0AF13A7300D52ED0 /* smb-configuration.h */; }; + 1565D85018B847590097062B /* SCNetworkMigration.c in Sources */ = {isa = PBXBuildFile; fileRef = 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */; }; + 1565D85118B847F20097062B /* SCNetworkMigration.c in Sources */ = {isa = PBXBuildFile; fileRef = 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */; }; 156BD6BC07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 156BD6BB07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 156CA47B0EF853BB00C59A18 /* logger.c in Sources */ = {isa = PBXBuildFile; fileRef = 1531D3DB0E93E6DA00248432 /* logger.c */; }; 156CA47D0EF853BB00C59A18 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; @@ -919,19 +927,26 @@ 15E1B05416EBAE3C00E5F06F /* scprefs_observer.c in Sources */ = {isa = PBXBuildFile; fileRef = D61AAEAD1522C99C0066B003 /* scprefs_observer.c */; }; 15E1B05516EBAE3C00E5F06F /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; 15F21618110F823500E89CF7 /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; + 15FBB54C17D6834C0035D752 /* libCrashReporterClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */; }; 15FC130B0CCEA59E0013872C /* monitor.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FC130A0CCEA59E0013872C /* monitor.c */; }; 15FC13180CCF74740013872C /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */; }; 15FD7B3C101E439200C56621 /* BridgeConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */; }; 15FEE80E0CCFD341001312F9 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15FEE80D0CCFD341001312F9 /* ApplicationServices.framework */; }; 15FEE81F0CD03E75001312F9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 15FEE8180CD03CBB001312F9 /* Localizable.strings */; }; 15FF5C370CDF776200EEC8AA /* com.apple.SCHelper.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 15FF5C290CDF770500EEC8AA /* com.apple.SCHelper.plist */; }; + 55A3DB9E183C2AD900ED3DB7 /* SCNetworkMigration.c in Sources */ = {isa = PBXBuildFile; fileRef = 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */; }; 7264C144147319E7004FD76D /* CaptiveNetwork.c in Sources */ = {isa = PBXBuildFile; fileRef = 15A1FF3110597F17004C9CC9 /* CaptiveNetwork.c */; }; 7264C14614731A1F004FD76D /* CaptiveNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A1FF3010597F17004C9CC9 /* CaptiveNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 727AF25419138699009AB153 /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 727AF255191386A0009AB153 /* VPNFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8111631933400819B44 /* VPNFlow.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 727AF256191386CB009AB153 /* VPNFlowPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8121631933400819B44 /* VPNFlowPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 727AF257191386DA009AB153 /* VPNTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F2108E310700C2A607 /* VPNTunnel.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 727AF258191386E3009AB153 /* VPNTunnelPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F1108E310700C2A607 /* VPNTunnelPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 727AF25919138E24009AB153 /* VPNTunnel.c in Sources */ = {isa = PBXBuildFile; fileRef = 15AAA7F3108E310700C2A607 /* VPNTunnel.c */; }; 72B43728113C7BFC00EBF1B6 /* nc.h in Headers */ = {isa = PBXBuildFile; fileRef = 72B43726113C7BFC00EBF1B6 /* nc.h */; }; 72B43729113C7BFC00EBF1B6 /* nc.c in Sources */ = {isa = PBXBuildFile; fileRef = 72B43727113C7BFC00EBF1B6 /* nc.c */; }; 72B4372A113C7BFC00EBF1B6 /* nc.h in Headers */ = {isa = PBXBuildFile; fileRef = 72B43726113C7BFC00EBF1B6 /* nc.h */; }; 72B4372B113C7BFC00EBF1B6 /* nc.c in Sources */ = {isa = PBXBuildFile; fileRef = 72B43727113C7BFC00EBF1B6 /* nc.c */; }; - 72C3E82715003E78000D68CB /* MobileInstallation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72C3E82615003E78000D68CB /* MobileInstallation.framework */; }; B03FEFB616376D2800A1B88F /* VPNAppLayer.c in Sources */ = {isa = PBXBuildFile; fileRef = B03FEFB516376D2800A1B88F /* VPNAppLayer.c */; }; B03FEFB716376D2800A1B88F /* VPNAppLayer.c in Sources */ = {isa = PBXBuildFile; fileRef = B03FEFB516376D2800A1B88F /* VPNAppLayer.c */; }; B03FEFBA16382C0700A1B88F /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; @@ -972,6 +987,10 @@ E4F211D3137B0AB900BBB915 /* network_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_information_priv.c */; }; E4F211D4137B0ABD00BBB915 /* network_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_information_priv.h */; }; E4F211D7137B0AF200BBB915 /* network_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_information_priv.h */; }; + F9347FF7187C796E003D4178 /* IPMonitorControl.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */; }; + F9347FF8187C7993003D4178 /* IPMonitorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */; }; + F9347FF9187C7993003D4178 /* IPMonitorControlPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */; }; + F9347FFA187C7993003D4178 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; F95B8A430B03E07A00993BA3 /* SCNetworkSignature.c in Sources */ = {isa = PBXBuildFile; fileRef = F95B8A420B03E07A00993BA3 /* SCNetworkSignature.c */; }; F95B8A460B03E09300993BA3 /* SCNetworkSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = F95B8A440B03E09300993BA3 /* SCNetworkSignature.h */; settings = {ATTRIBUTES = (Private, ); }; }; F95B8A470B03E09300993BA3 /* SCNetworkSignaturePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F95B8A450B03E09300993BA3 /* SCNetworkSignaturePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -979,6 +998,18 @@ F9A3781116A4849100C57CDC /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9B50FF316A4CBB200CA274E /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9B50FF416A4CBB800CA274E /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; + F9B7AE641862119300C78D18 /* IPMonitorControl.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */; }; + F9B7AE65186211B500C78D18 /* IPMonitorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */; }; + F9B7AE66186211BE00C78D18 /* IPMonitorControlPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */; }; + F9B7AE67186211C200C78D18 /* IPMonitorControlPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */; }; + F9B7AE68186211C900C78D18 /* IPMonitorControlPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */; }; + F9B7AE69186211CE00C78D18 /* IPMonitorControlServer.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5F1862116500C78D18 /* IPMonitorControlServer.c */; }; + F9B7AE6A186211D300C78D18 /* IPMonitorControlServer.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5F1862116500C78D18 /* IPMonitorControlServer.c */; }; + F9B7AE6B186211DA00C78D18 /* IPMonitorControlServer.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE601862116500C78D18 /* IPMonitorControlServer.h */; }; + F9B7AE6C186211DE00C78D18 /* IPMonitorControlServer.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE601862116500C78D18 /* IPMonitorControlServer.h */; }; + F9B7AE6D186211EA00C78D18 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; + F9B7AE6E186211F000C78D18 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; + F9B7AE6F186211F600C78D18 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1463,7 +1494,7 @@ 15732AA716EA503200F3AC4C /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 8; - dstPath = "$(SDKROOT)/System/Library/LaunchDaemons"; + dstPath = "$(INSTALL_PATH_PREFIX)/System/Library/LaunchDaemons"; dstSubfolderSpec = 0; files = ( 15D3083B16F4E81C00014F82 /* com.apple.configd_sim.plist in CopyFiles */, @@ -1568,6 +1599,10 @@ 15213FFA0E93E9F500DACD2C /* Logger.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Logger.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 1521FC5C060F296A003B28F5 /* dnsinfo_create.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dnsinfo_create.c; path = dnsinfo/dnsinfo_create.c; sourceTree = SOURCE_ROOT; }; 1522FCE50FA7FD7000B24128 /* dnsinfo_flatfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dnsinfo_flatfile.c; path = dnsinfo/dnsinfo_flatfile.c; sourceTree = ""; }; + 152439E318038E5B00D91708 /* ev_extra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ev_extra.h; sourceTree = ""; }; + 152439E418038E5B00D91708 /* ev_extra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ev_extra.m; sourceTree = ""; }; + 152439E7180399D800D91708 /* CoreWLAN.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreWLAN.framework; path = /System/Library/Frameworks/CoreWLAN.framework; sourceTree = ""; }; + 152439EB180716ED00D91708 /* MobileWiFi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileWiFi.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.Internal.sdk/System/Library/PrivateFrameworks/MobileWiFi.framework; sourceTree = DEVELOPER_DIR; }; 1528BFE21357305400691881 /* libSCNetworkReachability.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSCNetworkReachability.a; sourceTree = BUILT_PRODUCTS_DIR; }; 1528BFE81357309800691881 /* SCNetworkReachability.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCNetworkReachability.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 1528BFE91357312E00691881 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Plugins/SCNetworkReachability/Info.plist; sourceTree = ""; }; @@ -1606,7 +1641,7 @@ 155D22380AF13A7300D52ED0 /* dns-configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "dns-configuration.h"; sourceTree = ""; }; 155D22390AF13A7300D52ED0 /* set-hostname.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "set-hostname.h"; sourceTree = ""; }; 155D223A0AF13A7300D52ED0 /* smb-configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "smb-configuration.h"; sourceTree = ""; }; - 1567333E0DD1FD6500145179 /* entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = entitlements.plist; sourceTree = ""; }; + 1567333E0DD1FD6500145179 /* entitlements-ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "entitlements-ios.plist"; sourceTree = ""; }; 156BD6BB07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCPreferencesSetSpecificPrivate.h; sourceTree = ""; }; 156CA4850EF853BB00C59A18 /* Logger.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Logger.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 156CA48D0EF853BB00C59A18 /* Info-Embedded.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-Embedded.plist"; path = "Plugins/Logger/Info-Embedded.plist"; sourceTree = ""; }; @@ -1838,9 +1873,13 @@ 15DC346E0711D49400A3311C /* net_set.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = net_set.h; sourceTree = ""; }; 15E1B05916EBAE3C00E5F06F /* libIPMonitor_sim.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIPMonitor_sim.a; sourceTree = BUILT_PRODUCTS_DIR; }; 15E1B06116EBAE7800E5F06F /* IPMonitor.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPMonitor.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCrashReporterClient.a; path = /usr/local/lib/libCrashReporterClient.a; sourceTree = ""; }; + 15FBB54E17D7899C0035D752 /* Info-EmbeddedSimulator.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-EmbeddedSimulator.plist"; sourceTree = ""; }; + 15FBB54F17D789B50035D752 /* Info-EmbeddedSimulator.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-EmbeddedSimulator.plist"; path = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; sourceTree = ""; }; + 15FBB55017D78A780035D752 /* update-mach-services */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "update-mach-services"; sourceTree = ""; }; 15FC12F20CCEA4F00013872C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SCMonitor/Info.plist; sourceTree = ""; }; 15FC130A0CCEA59E0013872C /* monitor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = monitor.c; path = SCMonitor/monitor.c; sourceTree = ""; }; - 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = IndigoSDK.xcconfig; path = /AppleInternal/Indigo/IndigoSDK.xcconfig; sourceTree = ""; }; + 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = SimulatorSupport.xcconfig; path = AppleInternal/XcodeConfig/SimulatorSupport.xcconfig; sourceTree = DEVELOPER_DIR; }; 15FD72970754DA2B001CC321 /* InterfaceNamer.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InterfaceNamer.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 15FD72A50754DA4C001CC321 /* IPMonitor.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPMonitor.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 15FD72B50754DA69001CC321 /* LinkConfiguration.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LinkConfiguration.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1854,14 +1893,13 @@ 23C1E2B4062DD2C700835B54 /* pppcontroller_types.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = pppcontroller_types.h; path = usr/local/include/ppp/pppcontroller_types.h; sourceTree = SDKROOT; }; 23C1E2B8062DD45900835B54 /* pppcontroller.defs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.mig; name = pppcontroller.defs; path = SystemConfiguration.fproj/pppcontroller.defs; sourceTree = ""; }; 23C1E2BE062DD5DB00835B54 /* pppcontroller.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pppcontroller.h; path = configd.build/SystemConfiguration.framework.build/DerivedSources/pppcontroller.h; sourceTree = BUILT_PRODUCTS_DIR; }; + 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SCNetworkMigration.c; sourceTree = ""; }; 72B43726113C7BFC00EBF1B6 /* nc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nc.h; sourceTree = ""; }; 72B43727113C7BFC00EBF1B6 /* nc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nc.c; sourceTree = ""; }; - 72C3E82615003E78000D68CB /* MobileInstallation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileInstallation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.Internal.sdk/System/Library/PrivateFrameworks/MobileInstallation.framework; sourceTree = DEVELOPER_DIR; }; 9EE943F306AF409B00772EB5 /* BondConfiguration.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = BondConfiguration.c; sourceTree = ""; }; B03FEFB516376D2800A1B88F /* VPNAppLayer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNAppLayer.c; sourceTree = ""; }; B084710E16385121006C92A3 /* SCNetworkConnectionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCNetworkConnectionInternal.h; sourceTree = ""; }; B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = VPNAppLayerPrivate.h; sourceTree = ""; tabWidth = 4; }; - B0BF3440174594C400961734 /* entitlements-osx.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "entitlements-osx.plist"; sourceTree = ""; }; B0C967F717441F0E00889853 /* SNHelperPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNHelperPrivate.h; sourceTree = ""; }; B0C9689B174426C200889853 /* SNHelper.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SNHelper.c; sourceTree = ""; }; C4CDB8111631933400819B44 /* VPNFlow.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = VPNFlow.h; sourceTree = ""; tabWidth = 4; }; @@ -1881,6 +1919,14 @@ F95B8A450B03E09300993BA3 /* SCNetworkSignaturePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCNetworkSignaturePrivate.h; sourceTree = ""; }; F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = IPMonitorControlPrefs.c; sourceTree = ""; }; F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorControlPrefs.h; sourceTree = ""; }; + F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = IPMonitorControl.c; sourceTree = ""; }; + F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorControl.h; sourceTree = ""; }; + F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorControlPrivate.h; sourceTree = ""; }; + F9B7AE5F1862116500C78D18 /* IPMonitorControlServer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = IPMonitorControlServer.c; sourceTree = ""; }; + F9B7AE601862116500C78D18 /* IPMonitorControlServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorControlServer.h; sourceTree = ""; }; + F9B7AE611862116500C78D18 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + F9B7AE621862116500C78D18 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + F9B7AE631862116500C78D18 /* symbol_scope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = symbol_scope.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -2003,7 +2049,6 @@ 1574340E0D4A8137002ACA73 /* CoreFoundation.framework in Frameworks */, 1574340F0D4A8137002ACA73 /* SystemConfiguration.framework in Frameworks */, 157434110D4A8137002ACA73 /* libedit.dylib in Frameworks */, - 72C3E82715003E78000D68CB /* MobileInstallation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2021,6 +2066,7 @@ 1583174C0CFB80A1006F62B9 /* CoreFoundation.framework in Frameworks */, 154707350D1F70C80075C28D /* SystemConfiguration.framework in Frameworks */, 1583174E0CFB80A1006F62B9 /* IOKit.framework in Frameworks */, + 152439EC180716ED00D91708 /* MobileWiFi.framework in Frameworks */, 159C32B60F583724008A72EE /* Security.framework in Frameworks */, 158317500CFB80A1006F62B9 /* libbsm.dylib in Frameworks */, 158317520CFB80A1006F62B9 /* libKernelEventMonitor.a in Frameworks */, @@ -2049,6 +2095,7 @@ files = ( 159D54CC07529FFF004F8947 /* CoreFoundation.framework in Frameworks */, 1559C44A0D349A4E0098FD59 /* SystemConfiguration.framework in Frameworks */, + 152439E8180399D800D91708 /* CoreWLAN.framework in Frameworks */, 1543636B0752D03C00A8EC6C /* IOKit.framework in Frameworks */, D6623873120B2AA7007F8E95 /* Security.framework in Frameworks */, 15BAA32307F0699A00D9EC95 /* libbsm.dylib in Frameworks */, @@ -2083,6 +2130,7 @@ files = ( 15DAD6AE07591A1A0084A6ED /* CoreFoundation.framework in Frameworks */, B03FEFBA16382C0700A1B88F /* libbsm.dylib in Frameworks */, + 15FBB54C17D6834C0035D752 /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2103,6 +2151,7 @@ isa = PBXGroup; children = ( 1528BFE91357312E00691881 /* Info.plist */, + 15FBB54F17D789B50035D752 /* Info-EmbeddedSimulator.plist */, ); name = SCNetworkReachability; sourceTree = ""; @@ -2315,6 +2364,7 @@ 155D223A0AF13A7300D52ED0 /* smb-configuration.h */, 1572EB7A0A506D3B00D02459 /* smb-configuration.c */, 15FD743E0754DE7A001CC321 /* Info.plist */, + 15FBB54E17D7899C0035D752 /* Info-EmbeddedSimulator.plist */, D68AD25F159BCD5900D4F1BE /* com.apple.networking.IPMonitor */, ); name = IPMonitor; @@ -2338,10 +2388,12 @@ 159D53B207528B36004F8947 /* ev_dlil.h */, 159D53B807528B36004F8947 /* ev_ipv4.h */, 159D53BA07528B36004F8947 /* ev_ipv6.h */, + 152439E318038E5B00D91708 /* ev_extra.h */, 159D53B007528B36004F8947 /* eventmon.c */, 159D53B107528B36004F8947 /* ev_dlil.c */, 159D53B307528B36004F8947 /* ev_ipv4.c */, 159D53B407528B36004F8947 /* ev_ipv6.c */, + 152439E418038E5B00D91708 /* ev_extra.m */, 158AD8700754E3D400124717 /* Info.plist */, ); name = KernelEventMonitor; @@ -2562,6 +2614,7 @@ 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */, 15CB69B605C0722B0099E85F /* VLANConfiguration.c */, C4F1847F16237AFC00D97043 /* VPNService.c */, + 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */, ); name = Sources; sourceTree = ""; @@ -2644,9 +2697,10 @@ 15CB6A2205C0722B0099E85F /* scselect */, 15CB6A3705C0722B0099E85F /* scutil */, 159D53A207528B06004F8947 /* Plugins */, + F9B7AE5B1862116500C78D18 /* IPMonitorControl */, 15CB6A6E05C0722B0099E85F /* External Frameworks and Libraries */, 15CB690F05C0722B0099E85F /* Products */, - 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */, + 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */, ); indentWidth = 8; name = configd; @@ -2797,11 +2851,11 @@ 15CB6A1805C0722B0099E85F /* Supporting Files */ = { isa = PBXGroup; children = ( - B0BF3440174594C400961734 /* entitlements-osx.plist */, 1540E3600987DA9500157C07 /* com.apple.configd.plist */, 15D3083A16F4E6D900014F82 /* com.apple.configd_sim.plist */, 15CB6A2005C0722B0099E85F /* configd.8 */, - 1567333E0DD1FD6500145179 /* entitlements.plist */, + 1567333E0DD1FD6500145179 /* entitlements-ios.plist */, + 15FBB55017D78A780035D752 /* update-mach-services */, ); name = "Supporting Files"; sourceTree = ""; @@ -2898,12 +2952,14 @@ children = ( 15FEE80D0CCFD341001312F9 /* ApplicationServices.framework */, 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */, + 152439E7180399D800D91708 /* CoreWLAN.framework */, 1543636A0752D03C00A8EC6C /* IOKit.framework */, + 152439EB180716ED00D91708 /* MobileWiFi.framework */, 1520A3DE0846B2DC0010B584 /* Security.framework */, 15BAA32207F0699A00D9EC95 /* libbsm.dylib */, 15AC2D8816C574FE00340E28 /* libcupolicy.dylib */, 152CEED0070CF6640050F23C /* libedit.dylib */, - 72C3E82615003E78000D68CB /* MobileInstallation.framework */, + 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */, 15CAEF381712690500367CE1 /* libcupolicy.dylib */, ); name = "External Frameworks and Libraries"; @@ -2978,6 +3034,21 @@ name = Sources; sourceTree = ""; }; + F9B7AE5B1862116500C78D18 /* IPMonitorControl */ = { + isa = PBXGroup; + children = ( + F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */, + F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */, + F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */, + F9B7AE5F1862116500C78D18 /* IPMonitorControlServer.c */, + F9B7AE601862116500C78D18 /* IPMonitorControlServer.h */, + F9B7AE611862116500C78D18 /* main.c */, + F9B7AE621862116500C78D18 /* Makefile */, + F9B7AE631862116500C78D18 /* symbol_scope.h */, + ); + path = IPMonitorControl; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -3077,6 +3148,9 @@ B0A88CA816397A1200A60B3A /* VPNAppLayerPrivate.h in Headers */, 1572C4D40CFB55B400E2776E /* SCNetworkConnectionPrivate.h in Headers */, 1572C4D50CFB55B400E2776E /* SCPreferencesKeychainPrivate.h in Headers */, + F9347FF8187C7993003D4178 /* IPMonitorControl.h in Headers */, + F9347FF9187C7993003D4178 /* IPMonitorControlPrivate.h in Headers */, + F9347FFA187C7993003D4178 /* symbol_scope.h in Headers */, 1572C4D60CFB55B400E2776E /* SCSchemaDefinitionsPrivate.h in Headers */, 1572C4D70CFB55B400E2776E /* SCNetworkSignature.h in Headers */, B0C9689E174426DD00889853 /* SNHelperPrivate.h in Headers */, @@ -3182,10 +3256,13 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + F9B7AE6C186211DE00C78D18 /* IPMonitorControlServer.h in Headers */, 157A84F60D56C7E800B6F1A0 /* dns-configuration.h in Headers */, 15D48EC20F67061F00B4711E /* dnsinfo_create.h in Headers */, E4F211D4137B0ABD00BBB915 /* network_information_priv.h in Headers */, 1575FD2812CD15C60003D86E /* proxy-configuration.h in Headers */, + F9B7AE6F186211F600C78D18 /* symbol_scope.h in Headers */, + F9B7AE68186211C900C78D18 /* IPMonitorControlPrivate.h in Headers */, 157A84F70D56C7E800B6F1A0 /* set-hostname.h in Headers */, 153ACCAC14E322D5005029A5 /* network_information_server.h in Headers */, 1596A7B514EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, @@ -3203,11 +3280,12 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 157A85170D56C8E000B6F1A0 /* eventmon.h in Headers */, 157A85120D56C8E000B6F1A0 /* cache.h in Headers */, 157A85140D56C8E000B6F1A0 /* ev_dlil.h in Headers */, 157A85150D56C8E000B6F1A0 /* ev_ipv4.h in Headers */, 157A85160D56C8E000B6F1A0 /* ev_ipv6.h in Headers */, - 157A85170D56C8E000B6F1A0 /* eventmon.h in Headers */, + 152439E91805CC6C00D91708 /* ev_extra.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3252,11 +3330,12 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 159D541407528DB5004F8947 /* eventmon.h in Headers */, 159D540A07528D3B004F8947 /* cache.h in Headers */, 159D540E07528DAE004F8947 /* ev_dlil.h in Headers */, 159D541007528DB1004F8947 /* ev_ipv4.h in Headers */, 159D541207528DB3004F8947 /* ev_ipv6.h in Headers */, - 159D541407528DB5004F8947 /* eventmon.h in Headers */, + 152439E518038E5B00D91708 /* ev_extra.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3276,7 +3355,10 @@ E4F211D7137B0AF200BBB915 /* network_information_priv.h in Headers */, 1575FD2A12CD15C60003D86E /* proxy-configuration.h in Headers */, 155D223C0AF13A7300D52ED0 /* set-hostname.h in Headers */, + F9B7AE67186211C200C78D18 /* IPMonitorControlPrivate.h in Headers */, + F9B7AE6E186211F000C78D18 /* symbol_scope.h in Headers */, 155D223D0AF13A7300D52ED0 /* smb-configuration.h in Headers */, + F9B7AE6B186211DA00C78D18 /* IPMonitorControlServer.h in Headers */, 153ACCAB14E322D5005029A5 /* network_information_server.h in Headers */, 1596A7B414EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, ); @@ -3315,6 +3397,7 @@ buildActionMask = 2147483647; files = ( 15A5A1E70D5B94190087BDA0 /* SCSchemaDefinitions.h in Headers */, + 727AF256191386CB009AB153 /* VPNFlowPrivate.h in Headers */, 15A5A1E80D5B94190087BDA0 /* SystemConfiguration.h in Headers */, 15A5A1E90D5B94190087BDA0 /* SCPrivate.h in Headers */, 15A5A1EA0D5B94190087BDA0 /* SCDPlugin.h in Headers */, @@ -3332,6 +3415,7 @@ 15A5A1F60D5B94190087BDA0 /* SCPreferencesSetSpecific.h in Headers */, 15A5A1F70D5B94190087BDA0 /* SCNetworkConfiguration.h in Headers */, 15A5A1F80D5B94190087BDA0 /* SCNetworkConfigurationInternal.h in Headers */, + 727AF257191386DA009AB153 /* VPNTunnel.h in Headers */, 15A5A1F90D5B94190087BDA0 /* SCNetwork.h in Headers */, 15A5A1FA0D5B94190087BDA0 /* SCNetworkConnection.h in Headers */, 15A5A1FB0D5B94190087BDA0 /* SCNetworkReachability.h in Headers */, @@ -3339,6 +3423,7 @@ 15A5A1FD0D5B94190087BDA0 /* DHCPClientPreferences.h in Headers */, D61AAEB71522C9EF0066B003 /* scprefs_observer.h in Headers */, 15A5A1FE0D5B94190087BDA0 /* SCDynamicStoreCopyDHCPInfo.h in Headers */, + 727AF258191386E3009AB153 /* VPNTunnelPrivate.h in Headers */, 15A5A1FF0D5B94190087BDA0 /* moh_msg.h in Headers */, 15A5A2000D5B94190087BDA0 /* moh.h in Headers */, 15A5A2010D5B94190087BDA0 /* DeviceOnHold.h in Headers */, @@ -3350,6 +3435,7 @@ 1572C57F171CCFE200870549 /* pppcontroller_mach_defines.h in Headers */, 15A5A20C0D5B94190087BDA0 /* SCPreferencesSetSpecificPrivate.h in Headers */, 15A5A20D0D5B94190087BDA0 /* SCPreferencesGetSpecificPrivate.h in Headers */, + 727AF255191386A0009AB153 /* VPNFlow.h in Headers */, 15A5A20E0D5B94190087BDA0 /* SCNetworkConfigurationPrivate.h in Headers */, 15A5A2100D5B94190087BDA0 /* SCHelper_client.h in Headers */, 15A5A2110D5B94190087BDA0 /* SCNetworkConnectionPrivate.h in Headers */, @@ -3361,6 +3447,7 @@ 159A7528107FEAA400A57EAB /* VPNPrivate.h in Headers */, 159A752A107FEAA400A57EAB /* VPNConfiguration.h in Headers */, 15C330D3134B95AA0028E36B /* SCNetworkReachabilityInternal.h in Headers */, + 727AF25419138699009AB153 /* VPNAppLayerPrivate.h in Headers */, 15D8B22C1450D8450090CECF /* SCD.h in Headers */, 15A5A2090D5B94190087BDA0 /* pppcontroller.h in Headers */, ); @@ -3416,9 +3503,12 @@ 15DAD65207591A1A0084A6ED /* SCNetworkConfiguration.h in Headers */, D61AAEB51522C9D00066B003 /* scprefs_observer.h in Headers */, 15DAD65307591A1A0084A6ED /* SCNetworkConfigurationInternal.h in Headers */, + F9B7AE66186211BE00C78D18 /* IPMonitorControlPrivate.h in Headers */, 15DAD65407591A1A0084A6ED /* SCNetwork.h in Headers */, 15DAD65507591A1A0084A6ED /* SCNetworkConnection.h in Headers */, + F9B7AE65186211B500C78D18 /* IPMonitorControl.h in Headers */, 15DAD65607591A1A0084A6ED /* SCNetworkReachability.h in Headers */, + F9B7AE6D186211EA00C78D18 /* symbol_scope.h in Headers */, 15DAD65707591A1A0084A6ED /* SCValidation.h in Headers */, 15DAD65807591A1A0084A6ED /* DHCPClientPreferences.h in Headers */, 15DAD65907591A1A0084A6ED /* SCDynamicStoreCopyDHCPInfo.h in Headers */, @@ -3686,6 +3776,7 @@ 15732A7F16EA503200F3AC4C /* Sources */, 15732A9B16EA503200F3AC4C /* Frameworks */, 15732AA716EA503200F3AC4C /* CopyFiles */, + 15FBB55217D78B9F0035D752 /* Update MachServices */, ); buildRules = ( ); @@ -3893,6 +3984,7 @@ 1583172C0CFB80A1006F62B9 /* Sources */, 1583174B0CFB80A1006F62B9 /* Frameworks */, 1583175B0CFB80A1006F62B9 /* CopyFiles */, + 15FBB55117D78B670035D752 /* Update MachServices */, ); buildRules = ( ); @@ -4092,6 +4184,7 @@ 159D54CA07529FFF004F8947 /* Frameworks */, 159D54D507529FFF004F8947 /* CopyFiles */, 159D54D707529FFF004F8947 /* CopyFiles */, + 15FBB54D17D75DE70035D752 /* Update MachServices */, ); buildRules = ( ); @@ -4331,7 +4424,7 @@ 15CB6A7705C0722B0099E85F /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0600; }; buildConfigurationList = 156EB63E0905594A00EEF749 /* Build configuration list for PBXProject "configd" */; compatibilityVersion = "Xcode 3.2"; @@ -4610,6 +4703,7 @@ runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} split\nfi"; + showEnvVarsInLog = 0; }; 1572C5270CFB55B400E2776E /* get-mobility-info */ = { isa = PBXShellScriptBuildPhase; @@ -4690,6 +4784,54 @@ shellScript = "mkdir -p \"${DSTROOT}/usr/local/bin\"\nln -fs \"${INSTALL_PATH}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/get-mobility-info\" \"${DSTROOT}/usr/local/bin/\"\n"; showEnvVarsInLog = 0; }; + 15FBB54D17D75DE70035D752 /* Update MachServices */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/configd.tproj/update-mach-services", + ); + name = "Update MachServices"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n ${SCRIPT_INPUT_FILE_0} com.apple.configd.plist\nfi"; + showEnvVarsInLog = 0; + }; + 15FBB55117D78B670035D752 /* Update MachServices */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/configd.tproj/update-mach-services", + ); + name = "Update MachServices"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} com.apple.configd.plist\nfi"; + showEnvVarsInLog = 0; + }; + 15FBB55217D78B9F0035D752 /* Update MachServices */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/configd.tproj/update-mach-services", + ); + name = "Update MachServices"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} com.apple.configd_sim.plist\nfi"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -4776,6 +4918,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + F9347FF7187C796E003D4178 /* IPMonitorControl.c in Sources */, 1572C5140CFB55B400E2776E /* config.defs in Sources */, 1572C4DF0CFB55B400E2776E /* SCSchemaDefinitions.c in Sources */, 1572C4E00CFB55B400E2776E /* SCD.c in Sources */, @@ -4831,6 +4974,7 @@ 1572C51B0CFB55B400E2776E /* SCNetworkProtocol.c in Sources */, 1572C51C0CFB55B400E2776E /* SCNetworkService.c in Sources */, 1572C51D0CFB55B400E2776E /* SCNetworkSet.c in Sources */, + 1565D85118B847F20097062B /* SCNetworkMigration.c in Sources */, 1572C5200CFB55B400E2776E /* SCHelper_client.c in Sources */, 1572C5210CFB55B400E2776E /* SCPreferencesKeychainPrivate.c in Sources */, 1572C5220CFB55B400E2776E /* SCNetworkSignature.c in Sources */, @@ -4961,6 +5105,7 @@ files = ( 157A84FB0D56C7E800B6F1A0 /* dns-configuration.c in Sources */, 15D48EC10F67061F00B4711E /* dnsinfo_create.c in Sources */, + F9B7AE69186211CE00C78D18 /* IPMonitorControlServer.c in Sources */, 150BEC1A14CA252200237116 /* dnsinfo_server.c in Sources */, 155281020E3E4A0F00C54315 /* ip_plugin.c in Sources */, E4F211D3137B0AB900BBB915 /* network_information_priv.c in Sources */, @@ -4985,11 +5130,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 157A851E0D56C8E000B6F1A0 /* eventmon.c in Sources */, 157A85190D56C8E000B6F1A0 /* cache.c in Sources */, 157A851B0D56C8E000B6F1A0 /* ev_dlil.c in Sources */, 157A851C0D56C8E000B6F1A0 /* ev_ipv4.c in Sources */, 157A851D0D56C8E000B6F1A0 /* ev_ipv6.c in Sources */, - 157A851E0D56C8E000B6F1A0 /* eventmon.c in Sources */, + 152439EA1805CC8400D91708 /* ev_extra.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5056,11 +5202,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 159D541307528DB5004F8947 /* eventmon.c in Sources */, 159D540907528D3A004F8947 /* cache.c in Sources */, 159D540D07528DAE004F8947 /* ev_dlil.c in Sources */, 159D540F07528DB0004F8947 /* ev_ipv4.c in Sources */, 159D541107528DB2004F8947 /* ev_ipv6.c in Sources */, - 159D541307528DB5004F8947 /* eventmon.c in Sources */, + 152439E618038E5B00D91708 /* ev_extra.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5080,6 +5227,7 @@ 15D48EBF0F67061600B4711E /* dnsinfo_create.c in Sources */, 1522FCFB0FA7FE4B00B24128 /* dnsinfo_flatfile.c in Sources */, 150BEC1814CA24F900237116 /* dnsinfo_server.c in Sources */, + F9B7AE6A186211D300C78D18 /* IPMonitorControlServer.c in Sources */, 159D541707528E05004F8947 /* ip_plugin.c in Sources */, E49173E1137C4E4F0000089F /* network_information_priv.c in Sources */, 153ACCA814E322D5005029A5 /* network_information_server.c in Sources */, @@ -5199,6 +5347,7 @@ 15A5A25A0D5B94190087BDA0 /* SCNetworkProtocol.c in Sources */, 15A5A25B0D5B94190087BDA0 /* SCNetworkService.c in Sources */, 15A5A25C0D5B94190087BDA0 /* SCNetworkSet.c in Sources */, + 1565D85018B847590097062B /* SCNetworkMigration.c in Sources */, 15A5A25F0D5B94190087BDA0 /* SCHelper_client.c in Sources */, 15A5A2600D5B94190087BDA0 /* SCPreferencesKeychainPrivate.c in Sources */, 15A5A2610D5B94190087BDA0 /* SCNetworkSignature.c in Sources */, @@ -5212,6 +5361,7 @@ D61AAEB21522C99C0066B003 /* scprefs_observer.c in Sources */, C4F1848316237B1400D97043 /* VPNService.c in Sources */, B0FEF41B1644089200174B99 /* VPNAppLayer.c in Sources */, + 727AF25919138E24009AB153 /* VPNTunnel.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5262,6 +5412,7 @@ 15DAD67B07591A1A0084A6ED /* SCDNotifierSetKeys.c in Sources */, 15DAD67C07591A1A0084A6ED /* SCDNotifierAdd.c in Sources */, 15DAD67D07591A1A0084A6ED /* SCDNotifierRemove.c in Sources */, + F9B7AE641862119300C78D18 /* IPMonitorControl.c in Sources */, 15DAD67E07591A1A0084A6ED /* SCDNotifierGetChanges.c in Sources */, 15DAD67F07591A1A0084A6ED /* SCDNotifierWait.c in Sources */, 15DAD68007591A1A0084A6ED /* SCDNotifierInformViaCallback.c in Sources */, @@ -5304,6 +5455,7 @@ 15DAD6A807591A1A0084A6ED /* SCNetworkProtocol.c in Sources */, 15DAD6A907591A1A0084A6ED /* SCNetworkService.c in Sources */, 15DAD6AA07591A1A0084A6ED /* SCNetworkSet.c in Sources */, + 55A3DB9E183C2AD900ED3DB7 /* SCNetworkMigration.c in Sources */, 15DAD6AB07591A1A0084A6ED /* BondConfiguration.c in Sources */, 15FD7B3C101E439200C56621 /* BridgeConfiguration.c in Sources */, 15DAF2DC08466D4900D1B2BD /* SCHelper_client.c in Sources */, @@ -5772,7 +5924,7 @@ }; 151FE2E50D5B7046000D6DB1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { PRODUCT_NAME = "configd_base (EmbeddedSimulator)"; }; @@ -5780,7 +5932,7 @@ }; 151FE2E60D5B7046000D6DB1 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { PRODUCT_NAME = "configd_base (EmbeddedSimulator)"; }; @@ -6055,7 +6207,6 @@ 156EB5E30905594A00EEF749 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "-"; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; INSTALL_MODE_FLAG = "a-w,a+rX"; @@ -6067,7 +6218,6 @@ 156EB5E40905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "-"; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; GCC_DYNAMIC_NO_PIC = NO; INSTALL_MODE_FLAG = "a-w,a+rX"; @@ -6204,6 +6354,7 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; @@ -6217,6 +6368,7 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/local/lib/SystemConfiguration; @@ -6443,6 +6595,7 @@ buildSettings = { "ARCHS[sdk=iphoneos*]" = "$(NATIVE_ARCH)"; "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_32_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = "$(RC_ProjectSourceVersion)"; DEAD_CODE_STRIPPING = YES; @@ -6466,6 +6619,7 @@ "-Wno-unknown-pragmas", "-Wformat-security", "-Wcast-align", + "-Wshorten-64-to-32", ); }; name = Debug; @@ -6473,6 +6627,7 @@ 156EB6400905594A00EEF749 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = "$(RC_ProjectSourceVersion)"; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -6493,6 +6648,7 @@ "-Wno-unknown-pragmas", "-Wformat-security", "-Wcast-align", + "-Wshorten-64-to-32", ); }; name = Release; @@ -6537,10 +6693,9 @@ }; 15732AAA16EA503200F3AC4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { APPLY_RULES_IN_COPY_FILES = YES; - CODE_SIGN_IDENTITY = "-"; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /usr/libexec; @@ -6554,10 +6709,9 @@ }; 15732AAB16EA503200F3AC4C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { APPLY_RULES_IN_COPY_FILES = YES; - CODE_SIGN_IDENTITY = "-"; FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /usr/libexec; @@ -6571,7 +6725,7 @@ }; 15732AD316EA511900F3AC4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", @@ -6589,7 +6743,7 @@ }; 15732AD416EA511900F3AC4C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(SYMROOT)", @@ -6607,7 +6761,7 @@ }; 15732AE216EA6B6700F3AC4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { BUILD_VARIANTS = ( normal, @@ -6627,7 +6781,7 @@ OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", - "-L$(INDIGO_INSTALL_PATH_PREFIX)/usr/lib/system", + "-L/usr/lib/system", "-lcompiler_rt_sim", "-ldispatch", "-ldyld_sim", @@ -6636,9 +6790,9 @@ "-lxpc", "-Wl,-upward-lSystem", ); - PRIVATE_HEADERS_FOLDER_PATH = "$(SDKROOT)/usr/local/include"; + PRIVATE_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; PRODUCT_NAME = libsystem_sim_configuration; - PUBLIC_HEADERS_FOLDER_PATH = "$(SDKROOT)/usr/local/include"; + PUBLIC_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; STRIP_INSTALLED_PRODUCT_debug = NO; STRIP_INSTALLED_PRODUCT_normal = YES; STRIP_INSTALLED_PRODUCT_profile = NO; @@ -6647,7 +6801,7 @@ }; 15732AE316EA6B6700F3AC4C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { BUILD_VARIANTS = ( normal, @@ -6667,7 +6821,7 @@ OTHER_CFLAGS_profile = ""; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", - "-L$(INDIGO_INSTALL_PATH_PREFIX)/usr/lib/system", + "-L/usr/lib/system", "-lcompiler_rt_sim", "-ldispatch", "-ldyld_sim", @@ -6676,9 +6830,9 @@ "-lxpc", "-Wl,-upward-lSystem", ); - PRIVATE_HEADERS_FOLDER_PATH = "$(SDKROOT)/usr/local/include"; + PRIVATE_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; PRODUCT_NAME = libsystem_sim_configuration; - PUBLIC_HEADERS_FOLDER_PATH = "$(SDKROOT)/usr/local/include"; + PUBLIC_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/usr/local/include"; STRIP_INSTALLED_PRODUCT_debug = NO; STRIP_INSTALLED_PRODUCT_normal = YES; STRIP_INSTALLED_PRODUCT_profile = NO; @@ -6977,7 +7131,7 @@ }; 157FDE3F164A075F0040D6A8 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { INSTALLHDRS_COPY_PHASE = YES; PRODUCT_NAME = "configd_libSystem (EmbeddedSimulator)"; @@ -6986,7 +7140,7 @@ }; 157FDE40164A075F0040D6A8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { INSTALLHDRS_COPY_PHASE = YES; PRODUCT_NAME = "configd_libSystem (EmbeddedSimulator)"; @@ -7039,9 +7193,12 @@ isa = XCBuildConfiguration; buildSettings = { APPLY_RULES_IN_COPY_FILES = YES; - CODE_SIGN_ENTITLEMENTS = configd.tproj/entitlements.plist; + CODE_SIGN_ENTITLEMENTS = "configd.tproj/entitlements-ios.plist"; CODE_SIGN_IDENTITY = "-"; - FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( @@ -7058,9 +7215,12 @@ isa = XCBuildConfiguration; buildSettings = { APPLY_RULES_IN_COPY_FILES = YES; - CODE_SIGN_ENTITLEMENTS = configd.tproj/entitlements.plist; + CODE_SIGN_ENTITLEMENTS = "configd.tproj/entitlements-ios.plist"; CODE_SIGN_IDENTITY = "-"; - FRAMEWORK_SEARCH_PATHS = "$(SYMROOT)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH = /usr/libexec; LIBRARY_SEARCH_PATHS = ( @@ -7221,7 +7381,7 @@ }; 15A5A2670D5B94190087BDA0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { HEADER_SEARCH_PATHS = ( "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", @@ -7243,7 +7403,7 @@ }; 15A5A2680D5B94190087BDA0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { HEADER_SEARCH_PATHS = ( "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", @@ -7265,9 +7425,10 @@ }; 15AB751716EBFF3400FAA8CE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; + INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; @@ -7278,9 +7439,10 @@ }; 15AB751816EBFF3400FAA8CE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; + INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; @@ -7291,9 +7453,9 @@ }; 15AB751D16EBFF8A00FAA8CE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = Plugins/SCNetworkReachability/Info.plist; + INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; PRODUCT_NAME = SCNetworkReachability; @@ -7302,9 +7464,9 @@ }; 15AB751E16EBFF8A00FAA8CE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = Plugins/SCNetworkReachability/Info.plist; + INFOPLIST_FILE = "Plugins/SCNetworkReachability/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; PRODUCT_NAME = SCNetworkReachability; @@ -7345,7 +7507,7 @@ }; 15D3082516F3E4DA00014F82 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; @@ -7359,7 +7521,7 @@ }; 15D3082616F3E4DA00014F82 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; @@ -7373,7 +7535,7 @@ }; 15D3082B16F3E4E100014F82 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { INFOPLIST_FILE = Plugins/SimulatorSupport/Info.plist; INSTALL_MODE_FLAG = "a-w,a+rX"; @@ -7384,7 +7546,7 @@ }; 15D3082C16F3E4E100014F82 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { INFOPLIST_FILE = Plugins/SimulatorSupport/Info.plist; INSTALL_MODE_FLAG = "a-w,a+rX"; @@ -7395,10 +7557,11 @@ }; 15E1B05716EBAE3C00E5F06F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; @@ -7409,10 +7572,11 @@ }; 15E1B05816EBAE3C00E5F06F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { DEBUG_INFORMATION_FORMAT = dwarf; HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /usr/local/lib/SystemConfiguration; LIBRARY_STYLE = STATIC; @@ -7423,9 +7587,9 @@ }; 15E1B05F16EBAE7800E5F06F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = Plugins/IPMonitor/Info.plist; + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; PRODUCT_NAME = IPMonitor; @@ -7434,9 +7598,9 @@ }; 15E1B06016EBAE7800E5F06F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { - INFOPLIST_FILE = Plugins/IPMonitor/Info.plist; + INFOPLIST_FILE = "Plugins/IPMonitor/Info-EmbeddedSimulator.plist"; INSTALL_MODE_FLAG = "a-w,a+rX"; INSTALL_PATH_ACTUAL = /System/Library/SystemConfiguration; PRODUCT_NAME = IPMonitor; @@ -7459,7 +7623,7 @@ }; 15FD13C70D59485000F9409C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { PRODUCT_NAME = "configd (Aggregate/EmbeddedSimulator)"; }; @@ -7467,7 +7631,7 @@ }; 15FD13C80D59485000F9409C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 15FD147B0D594FE700F9409C /* IndigoSDK.xcconfig */; + baseConfigurationReference = 15FD147B0D594FE700F9409C /* SimulatorSupport.xcconfig */; buildSettings = { PRODUCT_NAME = "configd (Aggregate/EmbeddedSimulator)"; }; diff --git a/dnsinfo/dnsinfo_copy.c b/dnsinfo/dnsinfo_copy.c index ee0a17a..81ef601 100644 --- a/dnsinfo/dnsinfo_copy.c +++ b/dnsinfo/dnsinfo_copy.c @@ -417,7 +417,7 @@ dns_configuration_copy() uint32_t n_padding = ntohl(config->n_padding); if (n_padding <= (DNS_CONFIG_BUF_MAX - dataLen)) { - uint32_t len; + size_t len; len = dataLen + n_padding; buf = malloc(len); diff --git a/dnsinfo/dnsinfo_create.c b/dnsinfo/dnsinfo_create.c index 9bc5499..5fe83ca 100644 --- a/dnsinfo/dnsinfo_create.c +++ b/dnsinfo/dnsinfo_create.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2006, 2009, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2009, 2011-2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -333,7 +333,7 @@ _dns_resolver_add_search(dns_create_resolver_t *_resolver, const char *search) _dns_resolver_buf_t *resolver = (_dns_resolver_buf_t *)*_resolver; resolver->resolver.n_search = htonl(ntohl(resolver->resolver.n_search) + 1); - _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_SEARCH, strlen(search) + 1, (void *)search); + _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_SEARCH, (uint32_t)strlen(search) + 1, (void *)search); return; } @@ -345,7 +345,7 @@ _dns_resolver_add_sortaddr(dns_create_resolver_t *_resolver, dns_sortaddr_t *sor _dns_resolver_buf_t *resolver = (_dns_resolver_buf_t *)*_resolver; resolver->resolver.n_sortaddr = htonl(ntohl(resolver->resolver.n_sortaddr) + 1); - _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_SORTADDR, sizeof(dns_sortaddr_t), (void *)sortaddr); + _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_SORTADDR, (uint32_t)sizeof(dns_sortaddr_t), (void *)sortaddr); return; } @@ -354,7 +354,7 @@ __private_extern__ void _dns_resolver_set_domain(dns_create_resolver_t *_resolver, const char *domain) { - _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_DOMAIN, strlen(domain) + 1, (void *)domain); + _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_DOMAIN, (uint32_t)strlen(domain) + 1, (void *)domain); return; } @@ -385,7 +385,7 @@ __private_extern__ void _dns_resolver_set_options(dns_create_resolver_t *_resolver, const char *options) { - _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_OPTIONS, strlen(options) + 1, (void *)options); + _dns_resolver_add_attribute(_resolver, RESOLVER_ATTRIBUTE_OPTIONS, (uint32_t)strlen(options) + 1, (void *)options); return; } diff --git a/dnsinfo/dnsinfo_flatfile.c b/dnsinfo/dnsinfo_flatfile.c index 65861b7..a52be6b 100644 --- a/dnsinfo/dnsinfo_flatfile.c +++ b/dnsinfo/dnsinfo_flatfile.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2009, 2011, 2012, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -465,7 +465,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) number = strtol(word, NULL, 0); if (number < 0 || number > UINT32_MAX) break; - _dns_resolver_set_order(&res, number); + _dns_resolver_set_order(&res, (uint32_t)number); break; } @@ -489,7 +489,7 @@ _dnsinfo_flatfile_create_resolver(const char *dir, const char *path) number = strtol(word, NULL, 0); if (number < 0 || number > UINT32_MAX) break; - _dns_resolver_set_timeout(&res, number); + _dns_resolver_set_timeout(&res, (uint32_t)number); break; } } diff --git a/dnsinfo/dnsinfo_server.c b/dnsinfo/dnsinfo_server.c index 9a3e588..d006e7a 100644 --- a/dnsinfo/dnsinfo_server.c +++ b/dnsinfo/dnsinfo_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2008, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2004-2008, 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -66,7 +66,8 @@ static libSC_info_server_t S_dns_info; * S_debug * A boolean that enables additional logging. */ -static Boolean *S_debug = NULL; +static Boolean S_debug_s; +static Boolean * S_debug = &S_debug_s; static SCLoggerRef S_logger = NULL; @@ -92,7 +93,7 @@ log_xpc_object(const char *msg, xpc_object_t obj) desc = xpc_copy_description(obj); if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("%s = %s"), msg, desc); + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("%s = %s"), msg, desc); } free(desc); } @@ -156,7 +157,7 @@ _dnsinfo_copy(xpc_connection_t connection, xpc_object_t request) proc_name = "???"; } - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%s[%d]> DNS configuration copy: %llu"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%s[%d]> DNS configuration copy: %llu"), connection, proc_name, xpc_connection_get_pid(connection), @@ -196,7 +197,7 @@ _dnsinfo_acknowledge(xpc_connection_t connection, xpc_object_t request) generation = xpc_dictionary_get_uint64(request, DNSINFO_GENERATION); if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%d> DNS configuration ack: %llu"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> DNS configuration ack: %llu"), connection, xpc_connection_get_pid(connection), generation); @@ -208,8 +209,9 @@ _dnsinfo_acknowledge(xpc_connection_t connection, xpc_object_t request) // in a [new] network change being posted inSync = _libSC_info_server_in_sync(&S_dns_info); - S_sync_handler(inSync); - + if (S_sync_handler) { + S_sync_handler(inSync); + } return; } @@ -237,7 +239,7 @@ process_request(xpc_connection_t connection, xpc_object_t request) break; default : SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p> unknown request : %d"), + CFSTR("<%p> unknown request : %lld"), connection, op); @@ -252,7 +254,7 @@ static void process_new_connection(xpc_connection_t c) { if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%d> DNS configuration session: open"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> DNS configuration session: open"), c, xpc_connection_get_pid(c)); } @@ -277,7 +279,7 @@ process_new_connection(xpc_connection_t c) Boolean changed; if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%d> DNS configuration session: close"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> DNS configuration session: close"), c, xpc_connection_get_pid(c)); } @@ -300,7 +302,7 @@ process_new_connection(xpc_connection_t c) } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> Connection error: %d : %s"), + CFSTR("<%p:%d> Connection error: %p : %s"), c, xpc_connection_get_pid(c), xobj, @@ -309,7 +311,7 @@ process_new_connection(xpc_connection_t c) } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> unknown event type : %x"), + CFSTR("<%p:%d> unknown event type : %p"), c, xpc_connection_get_pid(c), type); @@ -377,14 +379,14 @@ load_DNSConfiguration(CFBundleRef bundle, SCLoggerLog(S_logger, LOG_ERR, CFSTR("DNS configuration server: %s"), desc); } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("DNS configuration server: Connection error: %d : %s"), + CFSTR("DNS configuration server: Connection error: %p : %s"), event, desc); } } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("DNS configuration server: unknown event type : %x"), + CFSTR("DNS configuration server: unknown event type : %p"), type); } @@ -415,7 +417,7 @@ _dns_configuration_store(dns_create_config_t *_config) new_generation = config->config.generation; if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("DNS configuration updated: %llu"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("DNS configuration updated: %llu"), new_generation); } @@ -435,7 +437,9 @@ _dns_configuration_store(dns_create_config_t *_config) // if anyone is keeping us in sync, they now need to catch up in_sync = _libSC_info_server_in_sync(&S_dns_info); - S_sync_handler(in_sync); + if (S_sync_handler) { + S_sync_handler(in_sync); + } // and let everyone else know that the configuration has been updated notify_key = dns_configuration_notify_key(); diff --git a/get-mobility-info b/get-mobility-info index d62016a..4a51554 100755 --- a/get-mobility-info +++ b/get-mobility-info @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2004-2013 Apple Inc. +# Copyright (c) 2004-2014 Apple Inc. # # get-mobility-info # @@ -20,7 +20,7 @@ limited to, the serial number or similar unique number for your device, your user name, or your computer name. The information is used by Apple in accordance with its privacy policy (www.apple.com/privacy) and is not shared with any third party. By enabling this diagnostic tool and sending a copy of -the generated files to Apple, you are consenting to Apple’s use of the content +the generated files to Apple, you are consenting to Apple's use of the content of such files. _END_OF_DISCLAIMER @@ -82,22 +82,97 @@ echo "Please wait, collecting information and statistics" echo "" # -# Execute network reachability/DNS commands early as "mDNSResponder" will block while -# logging its "state" info. +# Execute network reachability/DNS commands early # -scutil -d -v -r www.apple.com "" no-server > reachability-info 2>&1 +echo "#" > reachability-info +echo '# scutil -d -v -r www.apple.com "" no-server' >> reachability-info +echo "#" >> reachability-info +scutil -d -v -r www.apple.com "" no-server >> reachability-info 2>&1 + +echo "#" >> reachability-info +echo '# scutil -d -v -r 0.0.0.0 no-server' >> reachability-info +echo "#" >> reachability-info +scutil -d -v -r 0.0.0.0 no-server >> reachability-info 2>&1 + if [ -x /usr/bin/dig -a -f /etc/resolv.conf ]; then /usr/bin/dig -t any -c any www.apple.com > dig-results 2>/dev/null fi # -# Signal "networkd" and "mDNSResponder" to log their "state" info. This logging will -# continue while we execute a few other commands and should be complete by the time -# we collect the log content. +# Signal "networkd" to log its "state" info. This logging will continue while +# we execute a few other commands and should be complete by the time we collect +# the log content. # if [ -x /usr/bin/killall ]; then - ${PRIV} /usr/bin/killall -INFO networkd - ${PRIV} /usr/bin/killall -INFO mDNSResponder + # + # request networkd state + # + ${PRIV} /usr/bin/killall -INFO networkd 2>/dev/null + + # + # discoveryd info + # + if [ -x /usr/libexec/discoveryd -a -x /usr/sbin/discoveryutil ]; then + ${PRIV} pgrep -q -x discoveryd + if [ $? -eq 0 ]; then + P_ARG="" + case "`${PRIV} discoveryutil help 2>&1`" in + Warning:* ) + P_ARG="--priv" + ;; + esac + # + # upgrade logging (if needed) + # + CLASS_o=`${PRIV} discoveryutil ${P_ARG} logclass` + CLASS_n=`${PRIV} discoveryutil ${P_ARG} logclass Cache` + + LEVEL_o=`${PRIV} discoveryutil ${P_ARG} loglevel | awk '{ print $5 }'` + if [ ${LEVEL_o} -le 1 ]; then + LEVEL_n=`${PRIV} discoveryutil ${P_ARG} loglevel Intermediate | awk '{ print $5 }'` + else + LEVEL_n=${LEVEL_o} + fi + + cp /dev/null discoveryd-info + for c in \ + clientlisteners \ + configinterfaces \ + configresolvers \ + dnsproxystate \ + mdnsbrowses \ + mdnscachecontents \ + mdnscachestats \ + mdnslisteners \ + mdnsregistrations \ + nattraversals \ + udnscachecontents \ + udnscachestats \ + udnsresolvers \ + udnsunanswered \ + + do + echo "#" >> discoveryd-info + echo "# discoveryutil ${c}" >> discoveryd-info + echo "#" >> discoveryd-info + ${PRIV} discoveryutil ${P_ARG} --timeout ${c} >> discoveryd-info + done + + if [ "$CLASS_o" != "$CLASS_n" ]; then + # + # restore log settings + # + ${PRIV} discoveryutil ${P_ARG} lognoclass Cache >/dev/null + fi + + if [ "$LEVEL_o" != "$LEVEL_n" ]; then + ${PRIV} discoveryutil ${P_ARG} loglevel ${LEVEL_o} >/dev/null + fi + + ${PRIV} cat /var/run/com.apple.discoveryd-trace.sb > com.apple.discoveryd-trace.sb 2>/dev/null + fi + fi + sleep 1 fi @@ -150,7 +225,7 @@ fi # # collect wifi dump # -if [ -x /usr/bin/wdutil ]; then +if [ -x /usr/bin/wdutil -a -x /bin/ls ]; then ${PRIV} /usr/bin/wdutil dump mkdir -p "wifi_dump" /bin/ls -1 /private/tmp/wifi-* 2>/dev/null \ @@ -170,10 +245,6 @@ if [ -e /System/Library/CoreServices/SystemVersion.plist ]; then cat /System/Library/CoreServices/SystemVersion.plist \ > SystemVersion.plist 2>&1 fi -if [ -e /System/Library/CoreServices/ServerVersion.plist ]; then - cat /System/Library/CoreServices/ServerVersion.plist \ - > ServerVersion.plist 2>&1 -fi # # IOKit info @@ -260,6 +331,9 @@ for f in \ /Library/Preferences/SystemConfiguration/preferences.plist \ /Library/Preferences/com.apple.alf.plist \ /Library/Preferences/com.apple.sharing.firewall.plist \ + /Library/Preferences/com.apple.networkextension.plist \ + /Library/Preferences/com.apple.networkextension.control.plist \ + /Library/Preferences/com.apple.networkextension.necp.plist \ /Library/Preferences/com.apple.wwand.plist \ do @@ -272,11 +346,14 @@ done # # System / network preferences (from other volumes) # -mount \ -| awk 'BEGIN { FS= "[/ \t]+" } /^\/dev\/disk.* on \/Volumes\// { print $6 }' \ +/bin/ls /Volumes 2>/dev/null \ | while read volume do V_PATH="/Volumes/${volume}" + if [ -h "${V_PATH}" ]; then + # if the path is a symlink + continue + fi for f in \ /Library/Preferences/SystemConfiguration/Networkinterfaces.plist \ /Library/Preferences/SystemConfiguration/preferences.plist \ @@ -318,7 +395,7 @@ if [ -f /var/tmp/configd-state ]; then cat /var/tmp/configd-state > configd-state 2>&1 fi if [ -f /var/tmp/configd-reachability ]; then - cat /var/tmp/configd-reachability > configd-reachability 2>&1 + cat /var/tmp/configd-reachability > configd-reachability 2>&1 fi # @@ -333,14 +410,12 @@ ${PRIV} cat /etc/hosts > etc.hosts 2>/dev/null # if [ -x /usr/sbin/kextstat ]; then /usr/sbin/kextstat > kextstat 2>&1 -elif [ -x /usr/sbin/kmodstat ]; then - /usr/sbin/kmodstat > kmodstat 2>&1 fi # # network statistics # -echo -n "" > network-statistics +/bin/echo -n "" > network-statistics if [ -x /usr/sbin/arp ]; then echo "#" >> network-statistics @@ -351,9 +426,9 @@ fi if [ -x /usr/sbin/netstat ]; then echo "#" >> network-statistics - echo "# netstat -n -a -A" >> network-statistics + echo "# netstat -A -a -l -n" >> network-statistics echo "#" >> network-statistics - /usr/sbin/netstat -n -a -A >> network-statistics 2>&1 + /usr/sbin/netstat -A -a -l -n >> network-statistics 2>&1 echo "#" >> network-statistics echo "# netstat -s" >> network-statistics @@ -438,20 +513,6 @@ if [ -x /usr/sbin/ndp ]; then fi fi -if [ -x /sbin/ipfw ]; then - echo "#" >> network-statistics - echo "# ipfw -at show" >> network-statistics - echo "#" >> network-statistics - ${PRIV} /sbin/ipfw -at show >> network-statistics 2>&1 -fi - -if [ -x /sbin/ip6fw ]; then - echo "#" >> network-statistics - echo "# ip6fw -at show" >> network-statistics - echo "#" >> network-statistics - ${PRIV} /sbin/ip6fw -at show >> network-statistics 2>&1 -fi - if [ -x /sbin/pfctl ]; then echo "#" > pf echo "# pfctl -s all" >> pf @@ -472,36 +533,45 @@ if [ -x /sbin/pfctl ]; then done fi +# +# mach port info +# +if [ -x /usr/local/bin/lsmp ]; then + ${PRIV} /usr/local/bin/lsmp -a -v > lsmp 2>&1 +fi + +# +# open files +# if [ -x /usr/sbin/lsof ]; then - echo "#" >> network-statistics - echo "# lsof -i -U -n -P" >> network-statistics - echo "#" >> network-statistics - ${PRIV} /usr/sbin/lsof -i -U -n -P >> network-statistics 2>&1 + ${PRIV} /usr/sbin/lsof -n -P -T q > lsof 2>&1 +fi + +# +# [lib]dispatch info +# +if [ -x /usr/local/bin/ddt ]; then + /bin/echo -n "" > dispatch-info + for BIN in \ + configd \ + discoveryd \ + + do + echo "#" >> dispatch-info + echo "# ddt -vkp ${BIN}" >> dispatch-info + echo "#" >> dispatch-info + ${PRIV} /usr/local/bin/ddt -vkp ${BIN} >> dispatch-info 2>&1 + done fi # -# DirectoryService info +# OpenDirectory info # if [ -x /usr/bin/odutil ]; then echo "#" > od-info echo "# odutil show all" >> od-info echo "#" >> od-info ${PRIV} /usr/bin/odutil show all >> od-info 2>&1 -elif [ -x /usr/bin/dscacheutil ]; then - echo "#" > ds-info - echo "# dscacheutil -configuration" >> ds-info - echo "#" >> ds-info - /usr/bin/dscacheutil -configuration >> ds-info 2>&1 - - echo "#" >> ds-info - echo "# dscacheutil -statistics" >> ds-info - echo "#" >> ds-info - /usr/bin/dscacheutil -statistics >> ds-info 2>&1 - - echo "#" >> ds-info - echo "# dscacheutil -cachedump -entries" >> ds-info - echo "#" >> ds-info - /usr/bin/dscacheutil -cachedump -entries >> ds-info 2>&1 fi # @@ -585,7 +655,7 @@ fi # # system usage statistics # -echo -n "" > system-statistics +/bin/echo -n "" > system-statistics if [ -x /usr/bin/uptime ]; then echo "#" >> system-statistics @@ -596,9 +666,9 @@ fi if [ -x /usr/sbin/sysctl ]; then echo "#" >> system-statistics - echo "# sysctl -a" >> system-statistics + echo "# sysctl kern hw net debug" >> system-statistics echo "#" >> system-statistics - /usr/sbin/sysctl -a >> system-statistics 2>&1 + /usr/sbin/sysctl kern hw net debug >> system-statistics 2>&1 fi if [ -x /usr/bin/zprint ]; then @@ -608,22 +678,39 @@ if [ -x /usr/bin/zprint ]; then ${PRIV} /usr/bin/zprint >> system-statistics 2>&1 fi +if [ -x /usr/sbin/lsof -a -x /bin/ls ]; then + N=0 + /bin/ls -1 /Library/Preferences/SystemConfiguration/*-lock \ + 2>/dev/null \ + | while read lock + do + if [ ${N} -eq 0 ]; then + echo "#" >> system-statistics + echo "# lsof [SCPreferences lock files]" >> system-statistics + fi + N=`expr ${N} + 1` + + echo "#" >> system-statistics + ${PRIV} /usr/sbin/lsof -- ${lock} >> system-statistics 2>&1 + done +fi + # # collect executable and plugin info # report_binary_info() { - if [ ! -f ${1} ]; then + if [ ! -f "${1}" ]; then return fi - VERSION=`what ${1}` + VERSION=`what "${1}"` echo "${VERSION}" >> versions 2>&1 - SUM=`sum ${1}` + SUM=`sum "${1}"` echo "\tsum: ${SUM}" >> versions 2>&1 - LSINFO=`ls -lu ${1}` + LSINFO=`ls -lu "${1}"` echo "\tadditional info: ${LSINFO}" >> versions 2>&1 echo "" >> versions 2>&1 @@ -634,7 +721,7 @@ get_binary_info() for BIN in \ /usr/libexec/bootpd \ /usr/libexec/configd \ - /usr/sbin/mDNSResponder \ + /usr/libexec/discoveryd \ /usr/sbin/awacsd \ /usr/sbin/pppd \ /usr/sbin/racoon \ @@ -646,13 +733,15 @@ get_binary_info() report_binary_info "${BIN}" done - if [ -x /usr/bin/xcodebuild ]; then - /usr/bin/xcodebuild -showsdks \ - | grep iphone \ - | awk '{print $NF}' \ - | while read IOS + if [ -x /usr/bin/xcode-select -a -x /usr/bin/xcodebuild -a -x /usr/bin/xcrun ]; then + SDKPATH="`xcode-select --print-path 2>/dev/null`" + if [ $? -eq 0 -a -n "${SDKPATH}" ]; then + /usr/bin/xcodebuild -showsdks 2>/dev/null \ + | grep iphone \ + | awk '{ print $NF }' \ + | while read SDK do - SDKPATH="`xcrun --sdk $IOS --show-sdk-path`" + SDKPATH="`xcrun --sdk $SDK --show-sdk-path`" for BIN in \ /usr/libexec/configd_sim \ /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration \ @@ -661,16 +750,20 @@ get_binary_info() report_binary_info "${SDKPATH}${BIN}" done done + else + echo "*** NO SDKs ***" >> versions + echo "" >> versions + fi fi } get_plugins_info() { num=0 - cd ${ROOT}/System/Library/SystemConfiguration + cd /System/Library/SystemConfiguration for PLUGIN in *.bundle do - plugins[$num]=$PLUGIN + plugins[$num]="${PLUGIN}" num=$(( $num + 1 )) done @@ -678,11 +771,11 @@ get_plugins_info() for PLUGIN in "${plugins[@]}" do - PLUGIN_DIR="${ROOT}/System/Library/SystemConfiguration/${PLUGIN}" - PLUGIN_INF=${PLUGIN_DIR}/Contents/Info.plist - if [ ! -f ${PLUGIN_INF} ]; then - PLUGIN_INF=${PLUGIN_DIR}/Info.plist - if [ ! -f ${PLUGIN_INF} ]; then + PLUGIN_DIR="/System/Library/SystemConfiguration/${PLUGIN}" + PLUGIN_INF="${PLUGIN_DIR}/Contents/Info.plist" + if [ ! -f "${PLUGIN_INF}" ]; then + PLUGIN_INF="${PLUGIN_DIR}/Info.plist" + if [ ! -f "${PLUGIN_INF}" ]; then echo "${PLUGIN_INF}: No Info.plist" >> versions 2>&1 fi fi @@ -690,7 +783,7 @@ get_plugins_info() echo "${PLUGIN}" >> versions 2>&1 ENABLED="Enabled" - BOOL=`scutil --get ${PLUGIN_INF} / Enabled 2>/dev/null` + BOOL=`scutil --get "${PLUGIN_INF}" / Enabled 2>/dev/null` if [ $? -eq 0 ]; then if [ ${BOOL} = "TRUE" ]; then ENABLED="Enabled*" @@ -701,7 +794,7 @@ get_plugins_info() echo "\t${ENABLED}" >> versions 2>&1 VERBOSE="" - BOOL=`scutil --get ${PLUGIN_INF} / Verbose 2>/dev/null` + BOOL=`scutil --get "${PLUGIN_INF}" / Verbose 2>/dev/null` if [ $? -eq 0 ]; then if [ ${BOOL} = "TRUE" ]; then VERBOSE="Verbose" @@ -711,23 +804,23 @@ get_plugins_info() echo "\t${VERBOSE}" >> versions 2>&1 fi - VERSION=`scutil --get ${PLUGIN_INF} / CFBundleVersion 2>/dev/null` + VERSION=`scutil --get "${PLUGIN_INF}" / CFBundleVersion 2>/dev/null` if [ $? -eq 1 ]; then - VERSION=`scutil --get ${PLUGIN_INF} / CFBundleShortVersionString 2>/dev/null` + VERSION=`scutil --get "${PLUGIN_INF}" / CFBundleShortVersionString 2>/dev/null` fi echo "\tVersion: ${VERSION}" >> versions 2>&1 - if [ -f ${PLUGIN_DIR}/Contents/MacOS/${PLUGIN%.*} ]; then - SUM=`sum ${PLUGIN_DIR}/Contents/MacOS/${PLUGIN%.*}` + if [ -f "${PLUGIN_DIR}/Contents/MacOS/${PLUGIN%.*}" ]; then + SUM=`sum "${PLUGIN_DIR}/Contents/MacOS/${PLUGIN%.*}"` echo "\tsum: ${SUM}" >> versions 2>&1 - LSINFO=`ls -lu ${PLUGIN_DIR}/Contents/MacOS/${PLUGIN%.*}` + LSINFO=`ls -lu "${PLUGIN_DIR}/Contents/MacOS/${PLUGIN%.*}"` echo "\tadditional info: ${LSINFO}" >> versions 2>&1 - elif [ -f ${PLUGIN_DIR}/${PLUGIN%.*} ]; then - SUM=`sum ${PLUGIN_DIR}/${PLUGIN%.*}` + elif [ -f "${PLUGIN_DIR}/${PLUGIN%.*}" ]; then + SUM=`sum "${PLUGIN_DIR}/${PLUGIN%.*}"` echo "\tsum: ${SUM}" >> versions 2>&1 - LSINFO=`ls -lu ${PLUGIN_DIR}/${PLUGIN%.*}` + LSINFO=`ls -lu "${PLUGIN_DIR}/${PLUGIN%.*}"` echo "\tadditional info: ${LSINFO}" >> versions 2>&1 fi @@ -741,39 +834,45 @@ if [ -x /usr/bin/what -a -x /usr/bin/sum -a -x /bin/ls ]; then fi # -# Last thing is to collect the logs to give a chance for networkd and mDNSResponder -# to finish dumping their state +# to give a chance for "networkd" to finish dumping its state, the last +# thing we do is collect the logs # # # system log, kernel.log, early boot log messages # if [ -x /usr/bin/syslog ]; then + # # save the recent activity - ${PRIV} /usr/bin/syslog | ${TAIL_25000} > syslog + # + ${PRIV} /usr/bin/syslog -T local.3 \ + | ${TAIL_25000} > syslog + # # save just the "kernel" activity (in case some of the # interesting/relevant message are before the messages # captured above. - ${PRIV} /usr/bin/syslog -k Facility kern | ${TAIL_25000} > kernel + # + ${PRIV} /usr/bin/syslog -T local.3 -k Facility kern \ + | ${TAIL_25000} > kernel if [ -d /var/log/DiagnosticMessages ]; then # save any MessageTracer activity - ${PRIV} /usr/bin/syslog -d /var/log/DiagnosticMessages \ - -F raw \ - -T local \ - | ${TAIL_25000} > DiagnosticMessages + ${PRIV} /usr/bin/syslog -d /var/log/DiagnosticMessages \ + -F raw \ + -T local.3 \ + | ${TAIL_25000} > DiagnosticMessages fi else if [ -f /var/log/system.log ]; then - ${PRIV} ${TAIL_25000} /var/log/system.log > system.log + ${PRIV} ${TAIL_25000} /var/log/system.log > system.log fi if [ -f /var/log/kernel.log ]; then - ${PRIV} ${TAIL_25000} /var/log/kernel.log > kernel.log + ${PRIV} ${TAIL_25000} /var/log/kernel.log > kernel.log fi fi if [ -x /sbin/dmesg ]; then - ${PRIV} /sbin/dmesg > dmesg + ${PRIV} /sbin/dmesg > dmesg fi # @@ -823,22 +922,24 @@ if [ -x /bin/ls ]; then # collect crash reports # for daemon in \ + InternetSharing \ + SCHelper \ + SCMonitor \ + awacsd \ bootpd \ configd \ + discoveryd \ + discoveryd_helper \ eapolclient \ - mDNSResponder \ - mDNSResponderHelper \ - awacsd \ pppd \ racoon \ socketfilterfw \ - InternetSharing \ - SCHelper \ - SCMonitor \ do /bin/ls -1 /Library/Logs/DiagnosticReports/${daemon}_*.crash \ + /Library/Logs/DiagnosticReports/${daemon}_*.ips \ /Library/Logs/CrashReporter/${daemon}_*.crash \ + /Library/Logs/CrashReporter/${daemon}_*.ips \ /Library/Logs/CrashReporter/${daemon}_*.plist \ 2>/dev/null \ | while read log @@ -864,6 +965,12 @@ if [ -x /bin/ls ]; then done fi +# +# stackshot +# +if [ -x /usr/local/bin/crstackshot ]; then + /usr/local/bin/crstackshot 2>/dev/null +fi # # collect everything into a single archive diff --git a/libSystemConfiguration/libSystemConfiguration_server.c b/libSystemConfiguration/libSystemConfiguration_server.c index 82a201a..0a5aca1 100644 --- a/libSystemConfiguration/libSystemConfiguration_server.c +++ b/libSystemConfiguration/libSystemConfiguration_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -79,7 +79,6 @@ _client_key(xpc_connection_t c) } -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) static void _handle_entitlement_check_failure(pid_t pid) { @@ -113,7 +112,6 @@ _handle_entitlement_check_failure(pid_t pid) CFRelease(pidNumber); }); } -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) /* @@ -195,16 +193,19 @@ void _libSC_info_server_open(libSC_info_server_t *server_info, xpc_connection_t c) { - CFDataRef client_key; - CFDataRef client_val; - client_val_t val; + CFDataRef client_key; + CFMutableDataRef client_val; + client_val_t *val; client_key = _client_key(c); - val.pid = xpc_connection_get_pid(c); - val.generation_pushed = 0; - val.generation_acknowledged = 0; - client_val = CFDataCreate(NULL, (UInt8 *)&val, sizeof(val)); + client_val = CFDataCreateMutable(NULL, sizeof(*val)); + CFDataSetLength(client_val, sizeof(*val)); + + val = (client_val_t *)(void *)CFDataGetMutableBytePtr(client_val); + val->pid = xpc_connection_get_pid(c); + val->generation_pushed = 0; + val->generation_acknowledged = 0; CFDictionarySetValue(server_info->info, client_key, client_val); CFRelease(client_key); @@ -227,16 +228,16 @@ _libSC_info_server_get_data(libSC_info_server_t *server_info, xpc_connection_t c, uint64_t *generation) { - CFDataRef client_key; - CFDataRef client_val; - client_val_t *val; + CFDataRef client_key; + CFMutableDataRef client_val; + client_val_t *val; // update last generation pushed to client client_key = _client_key(c); - client_val = CFDictionaryGetValue(server_info->info, client_key); + client_val = (CFMutableDataRef)CFDictionaryGetValue(server_info->info, client_key); CFRelease(client_key); - val = (client_val_t *)(void *)CFDataGetBytePtr(client_val); + val = (client_val_t *)(void *)CFDataGetMutableBytePtr(client_val); val->generation_pushed = server_info->generation; // return generation @@ -265,16 +266,13 @@ _libSC_info_server_acknowledged(libSC_info_server_t *server_info, xpc_connection_t c, uint64_t generation) { - CFDataRef client_key; - CFDataRef client_val; -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) - xpc_object_t ent_value; - Boolean entitled = FALSE; -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) - Boolean sync_updated = FALSE; - client_val_t *val; - -#if ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) + CFDataRef client_key; + CFMutableDataRef client_val; + xpc_object_t ent_value; + Boolean entitled = FALSE; + Boolean sync_updated = FALSE; + client_val_t *val; + ent_value = xpc_connection_copy_entitlement_value(c, kTrailingEdgeAgentEntitlement); if (ent_value != NULL) { if (xpc_get_type(ent_value) == XPC_TYPE_BOOL) { @@ -287,13 +285,12 @@ _libSC_info_server_acknowledged(libSC_info_server_t *server_info, _handle_entitlement_check_failure(xpc_connection_get_pid(c)); return FALSE; } -#endif // ((__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) || (__IPHONE_OS_VERSION_MIN_REQUIRED >= 60000)) client_key = _client_key(c); - client_val = CFDictionaryGetValue(server_info->info, client_key); + client_val = (CFMutableDataRef)CFDictionaryGetValue(server_info->info, client_key); CFRelease(client_key); - val = (client_val_t *)(void *)CFDataGetBytePtr(client_val); + val = (client_val_t *)(void *)CFDataGetMutableBytePtr(client_val); if (val->generation_acknowledged == 0) { // if first ack @@ -331,18 +328,18 @@ Boolean _libSC_info_server_close(libSC_info_server_t *server_info, xpc_connection_t c) { - CFDataRef client_key; - CFDataRef client_val; - Boolean sync_updated = FALSE; + CFDataRef client_key; + CFMutableDataRef client_val; + Boolean sync_updated = FALSE; client_key = _client_key(c); // get client info, remove ack'd info - client_val = CFDictionaryGetValue(server_info->info, client_key); + client_val = (CFMutableDataRef)CFDictionaryGetValue(server_info->info, client_key); if (client_val != NULL) { client_val_t *val; - val = (client_val_t *)(void *)CFDataGetBytePtr(client_val); + val = (client_val_t *)(void *)CFDataGetMutableBytePtr(client_val); if (val->generation_acknowledged > 0) { // if we've previously ack'd a configuration if (val->generation_acknowledged == server_info->generation) { diff --git a/nwi/network_information.c b/nwi/network_information.c index 4153c00..0db7366 100644 --- a/nwi/network_information.c +++ b/nwi/network_information.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -459,9 +459,7 @@ nwi_state_get_first_ifstate(nwi_state_t state, int af) return NULL; } - ifstate = - nwi_state_get_ifstate_with_index(state, af, 0); - + ifstate = nwi_state_get_ifstate_with_index(state, af, 0); if ((ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0) { ifstate = NULL; diff --git a/nwi/network_information_priv.c b/nwi/network_information_priv.c index af1f1ba..0edee36 100644 --- a/nwi/network_information_priv.c +++ b/nwi/network_information_priv.c @@ -35,7 +35,7 @@ __private_extern__ const sa_family_t nwi_af_list[] = {AF_INET, AF_INET6}; -static __inline__ unsigned int +static __inline__ size_t nwi_state_compute_size(unsigned int n) { return (offsetof(nwi_state, nwi_ifstates[n])); @@ -67,15 +67,16 @@ nwi_state_t nwi_state_new(nwi_state_t old_state, int elems) { nwi_state_t state = NULL; - int new_size; + uint32_t new_size; if (old_state == NULL && elems == 0) { return NULL; } /* Need to insert a last node for each of the v4/v6 list */ - new_size = (elems != 0)? - (sizeof(nwi_state) + nwi_state_compute_size((elems+1) * 2)):0; + new_size = (elems != 0) + ? (uint32_t)(sizeof(nwi_state) + nwi_state_compute_size((elems+1) * 2)) + : 0; /* Should we reallocate? */ if (old_state != NULL) { @@ -85,10 +86,6 @@ nwi_state_new(nwi_state_t old_state, int elems) } state = malloc(new_size); - if (state == NULL) { - return NULL; - } - bzero(state, new_size); state->size = new_size; @@ -366,7 +363,7 @@ nwi_ifstate_set_removed_str(nwi_state_t state, nwi_ifstate_t ifstate) static void nwi_state_merge_added(nwi_state_t state, nwi_state_t old_state, - nwi_state_t new_state) + nwi_state_t new_state) { int i; nwi_ifstate_t scan; @@ -442,7 +439,7 @@ nwi_state_diff(nwi_state_t old_state, nwi_state_t new_state) diff = nwi_state_new(NULL, total_count); - nwi_state_merge_added(diff, old_state, new_state); + nwi_state_merge_added(diff, old_state, new_state); nwi_state_merge_removed(diff, old_state); /* Diff consists of a nwi_state_t with annotated diff_str's */ diff --git a/nwi/network_information_server.c b/nwi/network_information_server.c index 00c9ff3..41bec2c 100644 --- a/nwi/network_information_server.c +++ b/nwi/network_information_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2012-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -85,7 +85,7 @@ log_xpc_object(const char *msg, xpc_object_t obj) desc = xpc_copy_description(obj); if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, "%s = %s", msg, desc); + SCLoggerLog(S_logger, LOG_DEBUG, "%s = %s", msg, desc); } free(desc); } @@ -147,7 +147,7 @@ _nwi_state_copy(xpc_connection_t connection, xpc_object_t request) proc_name = "???"; } - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%s[%d]> Network information copy: %lu"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%s[%d]> Network information copy: %llu"), connection, proc_name, xpc_connection_get_pid(connection), @@ -187,7 +187,7 @@ _nwi_state_acknowledge(xpc_connection_t connection, xpc_object_t request) generation = xpc_dictionary_get_uint64(request, NWI_GENERATION); if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%d> Network information ack: %lu"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> Network information ack: %llu"), connection, xpc_connection_get_pid(connection), generation); @@ -230,7 +230,7 @@ process_request(xpc_connection_t connection, xpc_object_t request) break; default : SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p> unknown request : %d"), + CFSTR("<%p> unknown request : %lld"), connection, op); @@ -245,7 +245,7 @@ static void process_new_connection(xpc_connection_t c) { if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%d> Network information session: open"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> Network information session: open"), c, xpc_connection_get_pid(c)); } @@ -270,7 +270,7 @@ process_new_connection(xpc_connection_t c) Boolean changed; if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("<%p:%d> Network information session: close"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("<%p:%d> Network information session: close"), c, xpc_connection_get_pid(c)); } @@ -293,7 +293,7 @@ process_new_connection(xpc_connection_t c) } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> Connection error: %d : %s"), + CFSTR("<%p:%d> Connection error: %p : %s"), c, xpc_connection_get_pid(c), xobj, @@ -302,7 +302,7 @@ process_new_connection(xpc_connection_t c) } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("<%p:%d> unknown event type : %x"), + CFSTR("<%p:%d> unknown event type : %p"), c, xpc_connection_get_pid(c), type); @@ -370,14 +370,14 @@ load_NetworkInformation(CFBundleRef bundle, SCLoggerLog(S_logger, LOG_ERR, CFSTR("Network information server: %s"), desc); } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("Network information server: Connection error: %d : %s"), + CFSTR("Network information server: Connection error: %p : %s"), event, desc); } } else { SCLoggerLog(S_logger, LOG_ERR, - CFSTR("Network information server: unknown event type : %x"), + CFSTR("Network information server: unknown event type : %p"), type); } @@ -441,7 +441,7 @@ _nwi_state_store(nwi_state *state) new_generation = state->generation_count; if (*S_debug) { - SCLoggerLog(S_logger, LOG_INFO, CFSTR("Network information updated: %llu"), + SCLoggerLog(S_logger, LOG_DEBUG, CFSTR("Network information updated: %llu"), new_generation); } diff --git a/scselect.tproj/scselect.c b/scselect.tproj/scselect.c index a5319b7..c04de5a 100644 --- a/scselect.tproj/scselect.c +++ b/scselect.tproj/scselect.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2009, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2009, 2011, 2012, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -156,7 +156,7 @@ main(int argc, char **argv) SCPrint(TRUE, stderr, CFSTR("AuthorizationCreate() failed: status = %d\n"), - status); + (int)status); exit (1); } diff --git a/scutil.tproj/commands.c b/scutil.tproj/commands.c index 5b93ff6..d29719e 100644 --- a/scutil.tproj/commands.c +++ b/scutil.tproj/commands.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -195,6 +195,10 @@ const cmdInfo commands_net[] = { " enable protocol [ ]\n" " enable service [ | ]" }, + { "migrate", 2, 5, do_net_migrate, 11, 0, + " migrate perform []\n" + " migrate validate "}, + { "remove", 1, 2, do_net_remove, 6, 0, " remove protocol [ ]\n" " remove service [ | ]\n" @@ -209,8 +213,8 @@ const cmdInfo commands_net[] = { { "set", 2, 101, do_net_set, 8, 0, " set interface context-sensitive-arguments (or ? for help)\n" " set protocol context-sensitive-arguments (or ? for help)\n" - " set service [ name ] [ order new-order ] [ rank ("" | First | Last | Never) [temp] ]\n" - " set set [ name setName ] | [ current ]" }, + " set service [ name ] [ order new-order ] [ rank ("" | First | Last | Never | Scoped ) [temp] ] [ id ]\n" + " set set [ name setName ] | [ current ] [ id ]" }, { "show", 1, 2, do_net_show, 9, 0, " show interfaces\n" diff --git a/scutil.tproj/dictionary.c b/scutil.tproj/dictionary.c index 790aab4..8361c26 100644 --- a/scutil.tproj/dictionary.c +++ b/scutil.tproj/dictionary.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009-2011, 2013 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -103,7 +103,9 @@ do_dictSetKey(int argc, char **argv) /* if array requested */ doArray = TRUE; } else if (strcmp(argv[0], "-") == 0) { - /* if string values requested */ + /* if string values follow */ + argv++; argc--; + break; } else if (strcmp(argv[0], "?") == 0) { /* if boolean values requested */ doBoolean = TRUE; @@ -159,7 +161,7 @@ do_dictSetKey(int argc, char **argv) int j; int n; - n = strlen(argv[0]); + n = (int)strlen(argv[0]); if ((n % 2) == 1) { SCPrint(TRUE, stdout, CFSTR("d.add: not enough bytes.\n")); if (doArray) CFRelease(array); diff --git a/scutil.tproj/nc.c b/scutil.tproj/nc.c index 76ba1de..668895a 100644 --- a/scutil.tproj/nc.c +++ b/scutil.tproj/nc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013 Apple Inc. All rights reserved. + * Copyright (c) 2010-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -43,10 +43,6 @@ #include -#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR -#include -#endif // TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR - #include CFStringRef username = NULL; @@ -769,15 +765,14 @@ nc_print_VPN_service(SCNetworkServiceRef service) static void nc_list(int argc, char **argv) { - int count; - int i; + CFIndex count; + CFIndex i; CFArrayRef services = NULL; SCPrint(TRUE, stdout, CFSTR("Available network connection services in the current set (*=enabled):\n")); services = SCNetworkConnectionCopyAvailableServices(NULL); if (services != NULL) { count = CFArrayGetCount(services); - for (i = 0; i < count; i++) { SCNetworkServiceRef service; @@ -981,95 +976,6 @@ done: exit(exit_code); } - -#if TARGET_OS_EMBEDDED -static void -nc_print_VPN_app_info(CFStringRef appInfo, CFDictionaryRef appInfoDict) -{ - CFStringRef appName = NULL; - Boolean isEnabled = FALSE; - CFStringRef paddedAppInfo = NULL; - CFStringRef paddedAppName = NULL; - - if (appInfo == NULL) { - return; - } - - isEnabled = VPNConfigurationIsVPNTypeEnabled(appInfo); - - CFDictionaryGetValueIfPresent(appInfoDict, CFSTR("CFBundleDisplayName"), (const void **)&appName); - paddedAppName = copy_padded_string((appName == NULL) ? CFSTR("") : appName, 12, NULL, NULL); - paddedAppInfo = copy_padded_string(appInfo, 30, NULL, NULL); - - SCPrint(TRUE, stdout, CFSTR("%@ %@ [%@]\n"), - isEnabled ? CFSTR("(Enabled) ") : CFSTR("(Disabled)"), - paddedAppName, - appInfo); - - my_CFRelease(&paddedAppName); - my_CFRelease(&paddedAppInfo); -} -#endif - -/* ----------------------------------------------------------------------------- - ----------------------------------------------------------------------------- */ -#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR -static void -nc_listvpn(int argc, char **argv) -{ - - CFDictionaryRef appDict = NULL; - CFArrayRef appinfo = NULL; - int i, j, count, subtypecount; - const void * * keys = NULL; - CFMutableDictionaryRef optionsDict = NULL; - const void * * values = NULL; - CFStringRef vpntype = NULL; - - optionsDict = CFDictionaryCreateMutable(NULL, 0, - &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionarySetValue(optionsDict, kLookupApplicationTypeKey, kApplicationTypeUser); - CFDictionarySetValue(optionsDict, kLookupAttributeKey, CFSTR("UIVPNPlugin")); - - appDict = MobileInstallationLookup(optionsDict); - if (!isA_CFDictionary(appDict)) - goto done; - - count = CFDictionaryGetCount(appDict); - if (count > 0) { - keys = (const void * *)malloc(sizeof(CFTypeRef) * count); - values = (const void * *)malloc(sizeof(CFTypeRef) * count); - - CFDictionaryGetKeysAndValues(appDict, keys, values); - for (i=0; i [background] [port]\n")); SCPrint(TRUE, stderr, CFSTR("\t\tTrigger VPN on-demand with specified hostname, and optional port and background flag\n")); SCPrint(TRUE, stderr, CFSTR("\n")); -#if TARGET_OS_EMBEDDED - SCPrint(TRUE, stderr, CFSTR("\tlistvpn\n")); - SCPrint(TRUE, stderr, CFSTR("\t\tDisplay the installed VPN applications\n")); - SCPrint(TRUE, stderr, CFSTR("\n")); -#endif #if !TARGET_OS_IPHONE SCPrint(TRUE, stderr, CFSTR("\tenablevpn [path]\n")); SCPrint(TRUE, stderr, CFSTR("\t\tEnables the given VPN application type. Takes either a service or VPN type. Pass a path to set ApplicationURL\n")); @@ -1311,9 +1212,6 @@ static const struct { { "enablevpn", nc_enablevpn }, { "help", nc_help }, { "list", nc_list }, -#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR - { "listvpn", nc_listvpn }, -#endif // TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR { "ondemand", nc_ondemand }, { "resume", nc_resume }, { "select", nc_select }, diff --git a/scutil.tproj/net.c b/scutil.tproj/net.c index cb1ebfb..db88330 100644 --- a/scutil.tproj/net.c +++ b/scutil.tproj/net.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2007, 2009-2011 Apple Inc. All rights reserved. + * Copyright (c) 2004-2007, 2009-2011, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -756,6 +756,124 @@ do_net_enable(int argc, char **argv) } +static void +do_net_migrate_perform(int argc, char **argv) +{ + char * sourceConfiguration = NULL; + char * targetConfiguration = NULL; + char * currentConfiguration = NULL; + CFStringRef str = NULL; + CFURLRef sourceConfigurationURL = NULL; + CFURLRef targetConfigurationURL = NULL; + CFURLRef currentConfigurationURL = NULL; + CFArrayRef migrationFiles = NULL; + + sourceConfiguration = argv[0]; + targetConfiguration = argv[1]; + + if (argc == 3) { + currentConfiguration = argv[2]; + } + + SCPrint(_sc_debug, stdout, CFSTR("sourceConfiguration: %s\ntargetConfiguration: %s\ncurrentConfiguration: %s\n"), + sourceConfiguration, targetConfiguration, (currentConfiguration != NULL) ? currentConfiguration : "" ); + + str = CFStringCreateWithCString(NULL, sourceConfiguration, kCFStringEncodingUTF8); + sourceConfigurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); + CFRelease(str); + + str = CFStringCreateWithCString(NULL, targetConfiguration, kCFStringEncodingUTF8); + targetConfigurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); + CFRelease(str); + + if (currentConfiguration != NULL) { + str = CFStringCreateWithCString(NULL, currentConfiguration, kCFStringEncodingUTF8); + currentConfigurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); + CFRelease(str); + } + + migrationFiles = _SCNetworkConfigurationPerformMigration(sourceConfigurationURL, currentConfigurationURL, targetConfigurationURL, NULL); + + if (migrationFiles != NULL) { + SCPrint(TRUE, stdout, CFSTR("Migration Successful: %@ \n"), migrationFiles); + } + else { + SCPrint(TRUE, stdout, CFSTR("Migration Unsuccessful \n")); + } + + if (sourceConfigurationURL != NULL) { + CFRelease(sourceConfigurationURL); + } + if (targetConfigurationURL != NULL) { + CFRelease(targetConfigurationURL); + } + if (currentConfigurationURL != NULL) { + CFRelease(currentConfigurationURL); + } + if (migrationFiles != NULL) { + CFRelease(migrationFiles); + } +} + + +static void +do_net_migrate_validate(int argc, char **argv) +{ + char *configuration = NULL; + CFURLRef configurationURL = NULL; + char *expectedConfiguration = NULL; + CFURLRef expectedConfigurationURL = NULL; + Boolean isValid = FALSE; + CFStringRef str = NULL; + + configuration = argv[0]; + str = CFStringCreateWithCString(NULL, configuration, kCFStringEncodingUTF8); + configurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); + CFRelease(str); + + expectedConfiguration = argv[1]; + str = CFStringCreateWithCString(NULL, expectedConfiguration, kCFStringEncodingUTF8); + expectedConfigurationURL = CFURLCreateWithFileSystemPath(NULL, str, kCFURLPOSIXPathStyle, TRUE); + CFRelease(str); + + isValid = _SCNetworkMigrationAreConfigurationsIdentical(configurationURL, expectedConfigurationURL); + + SCPrint(TRUE, stdout, CFSTR("Configuration at location %s %s\n"), configuration, isValid ? "is valid" : "is NOT valid"); + + if (configurationURL != NULL) { + CFRelease(configurationURL); + } + if (expectedConfigurationURL != NULL) { + CFRelease(expectedConfigurationURL); + } +} + + +__private_extern__ +void +do_net_migrate(int argc, char **argv) +{ + char *key; + SCPrint(TRUE, stdout, CFSTR("do_net_migrate called, %d\n"), argc); + + key = argv[0]; + argv++; + argc--; + + if (strncmp(key, "perform", strlen(key)) == 0) { + do_net_migrate_perform(argc, argv); + } + else if (strncmp(key, "validate", strlen(key)) == 0) { + do_net_migrate_validate(argc, argv); + } + else { + SCPrint(TRUE, stderr, CFSTR("migrate what?\n")); + return; + } + +} + + __private_extern__ void do_net_remove(int argc, char **argv) diff --git a/scutil.tproj/net.h b/scutil.tproj/net.h index bd57435..d838285 100644 --- a/scutil.tproj/net.h +++ b/scutil.tproj/net.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004, 2006, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2006, 2011, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -120,6 +120,7 @@ void do_net_close (int argc, char **argv); void do_net_create (int argc, char **argv); void do_net_disable (int argc, char **argv); void do_net_enable (int argc, char **argv); +void do_net_migrate (int argc, char **argv); void do_net_remove (int argc, char **argv); void do_net_select (int argc, char **argv); void do_net_set (int argc, char **argv); diff --git a/scutil.tproj/net_interface.c b/scutil.tproj/net_interface.c index 61110c0..69d4461 100644 --- a/scutil.tproj/net_interface.c +++ b/scutil.tproj/net_interface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2004-2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -911,12 +911,12 @@ show_interfaces(int argc, char **argv) } if (childIndex == 0) { - SCPrint(TRUE, stdout, CFSTR("%c%2d: %@\n"), + SCPrint(TRUE, stdout, CFSTR("%c%2ld: %@\n"), isSelected, i + 1, interfaceName); } else { - SCPrint(TRUE, stdout, CFSTR("%c%2d.%d: %@\n"), + SCPrint(TRUE, stdout, CFSTR("%c%2ld.%ld: %@\n"), isSelected, i + 1, childIndex, @@ -925,27 +925,50 @@ show_interfaces(int argc, char **argv) if (_sc_debug) { CFMutableStringRef desc; - CFStringRef str; + CFMutableDictionaryRef formatOptions; - str = CFCopyDescription(interface); - desc = CFStringCreateMutableCopy(NULL, 0, str); - CFRelease(str); + desc = CFStringCreateMutable(NULL, 0); + formatOptions = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFDictionarySetValue(formatOptions, CFSTR("PREFIX1"), CFSTR("")); + CFDictionarySetValue(formatOptions, CFSTR("PREFIX2"), CFSTR("$$")); + CFStringAppendFormat(desc, formatOptions, CFSTR("%@"), interface); + CFRelease(formatOptions); + + // cleanup SCNetworkInterface details CFStringFindAndReplace(desc, - CFSTR(" {"), - CFSTR("\n {\n "), + CFSTR("]> {"), + CFSTR("]>\n {\n "), CFRangeMake(0, CFStringGetLength(desc)), 0); CFStringFindAndReplace(desc, CFSTR(", "), - CFSTR(",\n "), + CFSTR("\n "), CFRangeMake(0, CFStringGetLength(desc)), 0); CFStringFindAndReplace(desc, CFSTR("}"), CFSTR("\n }"), + CFRangeMake(CFStringGetLength(desc) - 1, 1), + kCFCompareBackwards|kCFCompareAnchored); + + // additional cleanup for Bond, Bridge, VLAN options + CFStringFindAndReplace(desc, + CFSTR("> {\n"), + CFSTR(">\n {\n"), + CFRangeMake(0, CFStringGetLength(desc)), + 0); + CFStringFindAndReplace(desc, + CFSTR("\n$$"), + CFSTR("\n "), CFRangeMake(0, CFStringGetLength(desc)), 0); + CFStringFindAndReplace(desc, + CFSTR("$$"), + CFSTR(""), + CFRangeMake(0, CFStringGetLength(desc)), + 0); + SCPrint(TRUE, stdout, CFSTR("\n %@\n\n"), desc); CFRelease(desc); } @@ -986,6 +1009,8 @@ __doRank(CFStringRef key, const char *description, void *info, int argc, char ** rank = kSCNetworkServicePrimaryRankLast; } else if ((strcasecmp(argv[0], "Never") == 0)) { rank = kSCNetworkServicePrimaryRankNever; + } else if ((strcasecmp(argv[0], "Scoped") == 0)) { + rank = kSCNetworkServicePrimaryRankScoped; } else { SCPrint(TRUE, stdout, CFSTR("invalid rank\n")); return -1; @@ -1698,6 +1723,9 @@ static selections modemDialSelections[] = { }; static options modemOptions[] = { + { "ConnectionPersonality" , "NULL" , isString , &kSCPropNetModemConnectionPersonality , NULL, NULL }, + { "DeviceModel" , "model" , isString , &kSCPropNetModemDeviceModel , NULL, NULL }, + { "DeviceVendor" , "vendor", isString , &kSCPropNetModemDeviceVendor , NULL, NULL }, { "ConnectionScript" , "script", isString , &kSCPropNetModemConnectionScript , NULL, NULL }, { "DialMode" , "mode" , isChooseOne, &kSCPropNetModemDialMode , NULL, (void *)modemDialSelections }, { "CallWaiting" , NULL , isBoolean , &kSCPropNetModemHoldEnabled , NULL, NULL }, @@ -1712,7 +1740,12 @@ static options modemOptions[] = { { "?" , NULL , isHelp , NULL , NULL, "\nModem configuration commands\n\n" + " set interface [DeviceVendor vendor]\n" + " set interface [DeviceModel model]\n" + " set interface [ConnectionPersonality personality]\n" + "\n" " set interface [ConnectionScript connection-script]\n" + "\n" " set interface [CallWaiting {enable|disable}]\n" " set interface [CallWaitingAlert {enable|disable}]\n" " set interface [CallWaitingDisconnectOnAnswer {enable|disable}]\n" @@ -2012,6 +2045,7 @@ static options pppOptions[] = { // --- Comm: --- { "CommRemoteAddress" , "phone#" , isString , &kSCPropNetPPPCommRemoteAddress , NULL , NULL }, + { "Number" , "phone#" , isString , &kSCPropNetPPPCommRemoteAddress , NULL , NULL }, { "CommAlternateRemoteAddress", "phone#" , isString , &kSCPropNetPPPCommAlternateRemoteAddress, NULL , NULL }, { "CommConnectDelay" , "time" , isNumber , &kSCPropNetPPPCommConnectDelay , NULL , NULL }, { "CommDisplayTerminalWindow" , NULL , isBoolean , &kSCPropNetPPPCommDisplayTerminalWindow , NULL , NULL }, diff --git a/scutil.tproj/net_protocol.c b/scutil.tproj/net_protocol.c index 46869de..7e8f004 100644 --- a/scutil.tproj/net_protocol.c +++ b/scutil.tproj/net_protocol.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2009, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2004-2009, 2011, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -1590,11 +1590,11 @@ show_protocols(int argc, char **argv) protocol = CFArrayGetValueAtIndex(protocols, i); protocolType = SCNetworkProtocolGetProtocolType(protocol); - SCPrint(TRUE, stdout, CFSTR("%c%2d: %@%*s :"), + SCPrint(TRUE, stdout, CFSTR("%c%2ld: %@%*s :"), ((net_protocol != NULL) && CFEqual(protocol, net_protocol)) ? '>' : ' ', i + 1, protocolType, - sizeof("AppleTalk") - CFStringGetLength(protocolType) - 1, + (int)(sizeof("AppleTalk") - CFStringGetLength(protocolType) - 1), ""); if (SCNetworkProtocolGetEnabled(protocol)) { diff --git a/scutil.tproj/net_service.c b/scutil.tproj/net_service.c index 5afdd08..3d7d9dc 100644 --- a/scutil.tproj/net_service.c +++ b/scutil.tproj/net_service.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2010 Apple Inc. All rights reserved. + * Copyright (c) 2004-2010, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -685,6 +685,8 @@ set_service(int argc, char **argv) rank = kSCNetworkServicePrimaryRankFirst; } else if ((service != net_service) && (strcasecmp(argv[0], "Last") == 0)) { rank = kSCNetworkServicePrimaryRankLast; + } else if ((service != net_service) && (strcasecmp(argv[0], "Scoped") == 0)) { + rank = kSCNetworkServicePrimaryRankScoped; } else { SCPrint(TRUE, stdout, CFSTR("rank not valid\n")); return; @@ -717,6 +719,26 @@ set_service(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); return; } + } else if (strcmp(command, "id") == 0) { + CFStringRef serviceID; + + if ((argc < 1) || (strlen(argv[0]) == 0)) { + SCPrint(TRUE, stdout, CFSTR("set id not specified\n")); + return; + } + + serviceID = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); + argv++; + argc--; + + ok = _SCNetworkServiceSetServiceID(net_service, serviceID); + CFRelease(serviceID); + if (!ok) { + SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); + return; + } + + _prefs_changed = TRUE; } else { SCPrint(TRUE, stdout, CFSTR("set what?\n")); } @@ -783,7 +805,7 @@ __show_service_protocols(SCNetworkServiceRef service, const char *prefix, Boolea CFSTR("%s%@%*s : %@\n"), prefix, protocolType, - sizeof("Interface") - CFStringGetLength(protocolType) - 1, + (int)(sizeof("Interface") - CFStringGetLength(protocolType) - 1), "", description); CFRelease(description); @@ -840,6 +862,9 @@ show_service(int argc, char **argv) case kSCNetworkServicePrimaryRankNever : SCPrint(TRUE, stdout, CFSTR("primary rank = NEVER\n")); break; + case kSCNetworkServicePrimaryRankScoped : + SCPrint(TRUE, stdout, CFSTR("primary rank = SCOPED\n")); + break; default : SCPrint(TRUE, stdout, CFSTR("primary rank = %d\n"), serviceRank); break; @@ -965,11 +990,11 @@ show_services(int argc, char **argv) serviceName = SCNetworkServiceGetName(service); if (serviceName == NULL) serviceName = CFSTR(""); - SCPrint(TRUE, stdout, CFSTR("%c%2d: %@%-*s (%@)%s\n"), + SCPrint(TRUE, stdout, CFSTR("%c%2ld: %@%-*s (%@)%s\n"), ((net_service != NULL) && CFEqual(service, net_service)) ? '>' : ' ', i + 1, serviceName, - 30 - CFStringGetLength(serviceName), + (int)(30 - CFStringGetLength(serviceName)), " ", serviceID, SCNetworkServiceGetEnabled(service) ? "" : " *DISABLED*"); diff --git a/scutil.tproj/net_set.c b/scutil.tproj/net_set.c index 3149566..fb4f0e8 100644 --- a/scutil.tproj/net_set.c +++ b/scutil.tproj/net_set.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2005, 2009-2011, 2013 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2005, 2009-2011, 2013, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -491,6 +491,46 @@ set_set(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); return; } + + _prefs_changed = TRUE; + } else if (strcmp(command, "id") == 0) { + char *newID; + CFStringRef setID; + + if ((argc < 1) || (strlen(argv[0]) == 0)) { + SCPrint(TRUE, stdout, CFSTR("set id not specified\n")); + return; + } + + newID = argv[0]; + setID = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); + argv++; + argc--; + + ok = _SCNetworkSetSetSetID(net_set, setID); + CFRelease(setID); + if (!ok) { + SCPrint(TRUE, stdout, CFSTR("%s\n"), SCErrorString(SCError())); + return; + } + + _prefs_changed = TRUE; + + if (sets != NULL) { + /* + * since the (displayed) ordering may have changed, refresh sets + */ + CFRelease(net_set); + net_set = NULL; + + CFRelease(sets); + sets = NULL; + + net_set = _find_set(newID); + if (net_set != NULL) { + CFRetain(net_set); + } + } } else { SCPrint(TRUE, stdout, CFSTR("set what?\n")); } @@ -574,18 +614,18 @@ show_set(int argc, char **argv) serviceID); } if (orderIndex != kCFNotFound) { - SCPrint(TRUE, stdout, CFSTR("%c%2d: %@%-*s (%@)\n"), + SCPrint(TRUE, stdout, CFSTR("%c%2ld: %@%-*s (%@)\n"), ((net_service != NULL) && CFEqual(service, net_service)) ? '>' : ' ', orderIndex + 1, serviceName, - 30 - CFStringGetLength(serviceName), + (int)(30 - CFStringGetLength(serviceName)), " ", serviceID); } else { SCPrint(TRUE, stdout, CFSTR("%c : %@%-*s (%@)\n"), ((net_service != NULL) && CFEqual(service, net_service)) ? '>' : ' ', serviceName, - 30 - CFStringGetLength(serviceName), + (int)(30 - CFStringGetLength(serviceName)), " ", serviceID); } @@ -605,7 +645,7 @@ show_set(int argc, char **argv) n = CFArrayGetCount(interfaces); for (i = 0; i < n; i++) { interface = CFArrayGetValueAtIndex(interfaces, i); - SCPrint(TRUE, stdout, CFSTR(" %2d: %@ \n"), + SCPrint(TRUE, stdout, CFSTR(" %2ld: %@ \n"), i + 1, SCNetworkInterfaceGetLocalizedDisplayName(interface)); } @@ -654,12 +694,12 @@ show_sets(int argc, char **argv) setName = SCNetworkSetGetName(set); if (setName == NULL) setName = CFSTR(""); - SCPrint(TRUE, stdout, CFSTR(" %c%c%2d: %@%-*s (%@)\n"), + SCPrint(TRUE, stdout, CFSTR(" %c%c%2ld: %@%-*s (%@)\n"), ((current != NULL) && CFEqual(set, current)) ? '*' : ' ', ((net_set != NULL) && CFEqual(set, net_set)) ? '>' : ' ', i + 1, setName, - 30 - CFStringGetLength(setName), + (int)(30 - CFStringGetLength(setName)), " ", setID); } diff --git a/scutil.tproj/notifications.c b/scutil.tproj/notifications.c index 19507fc..0ccd02c 100644 --- a/scutil.tproj/notifications.c +++ b/scutil.tproj/notifications.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2008-2012 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -373,7 +373,7 @@ do_notify_file(int argc, char **argv) bufPtr = &buf.data[0]; needed = sizeof(buf.gotID); while (needed > 0) { - int got; + ssize_t got; got = read(fd, bufPtr, needed); if (got == -1) { @@ -388,7 +388,7 @@ do_notify_file(int argc, char **argv) break; } - SCPrint(TRUE, stdout, CFSTR("Received %d bytes.\n"), got); + SCPrint(TRUE, stdout, CFSTR("Received %ld bytes.\n"), got); bufPtr += got; needed -= got; } diff --git a/scutil.tproj/prefs.c b/scutil.tproj/prefs.c index d8761fe..ec8677f 100644 --- a/scutil.tproj/prefs.c +++ b/scutil.tproj/prefs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2008, 2011-2013 Apple Inc. All rights reserved. + * Copyright (c) 2003-2008, 2011-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -119,7 +119,7 @@ _prefs_AuthorizationCreate() SCPrint(TRUE, stdout, CFSTR("AuthorizationCreate() failed: status = %d\n"), - status); + (int)status); return NULL; } } @@ -325,8 +325,8 @@ get_ComputerName(int argc, char **argv) static void set_ComputerName(int argc, char **argv) { - CFStringRef hostname; - Boolean ok; + CFStringRef hostname = NULL; + Boolean ok; ok = _prefs_open(CFSTR("scutil --set ComputerName"), NULL); if (!ok) { @@ -344,7 +344,7 @@ set_ComputerName(int argc, char **argv) old_hostname = SCDynamicStoreCopyComputerName(NULL, &old_encoding); hostname = _copyStringFromSTDIN(CFSTR("ComputerName"), old_hostname); if (old_hostname) CFRelease(old_hostname); - } else { + } else if (strlen(argv[0]) > 0) { hostname = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); } @@ -424,7 +424,7 @@ set_HostName(int argc, char **argv) if (argc == 0) { hostname = _copyStringFromSTDIN(CFSTR("HostName"), SCPreferencesGetHostName(prefs)); - } else { + } else if (strlen(argv[0]) > 0) { hostname = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); } @@ -480,7 +480,7 @@ get_LocalHostName(int argc, char **argv) static void set_LocalHostName(int argc, char **argv) { - CFStringRef hostname = NULL; + CFStringRef hostname = NULL; Boolean ok; ok = _prefs_open(CFSTR("scutil --set LocalHostName"), NULL); @@ -498,7 +498,7 @@ set_LocalHostName(int argc, char **argv) old_hostname = SCDynamicStoreCopyLocalHostName(NULL); hostname = _copyStringFromSTDIN(CFSTR("LocalHostName"), old_hostname); if (old_hostname) CFRelease(old_hostname); - } else { + } else if (strlen(argv[0]) > 0) { hostname = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingUTF8); } @@ -582,13 +582,14 @@ do_getPref(char *pref, int argc, char **argv) if (prefs_val != NULL) { SCPrint(TRUE, stdout, CFSTR("%@\n"), prefs_val); - } else { _prefs_close(); - exit(1); + exit(0); } } + + // if path or key not found _prefs_close(); - exit(0); + exit(1); } diff --git a/scutil.tproj/scutil.c b/scutil.tproj/scutil.c index c4bff2a..a476ff9 100644 --- a/scutil.tproj/scutil.c +++ b/scutil.tproj/scutil.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -70,7 +70,7 @@ #include "tests.h" -#define LINE_LENGTH 256 +#define LINE_LENGTH 2048 __private_extern__ AuthorizationRef authorization = NULL; @@ -96,6 +96,7 @@ static const struct option longopts[] = { // { "watch-reachability", no_argument, NULL, 'W' }, { "dns", no_argument, NULL, 0 }, { "get", required_argument, NULL, 0 }, + { "error", required_argument, NULL, 0 }, { "help", no_argument, NULL, '?' }, { "nc", required_argument, NULL, 0 }, { "net", no_argument, NULL, 0 }, @@ -120,9 +121,9 @@ _copyStringFromSTDIN(CFStringRef prompt, CFStringRef defaultValue) char buf[1024]; int i; Boolean is_user_prompt = (prompt != NULL && isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)); - size_t len; + int len; char *modbuf; - size_t modlen; + int modlen; CFStringRef utf8; /* Print out a prompt to user that entry is desired */ @@ -140,7 +141,7 @@ _copyStringFromSTDIN(CFStringRef prompt, CFStringRef defaultValue) } /* Prepare for trim */ - len = strlen(buf); + len = (int)strlen(buf); modbuf = buf; modlen = len; @@ -162,7 +163,7 @@ _copyStringFromSTDIN(CFStringRef prompt, CFStringRef defaultValue) modlen--; } - /* Trim spaces from back */ + /* Trim spaces from back */ for (i = modlen - 1; i >= 0; i--) { if (isspace(buf[i])) { buf[i] = '\0'; @@ -195,7 +196,7 @@ getLine(char *buf, int len, InputRef src) return NULL; } - n = strlen(buf); + n = (int)strlen(buf); if (buf[n-1] == '\n') { /* the entire line fit in the buffer, remove the newline */ buf[n-1] = '\0'; @@ -356,12 +357,22 @@ usage(const char *command) SCPrint(TRUE, stderr, CFSTR(" or: %s --nc\n"), command); SCPrint(TRUE, stderr, CFSTR("\tshow VPN network configuration information. Use --nc help for full command list\n")); + if (_sc_debug) { + SCPrint(TRUE, stderr, CFSTR("\n")); + SCPrint(TRUE, stderr, CFSTR(" or: %s --log IPMonitor [off|on]\n"), command); + SCPrint(TRUE, stderr, CFSTR("\tmanage logging.\n")); + } + if (getenv("ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS")) { SCPrint(TRUE, stderr, CFSTR("\n")); SCPrint(TRUE, stderr, CFSTR(" or: %s --net\n"), command); SCPrint(TRUE, stderr, CFSTR("\tmanage network configuration.\n")); } + SCPrint(TRUE, stderr, CFSTR("\n")); + SCPrint(TRUE, stderr, CFSTR(" or: %s --error err#\n"), command); + SCPrint(TRUE, stderr, CFSTR("\tdisplay a descriptive message for the given error code\n")); + exit (EX_USAGE); } @@ -387,6 +398,7 @@ main(int argc, char * const argv[]) Boolean doProxy = FALSE; Boolean doReach = FALSE; Boolean doSnap = FALSE; + char *error = NULL; char *get = NULL; char *log = NULL; extern int optind; @@ -438,6 +450,9 @@ main(int argc, char * const argv[]) if (strcmp(longopts[opti].name, "dns") == 0) { doDNS = TRUE; xStore++; + } else if (strcmp(longopts[opti].name, "error") == 0) { + error = optarg; + xStore++; } else if (strcmp(longopts[opti].name, "get") == 0) { get = optarg; xStore++; @@ -509,12 +524,20 @@ main(int argc, char * const argv[]) /* are we looking up the DNS configuration */ if (doDNS) { - do_showDNSConfiguration(argc, (char **)argv); + if (watch) { + do_watchDNSConfiguration(argc, (char **)argv); + } else { + do_showDNSConfiguration(argc, (char **)argv); + } /* NOT REACHED */ } if (doNWI) { - do_nwi(argc, (char**)argv); + if (watch) { + do_watchNWI(argc, (char**)argv); + } else { + do_showNWI(argc, (char**)argv); + } /* NOT REACHED */ } @@ -532,6 +555,17 @@ main(int argc, char * const argv[]) exit(0); } + /* are we translating error #'s to descriptive text */ + if (error != NULL) { + int sc_status = atoi(error); + + SCPrint(TRUE, stdout, CFSTR("Error: 0x%08x %d %s\n"), + sc_status, + sc_status, + SCErrorString(sc_status)); + exit(0); + } + /* are we looking up a preference value */ if (get) { if (argc != 2) { @@ -572,6 +606,7 @@ main(int argc, char * const argv[]) do_log(log, argc, (char * *)argv); /* NOT REACHED */ } + /* network connection commands */ if (nc_cmd) { if (find_nc_cmd(nc_cmd) < 0) { diff --git a/scutil.tproj/tests.c b/scutil.tproj/tests.c index 9b75f7f..20c2b00 100644 --- a/scutil.tproj/tests.c +++ b/scutil.tproj/tests.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2007-2013 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -53,7 +54,9 @@ #include "SCNetworkReachabilityInternal.h" #include -static Boolean resolver_bypass; + +static Boolean resolver_bypass; + static CF_RETURNS_RETAINED CFMutableDictionaryRef _setupReachabilityOptions(int argc, char **argv, const char *interface) @@ -107,6 +110,13 @@ _setupReachabilityOptions(int argc, char **argv, const char *interface) continue; } + if (strcasecmp(argv[i], "ptr") == 0) { + CFDictionarySetValue(options, + kSCNetworkReachabilityOptionPTRAddress, + kCFBooleanTrue); + continue; + } + if (strlen(argv[i]) == 0) { continue; } @@ -141,11 +151,13 @@ _setupReachabilityOptions(int argc, char **argv, const char *interface) static SCNetworkReachabilityRef _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) { - char *ip_address = argv[0]; + const char *ip_address = argv[0]; + char *ip_addressN = NULL; const char *interface; CFMutableDictionaryRef options = NULL; - char *remote_address = NULL; - struct sockaddr_in r_sin; + const char *remote_address = NULL; + char *remote_addressN= NULL; + const char *remote_interface; struct sockaddr_in sin; struct sockaddr_in6 sin6; SCNetworkReachabilityRef target = NULL; @@ -158,24 +170,38 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; - interface = strchr(argv[0], '%'); + interface = strchr(ip_address, '%'); if (interface != NULL) { - ip_address = strdup(argv[0]); - ip_address[interface - argv[0]] = '\0'; + ip_addressN = strdup(ip_address); + ip_addressN[interface - ip_address] = '\0'; + ip_address = ip_addressN; interface++; } + if ((argc > 1) && (strlen(argv[1]) > 0)) { + remote_address = argv[1]; + + remote_interface = strchr(remote_address, '%'); + if (remote_interface != NULL) { + remote_addressN = strdup(remote_address); + remote_addressN[remote_interface - remote_address] = '\0'; + remote_address = remote_addressN; + remote_interface++; + } + } + if (inet_aton(ip_address, &sin.sin_addr) == 1) { + struct sockaddr_in r_sin; + if (argc > 1) { bzero(&r_sin, sizeof(r_sin)); r_sin.sin_len = sizeof(r_sin); r_sin.sin_family = AF_INET; - remote_address = argv[1]; } if ((argc == 1) - || ((argc > 1) && (strlen(argv[1]) == 0)) - || inet_aton(remote_address, &r_sin.sin_addr) == 0) { + || (remote_address == NULL) + || (inet_aton(remote_address, &r_sin.sin_addr) == 0)) { if (argc > 2) { options = _setupReachabilityOptions(argc - 2, argv + 2, interface); } @@ -205,27 +231,16 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) } } } else { - const char *interface2; - - interface2 = strchr(argv[1], '%'); - if (interface2 != NULL) { - remote_address = strdup(argv[1]); - remote_address[interface2 - argv[1]] = '\0'; - interface2++; - - if ((interface != NULL) && (strcmp(interface, interface2) != 0)) { + if (remote_interface != NULL) { + if ((interface != NULL) && (strcmp(interface, remote_interface) != 0)) { SCPrint(TRUE, stderr, CFSTR("Interface mismatch \"%s\" != \"%s\"\n"), interface, - interface2); + remote_interface); exit(1); } - interface = interface2; - } - - if (remote_address != argv[1]) { - free(remote_address); + interface = remote_interface; } options = _setupReachabilityOptions(argc - 2, argv + 2, interface); @@ -260,22 +275,22 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) } } } - } else if (inet_pton(AF_INET6, argv[0], &sin6.sin6_addr) == 1) { + } else if (inet_pton(AF_INET6, ip_address, &sin6.sin6_addr) == 1) { struct sockaddr_in6 r_sin6; if (interface != NULL) { sin6.sin6_scope_id = if_nametoindex(interface); } - if (argc >1) { + if (argc > 1) { bzero(&r_sin6, sizeof(r_sin6)); r_sin6.sin6_len = sizeof(r_sin6); r_sin6.sin6_family = AF_INET6; } if ((argc == 1) - || ((argc > 1) && (strlen(argv[1]) == 0)) - || inet_pton(AF_INET6, argv[1], &r_sin6.sin6_addr) == 0) { + || (remote_address == NULL) + || (inet_pton(AF_INET6, remote_address, &r_sin6.sin6_addr) == 0)) { if (argc > 2) { options = _setupReachabilityOptions(argc - 2, argv + 2, NULL); } @@ -296,9 +311,16 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) } } } else { - interface = strchr(argv[1], '%'); - if (interface != NULL) { - r_sin6.sin6_scope_id = if_nametoindex(interface); + if (remote_interface != NULL) { + r_sin6.sin6_scope_id = if_nametoindex(remote_interface); + + if ((interface != NULL) && (strcmp(interface, remote_interface) != 0)) { + SCPrint(TRUE, stderr, + CFSTR("Interface mismatch \"%s\" != \"%s\"\n"), + interface, + remote_interface); + exit(1); + } } options = _setupReachabilityOptions(argc - 2, argv + 2, NULL); @@ -351,11 +373,44 @@ _setupReachability(int argc, char **argv, SCNetworkReachabilityContext *context) } } - if (ip_address != argv[0]) { - free(ip_address); + if (ip_addressN != NULL) { + free(ip_addressN); + } + + if (remote_addressN != NULL) { + free(remote_addressN); } if ((target == NULL) && (options != NULL)) { + if (CFDictionaryContainsKey(options, kSCNetworkReachabilityOptionPTRAddress)) { + CFDataRef address; + + address = CFDictionaryGetValue(options, kSCNetworkReachabilityOptionRemoteAddress); + if (address == NULL) { + SCPrint(TRUE, stderr, CFSTR("No address\n")); + exit(1); + } + CFDictionarySetValue(options, kSCNetworkReachabilityOptionPTRAddress, address); + CFDictionaryRemoveValue(options, kSCNetworkReachabilityOptionRemoteAddress); + + if (context != NULL) { + CFIndex n = CFDictionaryGetCount(options); + + if (n == 1) { + context->info = "by PTR"; + } else if (CFDictionaryContainsKey(options, + kSCNetworkReachabilityOptionInterface)) { + if (n == 2) { + context->info = "by PTR w/scope"; + } else { + context->info = "by PTR w/scope and options"; + } + } else { + context->info = "by PTR w/options"; + } + } + } + target = SCNetworkReachabilityCreateWithOptions(NULL, options); CFRelease(options); } @@ -434,7 +489,7 @@ _printNWIFlags(nwi_ifstate_flags flags) SCPrint(flags != 0, stdout, CFSTR(",")); } if (flags != 0) { - SCPrint(TRUE, stdout, CFSTR("0x%08x"), flags); + SCPrint(TRUE, stdout, CFSTR("%p"), (void *)flags); } SCPrint(TRUE, stdout, CFSTR(")")); @@ -454,10 +509,10 @@ _printNWIInfo(nwi_ifstate_t ifstate) SCPrint(TRUE, stdout, CFSTR(" %7s : flags %p"), nwi_ifstate_get_ifname(ifstate), - ifstate_flags); + (void *)ifstate_flags); _printNWIFlags(ifstate_flags); - SCPrint(TRUE, stdout, CFSTR("\n reach %p ("), reach_flags); + SCPrint(TRUE, stdout, CFSTR("\n reach 0x%08x ("), reach_flags); __SCNetworkReachabilityPrintFlags(reach_flags); SCPrint(TRUE, stdout, CFSTR(")")); @@ -486,16 +541,28 @@ _printNWIInfo(nwi_ifstate_t ifstate) } -__private_extern__ -void -do_nwi(int argc, char **argv) +static void +_printNWIReachInfo(nwi_state_t state, int af) +{ + uint32_t reach_flags; + + reach_flags = nwi_state_get_reachability_flags(state, af); + SCPrint(TRUE, stdout, CFSTR("\n REACH : flags 0x%08x ("), reach_flags); + __SCNetworkReachabilityPrintFlags(reach_flags); + SCPrint(TRUE, stdout, CFSTR(")\n")); + + return; +} + + +static void +do_printNWI(int argc, char **argv, nwi_state_t state) { nwi_ifstate_t ifstate; - nwi_state_t state = nwi_state_copy(); if (state == NULL) { SCPrint(TRUE, stdout, CFSTR("No network information\n")); - exit(1); + return; } if (argc > 0) { @@ -505,40 +572,102 @@ do_nwi(int argc, char **argv) } else { SCPrint(TRUE, stdout, CFSTR("No network information (for %s)\n"), argv[0]); } - - goto done; + return; } SCPrint(TRUE, stdout, CFSTR("Network information (generation %llu)"), nwi_state_get_generation(state)); SCPrint(TRUE, stdout, CFSTR("\nIPv4 network interface information\n")); - ifstate = nwi_state_get_first_ifstate(state, AF_INET); + ifstate = nwi_state_get_first_ifstate(state, AF_INET); if (ifstate == NULL) { - SCPrint(TRUE, stdout, CFSTR(" No IPv4 states found\n")); - } - - while (ifstate != NULL) { - _printNWIInfo(ifstate); - ifstate = nwi_ifstate_get_next(ifstate, AF_INET); + SCPrint(TRUE, stdout, CFSTR(" No IPv4 states found\n")); + } else { + while (ifstate != NULL) { + _printNWIInfo(ifstate); + ifstate = nwi_ifstate_get_next(ifstate, AF_INET); + } } + _printNWIReachInfo(state, AF_INET); SCPrint(TRUE, stdout, CFSTR("\nIPv6 network interface information\n")); - ifstate = nwi_state_get_first_ifstate(state, AF_INET6); + ifstate = nwi_state_get_first_ifstate(state, AF_INET6); if (ifstate == NULL) { - SCPrint(TRUE, stdout, CFSTR(" No IPv6 states found\n")); + SCPrint(TRUE, stdout, CFSTR(" No IPv6 states found\n")); + } else { + while (ifstate != NULL) { + _printNWIInfo(ifstate); + ifstate = nwi_ifstate_get_next(ifstate, AF_INET6); + } } + _printNWIReachInfo(state, AF_INET6); - while (ifstate != NULL) { - _printNWIInfo(ifstate); - ifstate = nwi_ifstate_get_next(ifstate, AF_INET6); + return; +} + + +__private_extern__ +void +do_showNWI(int argc, char **argv) +{ + nwi_state_t state; + + state = nwi_state_copy(); + do_printNWI(argc, argv, state); + if (state != NULL) { + nwi_state_release(state); + } else { + exit(1); + } + + exit(0); +} + + +__private_extern__ +void +do_watchNWI(int argc, char **argv) +{ + nwi_state_t state; + int status; + int token; + + state = nwi_state_copy(); + do_printNWI(argc, argv, state); + if (state != NULL) { + nwi_state_release(state); } - done : + status = notify_register_dispatch(nwi_state_get_notify_key(), + &token, + dispatch_get_main_queue(), + ^(int token){ + nwi_state_t state; + struct tm tm_now; + struct timeval tv_now; + + (void)gettimeofday(&tv_now, NULL); + (void)localtime_r(&tv_now.tv_sec, &tm_now); + SCPrint(TRUE, stdout, CFSTR("\n*** %2d:%02d:%02d.%03d\n\n"), + tm_now.tm_hour, + tm_now.tm_min, + tm_now.tm_sec, + tv_now.tv_usec / 1000); + + state = nwi_state_copy(); + do_printNWI(argc, argv, state); + if (state != NULL) { + nwi_state_release(state); + } + }); + if (status != NOTIFY_STATUS_OK) { + SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for nwi changes, status=%u"), status); + exit(1); + } - nwi_state_release(state); + CFRunLoopRun(); exit(0); } @@ -639,18 +768,14 @@ do_watchReachability(int argc, char **argv) } -__private_extern__ -void -do_showDNSConfiguration(int argc, char **argv) +static void +do_printDNSConfiguration(int argc, char **argv, dns_config_t *dns_config) { - dns_config_t *dns_config; SCNetworkReachabilityRef target; - dns_config = dns_configuration_copy(); - if (dns_config == NULL) { SCPrint(TRUE, stdout, CFSTR("No DNS configuration available\n")); - exit(1); + return; } if (argc > 1) { @@ -677,7 +802,7 @@ do_showDNSConfiguration(int argc, char **argv) if (!ok) { SCPrint(TRUE, stdout, CFSTR("No DNS configuration available.\n" )); - exit(1); + return; } SCPrint(TRUE, stdout, CFSTR("DNS configuration for %s\n"), @@ -697,10 +822,73 @@ do_showDNSConfiguration(int argc, char **argv) } if (_sc_debug) { - SCPrint(TRUE, stdout, CFSTR("\ngeneration = %lu\n"), dns_config->generation); + SCPrint(TRUE, stdout, CFSTR("\ngeneration = %llu\n"), dns_config->generation); } - dns_configuration_free(dns_config); + return; +} + + +__private_extern__ +void +do_showDNSConfiguration(int argc, char **argv) +{ + dns_config_t *dns_config; + + dns_config = dns_configuration_copy(); + do_printDNSConfiguration(argc, argv, dns_config); + if (dns_config != NULL) { + dns_configuration_free(dns_config); + } else { + exit(1); + } + + exit(0); +} + + +__private_extern__ +void +do_watchDNSConfiguration(int argc, char **argv) +{ + dns_config_t *dns_config; + int status; + int token; + + dns_config = dns_configuration_copy(); + do_printDNSConfiguration(argc, argv, dns_config); + if (dns_config != NULL) { + dns_configuration_free(dns_config); + } + + status = notify_register_dispatch(dns_configuration_notify_key(), + &token, + dispatch_get_main_queue(), + ^(int token){ + dns_config_t *dns_config; + struct tm tm_now; + struct timeval tv_now; + + (void)gettimeofday(&tv_now, NULL); + (void)localtime_r(&tv_now.tv_sec, &tm_now); + SCPrint(TRUE, stdout, CFSTR("\n*** %2d:%02d:%02d.%03d\n\n"), + tm_now.tm_hour, + tm_now.tm_min, + tm_now.tm_sec, + tv_now.tv_usec / 1000); + + dns_config = dns_configuration_copy(); + do_printDNSConfiguration(argc, argv, dns_config); + if (dns_config != NULL) { + dns_configuration_free(dns_config); + } + }); + if (status != NOTIFY_STATUS_OK) { + SCLog(TRUE, LOG_INFO, CFSTR("notify_register_dispatch() failed for DNS configuration changes, status=%u"), status); + exit(1); + } + + CFRunLoopRun(); exit(0); } @@ -807,7 +995,7 @@ do_showProxyConfiguration(int argc, char **argv) CFDictionaryRef proxy; proxy = CFArrayGetValueAtIndex(matching, i); - SCPrint(TRUE, stdout, CFSTR("\nproxy #%d\n"), i + 1); + SCPrint(TRUE, stdout, CFSTR("\nproxy #%ld\n"), i + 1); showProxy(proxy); } @@ -838,9 +1026,7 @@ do_snapshot(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR(" %s\n"), SCErrorString(SCError())); } -#ifdef HAVE_REACHABILITY_SERVER (void) _SCNetworkReachabilityServer_snapshot(); -#endif // HAVE_REACHABILITY_SERVER return; } @@ -1057,7 +1243,7 @@ sleep(120); dns_configuration_free(dns_config); } - do_showDNSConfiguration(argc, argv); + do_showDNSConfiguration(argc, argv); exit(0); } diff --git a/scutil.tproj/tests.h b/scutil.tproj/tests.h index 996a64e..eb3852a 100644 --- a/scutil.tproj/tests.h +++ b/scutil.tproj/tests.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2007, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2007, 2011, 2012, 2014 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -44,10 +44,12 @@ void do_checkReachability (int argc, char **argv); void do_watchReachability (int argc, char **argv); void do_renew (char *interface); void do_showDNSConfiguration (int argc, char **argv); +void do_watchDNSConfiguration (int argc, char **argv); void do_showProxyConfiguration (int argc, char **argv); void do_snapshot (int argc, char **argv); void do_wait (char *waitKey, int timeout); -void do_nwi (int argc, char **argv); +void do_showNWI (int argc, char **argv); +void do_watchNWI (int argc, char **argv); __END_DECLS -- 2.47.2