Revert "Revert "Remove unnecessary ifindex arg from destroyUdpSo..."
Revert submission 3561690-revert-3538339-SNUWWZJNJZ
Reason for revert: NewAPI error will be fixed by separate CL
Reverted changes: /q/submissionid:3561690-revert-3538339-SNUWWZJNJZ
Change-Id: I2ae43c61c9ba0e0db3202a46e63756a3ea5a6512
diff --git a/service/src/com/android/server/connectivity/QuicConnectionCloser.java b/service/src/com/android/server/connectivity/QuicConnectionCloser.java
index ce5d61c..c064cf3 100644
--- a/service/src/com/android/server/connectivity/QuicConnectionCloser.java
+++ b/service/src/com/android/server/connectivity/QuicConnectionCloser.java
@@ -139,7 +139,7 @@
public void destroyUdpSocket(final InetSocketAddress src, final InetSocketAddress dst,
final long cookie)
throws SocketException, InterruptedIOException, ErrnoException {
- InetDiagMessage.destroyUdpSocket(src, dst, 0 /* ifindex */, cookie);
+ InetDiagMessage.destroyUdpSocket(src, dst, cookie);
}
/**
diff --git a/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java b/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java
index c9a89ec..f776f47 100644
--- a/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java
+++ b/staticlibs/device/com/android/net/module/util/netlink/InetDiagMessage.java
@@ -491,7 +491,7 @@
* Close the udp socket which can be uniquely identified with the cookie and other information.
*/
public static void destroyUdpSocket(final InetSocketAddress src, final InetSocketAddress dst,
- final int ifIndex, final long cookie)
+ final long cookie)
throws ErrnoException, SocketException, InterruptedIOException {
FileDescriptor fd = null;
@@ -502,7 +502,7 @@
final StructInetDiagSockId id = new StructInetDiagSockId(
src,
dst,
- ifIndex,
+ 0 /* ifIndex */,
cookie
);
sendNetlinkDestroyRequest(fd, IPPROTO_UDP, id, (short) family, 0 /* state */);