From 598ca48ed6aa22246b5daee7fb03aa48ee2cdad1 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 5 Sep 2016 16:12:06 -0700 Subject: [PATCH 1/3] Attempting to fix VirtualNetworkRoute having 2 entries in git. Yay non case sensitive filesystems --- .../com/zerotier/sdk/VirtualNetworkRoute.java | 55 ------------------- .../com/zerotier/sdk/VirtualnetworkRoute.java | 55 ------------------- 2 files changed, 110 deletions(-) delete mode 100644 java/src/com/zerotier/sdk/VirtualNetworkRoute.java delete mode 100644 java/src/com/zerotier/sdk/VirtualnetworkRoute.java diff --git a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java deleted file mode 100644 index 32376cb9a..000000000 --- a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -package com.zerotier.sdk; - -import java.net.InetSocketAddress; - -public class VirtualNetworkRoute -{ - private VirtualNetworkRoute() {} - - /** - * Target network / netmask bits (in port field) or NULL or 0.0.0.0/0 for default - */ - public InetSocketAddress target; - - /** - * Gateway IP address (port ignored) or NULL (family == 0) for LAN-local (no gateway) - */ - public InetSocketAddress via; - - /** - * Route flags - */ - public int flags; - - /** - * Route metric (not currently used) - */ - public int metric; -} diff --git a/java/src/com/zerotier/sdk/VirtualnetworkRoute.java b/java/src/com/zerotier/sdk/VirtualnetworkRoute.java deleted file mode 100644 index 32376cb9a..000000000 --- a/java/src/com/zerotier/sdk/VirtualnetworkRoute.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * ZeroTier One - Network Virtualization Everywhere - * Copyright (C) 2011-2015 ZeroTier, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * -- - * - * ZeroTier may be used and distributed under the terms of the GPLv3, which - * are available at: http://www.gnu.org/licenses/gpl-3.0.html - * - * If you would like to embed ZeroTier into a commercial application or - * redistribute it in a modified binary form, please contact ZeroTier Networks - * LLC. Start here: http://www.zerotier.com/ - */ - -package com.zerotier.sdk; - -import java.net.InetSocketAddress; - -public class VirtualNetworkRoute -{ - private VirtualNetworkRoute() {} - - /** - * Target network / netmask bits (in port field) or NULL or 0.0.0.0/0 for default - */ - public InetSocketAddress target; - - /** - * Gateway IP address (port ignored) or NULL (family == 0) for LAN-local (no gateway) - */ - public InetSocketAddress via; - - /** - * Route flags - */ - public int flags; - - /** - * Route metric (not currently used) - */ - public int metric; -} From dcf1f70868407ef38c9ec97772141d003ad20e93 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 5 Sep 2016 16:12:29 -0700 Subject: [PATCH 2/3] re-adding file --- .../com/zerotier/sdk/VirtualNetworkRoute.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 java/src/com/zerotier/sdk/VirtualNetworkRoute.java diff --git a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java new file mode 100644 index 000000000..738c4158f --- /dev/null +++ b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java @@ -0,0 +1,55 @@ +/* + * ZeroTier One - Network Virtualization Everywhere + * Copyright (C) 2011-2015 ZeroTier, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * -- + * + * ZeroTier may be used and distributed under the terms of the GPLv3, which + * are available at: http://www.gnu.org/licenses/gpl-3.0.html + * + * If you would like to embed ZeroTier into a commercial application or + * redistribute it in a modified binary form, please contact ZeroTier Networks + * LLC. Start here: http://www.zerotier.com/ + */ + +package com.zerotier.sdk; + +import java.net.InetSocketAddress; + +public final class VirtualNetworkRoute +{ + private VirtualNetworkRoute() {} + + /** + * Target network / netmask bits (in port field) or NULL or 0.0.0.0/0 for default + */ + public InetSocketAddress target; + + /** + * Gateway IP address (port ignored) or NULL (family == 0) for LAN-local (no gateway) + */ + public InetSocketAddress via; + + /** + * Route flags + */ + public int flags; + + /** + * Route metric (not currently used) + */ + public int metric; +} From 43b3ec4b1afa3c3833f1f61ec10c9f22bd5e7359 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 5 Sep 2016 16:19:04 -0700 Subject: [PATCH 3/3] forgot a semicolon in a JNI java type specifier. --- java/jni/ZT_jniutils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/jni/ZT_jniutils.cpp b/java/jni/ZT_jniutils.cpp index 5f54751d6..d7d205a74 100644 --- a/java/jni/ZT_jniutils.cpp +++ b/java/jni/ZT_jniutils.cpp @@ -710,14 +710,16 @@ jobject newNetworkConfig(JNIEnv *env, const ZT_VirtualNetworkConfig &vnetConfig) return NULL; } - assignedAddressesField = lookup.findField(vnetConfigClass, "assignedAddresses", "[Ljava/net/InetSocketAddress;"); + assignedAddressesField = lookup.findField(vnetConfigClass, "assignedAddresses", + "[Ljava/net/InetSocketAddress;"); if(env->ExceptionCheck() || assignedAddressesField == NULL) { LOGE("Error getting assignedAddresses field"); return NULL; } - routesField = lookup.findField(vnetConfigClass, "routes", "[Lcom/zerotier/sdk/VirtualNetworkRoute"); + routesField = lookup.findField(vnetConfigClass, "routes", + "[Lcom/zerotier/sdk/VirtualNetworkRoute;"); if(env->ExceptionCheck() || routesField == NULL) { LOGE("Error getting routes field");