[AETHER-537][AETHER-538][AETHER-1032] Several bugfixes for SR (p1)
- Missing treament and meta information in removePortNextObjective
- Missing information in the host NextObjectives
- Wrong VLAN in the meta of the PW NextObjective
- Updates onos-dependencies to the latest beta
It will follow another patch that will complete the work
Change-Id: I412e21a03767130d818031545051e260c9534f05
diff --git a/impl/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/impl/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index 42d77d5..c3ecfb9 100644
--- a/impl/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/impl/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -474,8 +474,8 @@
VlanId nativeVlan = srManager.interfaceService.getNativeVlanId(connectPoint);
// Create route treatment
- TrafficTreatment.Builder tbuilder = DefaultTrafficTreatment.builder();
- tbuilder.deferred()
+ TrafficTreatment.Builder tbuilder = DefaultTrafficTreatment.builder()
+ .deferred()
.setEthDst(hostMac)
.setEthSrc(routerMac)
.setOutput(outPort);
@@ -485,12 +485,15 @@
// Adjust treatment and meta according to VLAN configuration
if (taggedVlans.contains(hostVlanId)) {
+ mbuilder.matchVlanId(hostVlanId);
tbuilder.setVlanId(hostVlanId);
} else if (hostVlanId.equals(VlanId.NONE)) {
if (untaggedVlan != null) {
mbuilder.matchVlanId(untaggedVlan);
+ tbuilder.popVlan();
} else if (nativeVlan != null) {
mbuilder.matchVlanId(nativeVlan);
+ tbuilder.popVlan();
} else {
log.warn("Untagged nexthop {}/{} is not allowed on {} without untagged or native vlan",
hostMac, hostVlanId, connectPoint);
@@ -1724,9 +1727,11 @@
TrafficSelector.Builder mbuilder = DefaultTrafficSelector.builder();
if (!popVlan) {
+ mbuilder.matchVlanId(vlanId);
tbuilder.setVlanId(vlanId);
} else {
mbuilder.matchVlanId(vlanId);
+ tbuilder.popVlan();
}
// if the objective is to revoke an existing rule, and for some reason