ClatEgress4Value.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.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9c157a57278dcd43b464c853d1107a933c1fd8df
diff --git a/common/src/com/android/net/module/util/bpf/ClatEgress4Value.java b/common/src/com/android/net/module/util/bpf/ClatEgress4Value.java
index c10cb4d..69fab09 100644
--- a/common/src/com/android/net/module/util/bpf/ClatEgress4Value.java
+++ b/common/src/com/android/net/module/util/bpf/ClatEgress4Value.java
@@ -24,8 +24,8 @@
/** Value type for clat egress IPv4 maps. */
public class ClatEgress4Value extends Struct {
- @Field(order = 0, type = Type.U32)
- public final long oif; // The output interface to redirect to
+ @Field(order = 0, type = Type.S32)
+ public final int oif; // The output interface to redirect to
@Field(order = 1, type = Type.Ipv6Address)
public final Inet6Address local6; // The full 128-bits of the source IPv6 address
@@ -36,7 +36,7 @@
@Field(order = 3, type = Type.U8, padding = 3)
public final short oifIsEthernet; // Whether the output interface requires ethernet header
- public ClatEgress4Value(final long oif, final Inet6Address local6, final Inet6Address pfx96,
+ public ClatEgress4Value(final int oif, final Inet6Address local6, final Inet6Address pfx96,
final short oifIsEthernet) {
this.oif = oif;
this.local6 = local6;