Revert "Remove unnecessary ifindex arg from destroyUdpSocket"
Revert submission 3538339
Reason for revert: Likely culprit for b/406432012 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted changes: /q/submissionid:3538339
Change-Id: I70395af68b0f28e5c333333cb03a42f7633b0d5d
diff --git a/service/src/com/android/server/connectivity/QuicConnectionCloser.java b/service/src/com/android/server/connectivity/QuicConnectionCloser.java
index c064cf3..ce5d61c 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, cookie);
+ InetDiagMessage.destroyUdpSocket(src, dst, 0 /* ifindex */, 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 f776f47..c9a89ec 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 long cookie)
+ final int ifIndex, final long cookie)
throws ErrnoException, SocketException, InterruptedIOException {
FileDescriptor fd = null;
@@ -502,7 +502,7 @@
final StructInetDiagSockId id = new StructInetDiagSockId(
src,
dst,
- 0 /* ifIndex */,
+ ifIndex,
cookie
);
sendNetlinkDestroyRequest(fd, IPPROTO_UDP, id, (short) family, 0 /* state */);