Added debug info to ArpHandler and priorities to RoutingPopulator
Change-Id: I079c5d50b12602ef620dbc6c5812d4508fa0b58d
diff --git a/src/main/java/org/onosproject/segmentrouting/ArpHandler.java b/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
index 7f4bcb1..6d9171b 100644
--- a/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
@@ -227,13 +227,11 @@
.setSourceMACAddress(targetMac.toBytes())
.setEtherType(Ethernet.TYPE_ARP).setPayload(arpReply);
-
- HostId dstId = HostId.hostId(
- MacAddress.valueOf(arpReply.getTargetHardwareAddress()),
- vlanId);
+ MacAddress hostMac = MacAddress.valueOf(arpReply.getTargetHardwareAddress());
+ HostId dstId = HostId.hostId(hostMac, vlanId);
Host dst = srManager.hostService.getHost(dstId);
if (dst == null) {
- log.warn("Cannot send ARP response to unknown device");
+ log.warn("Cannot send ARP response to host {}", dstId);
return;
}
diff --git a/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index 8543c86..03b29a5 100644
--- a/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -260,7 +260,7 @@
.makePermanent()
.nextStep(nextId)
.withSelector(selector)
- .withPriority(100)
+ .withPriority(2000 * ipPrefix.prefixLength())
.withFlag(ForwardingObjective.Flag.SPECIFIC);
if (treatment != null) {
fwdBuilder.withTreatment(treatment);