Change tetheroffloadjni to tetheringutilsjni
Rename tetheroffloadjni to tetheringutilsjni and move setupRaSocket
jni method from NetUtils into tetheringutilsjni.
Bug: 143195885
Test: -build, flash, boot
-atest TetheringTests
-Off/On hotspot with ipv6 upstream
Change-Id: Ib68eb6999bbe2d3ca97e68712f22b105311ef800
This commit is contained in:
@@ -30,6 +30,7 @@ import android.net.LinkAddress;
|
||||
import android.net.NetworkUtils;
|
||||
import android.net.TrafficStats;
|
||||
import android.net.util.InterfaceParams;
|
||||
import android.net.util.TetheringUtils;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Os;
|
||||
import android.system.StructTimeval;
|
||||
@@ -613,7 +614,7 @@ public class RouterAdvertisementDaemon {
|
||||
mSocket, SOL_SOCKET, SO_SNDTIMEO, StructTimeval.fromMillis(send_timout_ms));
|
||||
Os.setsockoptIfreq(mSocket, SOL_SOCKET, SO_BINDTODEVICE, mInterface.name);
|
||||
NetworkUtils.protectFromVpn(mSocket);
|
||||
NetworkUtils.setupRaSocket(mSocket, mInterface.index);
|
||||
TetheringUtils.setupRaSocket(mSocket, mInterface.index);
|
||||
} catch (ErrnoException | IOException e) {
|
||||
Log.e(TAG, "Failed to create RA daemon socket: " + e);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user