summaryrefslogtreecommitdiffstats
path: root/l3/impl/src
diff options
context:
space:
mode:
Diffstat (limited to 'l3/impl/src')
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java7
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java7
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java3
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java3
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java3
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java3
6 files changed, 17 insertions, 9 deletions
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
index 1da148a31..e6f5e17b1 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
@@ -82,9 +82,10 @@ public class Ipv4NeighbourCustomizer extends IpNeighbourReader
ipNeighborDetails.neighbor.ipAddress.un.getIp4().ip4Address))
.withKey(keyMapper().apply(ipNeighborDetails))
.setLinkLayerAddress(toPhysAddress(ipNeighborDetails.neighbor.macAddress.macaddress))
- .setOrigin(ipNeighborDetails.neighbor.flags != IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC
- ? Dynamic
- : Static));
+ .setOrigin(ipNeighborDetails.neighbor.flags
+ .contains(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC)
+ ? Static
+ : Dynamic));
}
}
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
index 92f4962ee..54eccce63 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
@@ -77,9 +77,10 @@ public class Ipv6NeighbourCustomizer extends IpNeighbourReader
ipNeighborDetails.neighbor.ipAddress.un.getIp6().ip6Address))
.withKey(keyMapper().apply(ipNeighborDetails))
.setLinkLayerAddress(toPhysAddress(ipNeighborDetails.neighbor.macAddress.macaddress))
- .setOrigin(ipNeighborDetails.neighbor.flags != IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC
- ? Dynamic
- : Static));
+ .setOrigin(ipNeighborDetails.neighbor.flags
+ .contains(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC)
+ ? Static
+ : Dynamic));
}
}
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java
index f7105088d..f57965778 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java
@@ -98,7 +98,8 @@ public class Ipv6NeighbourCustomizer extends FutureJVppCustomizer
Neighbor data) throws WriteFailedException {
addDelNeighbour(id, () -> {
IpNeighborAddDel request = preBindRequest(add);
- request.neighbor.flags = IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC;
+ request.neighbor.flags = new IpNeighborFlags();
+ request.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
request.neighbor.macAddress = parseMacAddress(data.getLinkLayerAddress().getValue());
request.neighbor.ipAddress = ipv6AddressToAddress(data.getIp());
request.neighbor.swIfIndex = parentInterfaceIndex;
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java
index 9534ac966..f58422066 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java
@@ -37,6 +37,7 @@ import io.fd.vpp.jvpp.core.types.AddressUnion;
import io.fd.vpp.jvpp.core.types.Ip4Address;
import io.fd.vpp.jvpp.core.types.Ip6Address;
import io.fd.vpp.jvpp.core.types.IpNeighbor;
+import io.fd.vpp.jvpp.core.types.IpNeighborFlags;
import io.fd.vpp.jvpp.core.types.MacAddress;
import java.util.Arrays;
import java.util.List;
@@ -209,6 +210,8 @@ public interface InterfaceChildNodeTest extends NamingContextHelper, FutureProdu
detail.neighbor.ipAddress.un = addressUnion;
detail.neighbor.macAddress = new MacAddress();
detail.neighbor.macAddress.macaddress = mac;
+ detail.neighbor.flags = new IpNeighborFlags();
+ detail.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
return detail;
}
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java
index 7d2b6472c..cb87b5e3e 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java
@@ -137,7 +137,8 @@ public class Ipv4NeighbourCustomizerTest extends WriterCustomizerTest implements
ip4Address.ip4Address = new byte[]{(byte) 192, (byte) 168, 2, 1};
request.neighbor.ipAddress.un = new AddressUnion(ip4Address);
request.isAdd = booleanToByte(isAdd);
- request.neighbor.flags = IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC;
+ request.neighbor.flags = new IpNeighborFlags();
+ request.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
request.neighbor.swIfIndex = IFACE_ID;
return request;
}
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java
index ec8734cf7..f5f906155 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java
@@ -138,7 +138,8 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements
Ip6Address ip6Address = new Ip6Address();
ip6Address.ip6Address = new byte[]{32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1};
request.neighbor.ipAddress.un = new AddressUnion(ip6Address);
- request.neighbor.flags = IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC;
+ request.neighbor.flags = new IpNeighborFlags();
+ request.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
request.neighbor.swIfIndex = IFACE_ID;
return request;
}