Fix nullability of partitioned route
This commit is contained in:
parent
17cb2601be
commit
7a278dba69
|
@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (BOOL)isDefault;
|
||||
- (BOOL)matchesDestination:(NSString *)destination;
|
||||
- (NSArray<RoutingTableEntry *> *)partitioned;
|
||||
- (nullable NSArray<RoutingTableEntry *> *)partitioned;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ static NSString *RoutingTableEntryName(struct sockaddr *sa, struct sockaddr *mas
|
|||
}
|
||||
}
|
||||
|
||||
- (NSArray<RoutingTableEntry *> *)partitioned
|
||||
- (nullable NSArray<RoutingTableEntry *> *)partitioned
|
||||
{
|
||||
NSMutableArray<RoutingTableEntry *> *segments = [[NSMutableArray alloc] init];
|
||||
const int halfPrefix = (int)(self.prefix + 1);
|
||||
|
|
|
@ -741,7 +741,7 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
|
|||
let gateway = table.defaultGateway4()?.gateway(),
|
||||
let route = table.broadestRoute4(matchingDestination: gateway) {
|
||||
|
||||
route.partitioned().forEach {
|
||||
route.partitioned()?.forEach {
|
||||
let destination = $0.network()
|
||||
guard let netmask = $0.networkMask() else {
|
||||
return
|
||||
|
@ -758,7 +758,7 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
|
|||
let gateway = table.defaultGateway6()?.gateway(),
|
||||
let route = table.broadestRoute6(matchingDestination: gateway) {
|
||||
|
||||
route.partitioned().forEach {
|
||||
route.partitioned()?.forEach {
|
||||
let destination = $0.network()
|
||||
let prefix = $0.prefix()
|
||||
|
||||
|
|
Loading…
Reference in New Issue