aboutgitcodebugslistschat
path: root/tcp_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'tcp_internal.h')
-rw-r--r--tcp_internal.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tcp_internal.h b/tcp_internal.h
index 51aaa16..4f61e5c 100644
--- a/tcp_internal.h
+++ b/tcp_internal.h
@@ -39,7 +39,11 @@
#define OPT_SACKP 4
#define OPT_SACK 5
#define OPT_TS 8
-#define CONN_V4(conn) (!!inany_v4(&(conn)->faddr))
+
+#define TAPSIDE(conn_) ((conn_)->f.pif[1] == PIF_TAP)
+#define TAPFLOW(conn_) (&((conn_)->f.side[TAPSIDE(conn_)]))
+
+#define CONN_V4(conn) (!!inany_v4(&TAPFLOW(conn)->faddr))
#define CONN_V6(conn) (!CONN_V4(conn))
/*