Permalink
Browse files

Wrong error codes in OSX TUN configurator, thanks krisk for pointing …

…it out.
  • Loading branch information...
1 parent 1d53d35 commit 94bc289d87d59a089cc785eb53722198347dd46f Caleb James DeLisle committed Aug 11, 2012
Showing with 6 additions and 8 deletions.
  1. +0 −2 cjdroute.c
  2. +6 −6 interface/TUNConfigurator_OSX.c
View
@@ -509,8 +509,6 @@ int main(int argc, char** argv)
CryptoAuth_new(&config, allocator, privateKey, eventBase, logger);
-
-
struct SwitchCore* switchCore = SwitchCore_new(logger, allocator);
struct DHTModuleRegistry* registry = DHTModuleRegistry_new(allocator);
ReplyModule_register(registry, allocator);
@@ -214,7 +214,7 @@ void TUNConfigurator_setMTU(const char* interfaceName,
if (s < 0) {
Except_raise(eh,
- TUNConfigurator_setIpAddress_INTERNAL,
+ TUNConfigurator_ERROR_GETTING_ADMIN_SOCKET,
"socket() failed [%s]",
strerror(errno));
}
@@ -229,10 +229,10 @@ void TUNConfigurator_setMTU(const char* interfaceName,
if (ioctl(s, SIOCSIFMTU, &ifRequest) < 0) {
int err = errno;
- close(s);
- Except_raise(eh,
- TUNConfigurator_setMTU_INTERNAL,
- "ioctl(SIOCSIFMTU) failed [%s]",
- strerror(err));
+ close(s);
+ Except_raise(eh,
+ TUNConfigurator_setMTU_INTERNAL,
+ "ioctl(SIOCSIFMTU) failed [%s]",
+ strerror(err));
}
}

0 comments on commit 94bc289

Please sign in to comment.