vRouter: ignore routes that don't come from Quagga
Change-Id: I1a67a18b7f5f0a4e43156c017b92c12789e81104
diff --git a/apps/routing/src/main/java/org/onosproject/routing/fpm/protocol/RtNetlink.java b/apps/routing/src/main/java/org/onosproject/routing/fpm/protocol/RtNetlink.java
index 94b9d62..9017618 100644
--- a/apps/routing/src/main/java/org/onosproject/routing/fpm/protocol/RtNetlink.java
+++ b/apps/routing/src/main/java/org/onosproject/routing/fpm/protocol/RtNetlink.java
@@ -43,7 +43,7 @@
private final int srcLength;
private final short tos;
private final short table;
- private final short protocol;
+ private final RtProtocol protocol;
private final short scope;
private final short type;
private final long flags;
@@ -69,7 +69,7 @@
int srcLength,
short tos,
short table,
- short protocol,
+ RtProtocol protocol,
short scope,
short type,
long flags,
@@ -139,7 +139,7 @@
*
* @return protocol
*/
- public short protocol() {
+ public RtProtocol protocol() {
return protocol;
}
@@ -222,6 +222,8 @@
long flags = Integer.reverseBytes(bb.getInt());
List<RouteAttribute> attributes = new ArrayList<>();
+ RtProtocol rtProtocol = RtProtocol.get(protocol);
+
while (bb.hasRemaining()) {
RouteAttribute attribute = RouteAttribute.decode(buffer, bb.position(),
bb.limit() - bb.position());
@@ -235,7 +237,7 @@
srcLength,
tos,
table,
- protocol,
+ rtProtocol,
scope,
type,
flags,