aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-10-23 15:04:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2023-10-23 15:04:28 +0200
commit5d604a151be65367253cc9bd288682dd9e6abb02 (patch)
treeebf4deedbb73b6c7e811ee61f80dae5473d96dc9
parentLet app handle offloads by changing selinux policy (diff)
downloadwireguard-vnet-hdr-zygisk-5d604a151be65367253cc9bd288682dd9e6abb02.tar.xz
wireguard-vnet-hdr-zygisk-5d604a151be65367253cc9bd288682dd9e6abb02.zip
Use info logging sometimes
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--jni/tunflags.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/jni/tunflags.cpp b/jni/tunflags.cpp
index c7fe3b3..a5a48ff 100644
--- a/jni/tunflags.cpp
+++ b/jni/tunflags.cpp
@@ -19,7 +19,9 @@
using zygisk::Api;
using zygisk::ServerSpecializeArgs;
-#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, "WireGuard/TunFlags", __VA_ARGS__)
+#define LOG_TAG "WireGuard/TunFlags"
+#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
+#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
static bool is_wireguard(JNIEnv *env, jobject vpn_obj)
{
@@ -55,7 +57,7 @@ static jint create(JNIEnv *env, jobject thiz, jint mtu)
if (!is_wireguard(env, thiz))
return orig_create(env, thiz, mtu);
- ALOGE("Using hooked function to create IFF_VNET_HDR tun device");
+ ALOGI("Using hooked function to create IFF_VNET_HDR tun device");
int tun = open("/dev/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (tun < 0) {