[Pkg-privacy-commits] [onioncat] 97/340: seems to run on Darwin yet

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository onioncat.

commit 595276d74735e1b8cbf57af73170cdfdece01849
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date:   Thu Dec 11 19:45:01 2008 +0000

    seems to run on Darwin yet
    
    
    git-svn-id: http://www.cypherpunk.at/svn/onioncat/trunk@390 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
 ChangeLog     |  1 +
 src/ocateth.c |  2 +-
 src/ocattun.c | 11 +++++++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5f7fc66..1c8abe8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 * version 
+ - seems to run on Darwin yet ;)
  - consolidated header files
  - compiles on FreeBSD and OpenBSD
  - connecting logfile to /dev/null if background option given
diff --git a/src/ocateth.c b/src/ocateth.c
index d588a8c..e8255f6 100644
--- a/src/ocateth.c
+++ b/src/ocateth.c
@@ -72,7 +72,7 @@ void mac_cleanup(void)
    for (i = 0; i < mac_cnt_; i++)
       if (mac_tbl_[i].age + MAX_MAC_AGE < time(NULL))
       {
-         log_debug("mac table entry %d timed out", i);
+         log_debug("mac table entry %d (%s) timed out", i, ether_ntoa((struct ether_addr*) mac_tbl_[i].hwaddr));
          memmove(&mac_tbl_[i], &mac_tbl_[i + 1], sizeof(MACTable_t) * (MAX_MAC_ENTRY - i));
          mac_cnt_--;
          i--;
diff --git a/src/ocattun.c b/src/ocattun.c
index 1103e1c..1cd440e 100644
--- a/src/ocattun.c
+++ b/src/ocattun.c
@@ -95,6 +95,17 @@ int tun_alloc(char *dev, struct in6_addr addr)
 
 #endif
 
+#ifdef __APPLE__
+
+// see http://svn.deepdarc.com/code/miredo-osx/trunk/tuntap/README
+#define TUNSIFHEAD  _IOW('t', 96, int)
+
+   int prm = 1;
+   if (ioctl(fd, TUNSIFHEAD, &prm) == -1)
+      log_msg(LOG_EMERG, "could not ioctl:TUNSIFHEAD: %s", strerror(errno)), exit(1);
+
+#endif
+
    if (!CNF(use_tap))
    {
       snprintf(buf, sizeof(buf), "ifconfig tun0 inet6 %s/%d up", astr, TOR_PREFIX_LEN);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git



More information about the Pkg-privacy-commits mailing list