Wrap tun persist property and add assertion to ipv6 setter

This commit is contained in:
Sergey Abramchuk
2017-04-23 14:02:55 +03:00
parent 8decbe13aa
commit 6de9f6c7f9
2 changed files with 17 additions and 0 deletions

View File

@@ -64,4 +64,9 @@ typedef NS_ENUM(NSInteger, IPv6Preference) {
*/
@property (nonatomic) NSInteger connectionTimeout;
/**
Keep tun interface active during pauses or reconnections
*/
@property (nonatomic) BOOL tunPersist;
@end

View File

@@ -118,6 +118,10 @@ using namespace openvpn;
case IPv6PreferenceDefault:
_config.ipv6 = "default";
break;
default:
NSAssert(NO, @"Incorrect IPv6Preference value");
break;
}
}
@@ -129,4 +133,12 @@ using namespace openvpn;
_config.connTimeout = connectionTimeout;
}
- (BOOL)tunPersist {
return _config.tunPersist;
}
- (void)setTunPersist:(BOOL)tunPersist {
_config.tunPersist = tunPersist;
}
@end