Difference between revisions of "Iodine patch osx"
From MS Computech
(One intermediate revision by the same user not shown) | |||
Line 50: | Line 50: | ||
$ patch -p1 < {/path/to/patch/file} | $ patch -p1 < {/path/to/patch/file} | ||
</pre> | </pre> | ||
+ | [https://docs.google.com/file/d/0B5KUd6cQtRFidTZ1MWJ4U0tIOFE Download] | ||
+ | -------- | ||
+ | [https://github.com/zschoche/iodine/commit/e1e438497a83dbe6800212a0e5cb632907d1b3d9.patch Source] --[[User:Snifer|Snifer]] 09:58, 30 October 2013 (ICT) |
Latest revision as of 18:14, 2 December 2013
เพื่อแก้ไข Error route ทีเกิดขึ้นเมื่อรันโปรแกรม iodine (OSX)
route: writing to routing socket: Can't assign requested address
add net 192.168.99.2: gateway 192.168.99.2: Can't assign requested address
This change fix that!
Date: Tue, 31 Jul 2012 22:09:53 +0200 Subject: [PATCH] after update to OSX 10.8 I've gotten these error: route: writing to routing socket: Can't assign requested address add net 192.168.99.2: gateway 192.168.99.2: Can't assign requested address This change fix that! --- src/tun.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tun.c b/src/tun.c index cbc5490..65bde17 100644 --- a/src/tun.c +++ b/src/tun.c @@ -475,15 +475,19 @@ DWORD WINAPI tun_reader(LPVOID arg) fprintf(stderr, "Setting IP of %s to %s\n", if_name, ip); #ifndef LINUX + struct in_addr netip; + netip.s_addr = inet_addr(ip); + netip.s_addr = netip.s_addr & net.s_addr; r = system(cmdline); if(r != 0) { return r; } else { + snprintf(cmdline, sizeof(cmdline), "/sbin/route add %s/%d %s", - ip, netbits, ip); + inet_ntoa(netip), netbits, ip); } - fprintf(stderr, "Adding route %s/%d to %s\n", ip, netbits, ip); + fprintf(stderr, "Adding route %s/%d to %s\n", inet_ntoa(netip), netbits, ip); #endif return system(cmdline); #else /* WINDOWS32 */ -- 1.8.4
Copy iodine-osx.patch to iodine-0.6.0-rc1 folder The following usage is most commonly used:
$ patch -p1 < {/path/to/patch/file}