ClatIngress6Value.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: Iab2d4a13bf7ba45bbe8627adfdfb830f3219bc7b
diff --git a/common/src/com/android/net/module/util/bpf/ClatIngress6Value.java b/common/src/com/android/net/module/util/bpf/ClatIngress6Value.java
index bfec44f..fb81caa 100644
--- a/common/src/com/android/net/module/util/bpf/ClatIngress6Value.java
+++ b/common/src/com/android/net/module/util/bpf/ClatIngress6Value.java
@@ -24,13 +24,13 @@
/** Value type for clat ingress IPv6 maps. */
public class ClatIngress6Value extends Struct {
- @Field(order = 0, type = Type.U32)
- public final long oif; // The output interface to redirect to (0 means don't redirect)
+ @Field(order = 0, type = Type.S32)
+ public final int oif; // The output interface to redirect to (0 means don't redirect)
@Field(order = 1, type = Type.Ipv4Address)
public final Inet4Address local4; // The destination IPv4 address
- public ClatIngress6Value(final long oif, final Inet4Address local4) {
+ public ClatIngress6Value(final int oif, final Inet4Address local4) {
this.oif = oif;
this.local4 = local4;
}