Added debug info to ArpHandler and priorities to RoutingPopulator

Change-Id: I079c5d50b12602ef620dbc6c5812d4508fa0b58d
This commit is contained in:
Flavio Castro 2016-01-14 14:53:33 -08:00 committed by Gerrit Code Review
parent 4a91515f03
commit 6816f25a94
2 changed files with 4 additions and 6 deletions

View File

@ -227,13 +227,11 @@ public class ArpHandler {
.setSourceMACAddress(targetMac.toBytes()) .setSourceMACAddress(targetMac.toBytes())
.setEtherType(Ethernet.TYPE_ARP).setPayload(arpReply); .setEtherType(Ethernet.TYPE_ARP).setPayload(arpReply);
MacAddress hostMac = MacAddress.valueOf(arpReply.getTargetHardwareAddress());
HostId dstId = HostId.hostId( HostId dstId = HostId.hostId(hostMac, vlanId);
MacAddress.valueOf(arpReply.getTargetHardwareAddress()),
vlanId);
Host dst = srManager.hostService.getHost(dstId); Host dst = srManager.hostService.getHost(dstId);
if (dst == null) { if (dst == null) {
log.warn("Cannot send ARP response to unknown device"); log.warn("Cannot send ARP response to host {}", dstId);
return; return;
} }

View File

@ -260,7 +260,7 @@ public class RoutingRulePopulator {
.makePermanent() .makePermanent()
.nextStep(nextId) .nextStep(nextId)
.withSelector(selector) .withSelector(selector)
.withPriority(100) .withPriority(2000 * ipPrefix.prefixLength())
.withFlag(ForwardingObjective.Flag.SPECIFIC); .withFlag(ForwardingObjective.Flag.SPECIFIC);
if (treatment != null) { if (treatment != null) {
fwdBuilder.withTreatment(treatment); fwdBuilder.withTreatment(treatment);