ClatEgress4Key.java - replace U32 ifindex with S32
These are allocated in order by the kernel, if we go
over 2 billion, we've got other problems... besides
U32 to S32 conversion will work just fine anyway.
Surprisingly it appears no further fixups are required
to make this compile, due to other places already being 'int's.
Bug: 245472520
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5a48f12e0fc6274debf645a087f5f3857d90be62
diff --git a/common/src/com/android/net/module/util/bpf/ClatEgress4Key.java b/common/src/com/android/net/module/util/bpf/ClatEgress4Key.java
index 12200ec..f0af3dd 100644
--- a/common/src/com/android/net/module/util/bpf/ClatEgress4Key.java
+++ b/common/src/com/android/net/module/util/bpf/ClatEgress4Key.java
@@ -24,13 +24,13 @@
/** Key type for clat egress IPv4 maps. */
public class ClatEgress4Key extends Struct {
- @Field(order = 0, type = Type.U32)
- public final long iif; // The input interface index
+ @Field(order = 0, type = Type.S32)
+ public final int iif; // The input interface index
@Field(order = 1, type = Type.Ipv4Address)
public final Inet4Address local4; // The source IPv4 address
- public ClatEgress4Key(final long iif, final Inet4Address local4) {
+ public ClatEgress4Key(final int iif, final Inet4Address local4) {
this.iif = iif;
this.local4 = local4;
}