summaryrefslogtreecommitdiff
path: root/src/android/net/dhcp/DhcpServer.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2019-04-05 04:44:45 -0700
committerRemi NGUYEN VAN <reminv@google.com>2019-04-08 01:41:39 +0000
commitf38a564a2ae4550fccce6ffa9007478135ebaaff (patch)
treebac517c8a5c68d0f50ad41d5d777e2d32f5d795c /src/android/net/dhcp/DhcpServer.java
parentfb5e4e2035f20464fa199b1ae8ba5d9f0cda4666 (diff)
Move attach*Filter() and addArpEntry() methods to NetworkStack
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods were added there because they could not be added as JNI inside the NetworkStack. This was not possible because on Go devices, the NetworkStack was a jar library. But now, Go also uses an APK. Hence, move these methods to the NetworkStack. Fixes: 129433183 Merged-In: I66d7b3e4fbfa32bb0bc853e8cf9399031daff8a9 (cherry picked from commit fe71be2b04a3213828dc0347a1dd4a3675d20562) Change-Id: Ice433a41469e784385f19498c154345d7b9c69b5
Diffstat (limited to 'src/android/net/dhcp/DhcpServer.java')
-rw-r--r--src/android/net/dhcp/DhcpServer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/net/dhcp/DhcpServer.java b/src/android/net/dhcp/DhcpServer.java
index cd993e9..8832eaa 100644
--- a/src/android/net/dhcp/DhcpServer.java
+++ b/src/android/net/dhcp/DhcpServer.java
@@ -45,6 +45,7 @@ import android.annotation.Nullable;
import android.net.INetworkStackStatusCallback;
import android.net.MacAddress;
import android.net.TrafficStats;
+import android.net.util.NetworkStackUtils;
import android.net.util.SharedLog;
import android.net.util.SocketUtils;
import android.os.Handler;
@@ -207,7 +208,7 @@ public class DhcpServer extends IDhcpServer.Stub {
@Override
public void addArpEntry(@NonNull Inet4Address ipv4Addr, @NonNull MacAddress ethAddr,
@NonNull String ifname, @NonNull FileDescriptor fd) throws IOException {
- SocketUtils.addArpEntry(ipv4Addr, ethAddr, ifname, fd);
+ NetworkStackUtils.addArpEntry(ipv4Addr, ethAddr, ifname, fd);
}
@Override