Skip to content
Snippets Groups Projects
Commit b56f69c6 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

ClatIngress6Key.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: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I9008e20f40c983a1bb8a0547a61190f28042b22a
parent fb8e40ea
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,8 @@ import java.net.Inet6Address;
/** Key type for clat ingress IPv6 maps. */
public class ClatIngress6Key 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.Ipv6Address)
public final Inet6Address pfx96; // The source /96 nat64 prefix, bottom 32 bits must be 0
......@@ -33,7 +33,7 @@ public class ClatIngress6Key extends Struct {
@Field(order = 2, type = Type.Ipv6Address)
public final Inet6Address local6; // The full 128-bits of the destination IPv6 address
public ClatIngress6Key(final long iif, final Inet6Address pfx96, final Inet6Address local6) {
public ClatIngress6Key(final int iif, final Inet6Address pfx96, final Inet6Address local6) {
this.iif = iif;
this.pfx96 = pfx96;
this.local6 = local6;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment