Created
January 31, 2022 16:24
-
-
Save n8fr8/c71ffae633939342011470259fd1ab56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JNIEXPORT jint JNICALL Java_org_torproject_android_service_vpn_Tun2Socks_processDnsPacket( | |
jclass cls, | |
JNIEnv* env, | |
jbyteArray packet, | |
jint dataLength) | |
{ | |
jboolean isCopy; | |
jbyte* dataPtr = (*env)->GetByteArrayElements(env, packet, &isCopy); | |
process_device_dns_packet ((uint8_t *)dataPtr, dataLength); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
crashes when called from Java passing UDP packet via byte[] array
if I comment out lines 8,9,10 does not crash