[ONOS-7624] Implement egress pipeline programming
- Implemented logic to handle double-tagged host in segmentrouting application.
- Added 'DummyVlanId' to segmentrouting application to keep track of dummy vlan for L3L2Unfiltered group chain and egress tables.
- Implemented L2Unfiltered group and Egress pipeline programming support in OFDPA pipeline.
- Added EGRESS flag to the forwardingObjective to program Egress tables.
- Fixed bugs when handling double-tagged ARP request, to get correct vlan id and reply with double-tagged packet.
- Fixed bugs in BasicHostConfig, to set the value of 'outerTpid' to 0x8100 if it is not specified.
- Fixed build(ARP/ICMP/ICMP6)reply to build double-tagged reply if corresponding request is double-tagged.
Change-Id: I1fdc30b55827c3f73fad9e854bcaa5fb23f7bcd0
diff --git a/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingNeighbourHandler.java b/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingNeighbourHandler.java
index f03e0be..5752bfa 100644
--- a/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingNeighbourHandler.java
+++ b/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingNeighbourHandler.java
@@ -19,6 +19,7 @@
import org.onlab.packet.Ethernet;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
@@ -113,7 +114,9 @@
* @param hostService the host service
*/
protected void sendResponse(NeighbourMessageContext pkt, MacAddress targetMac, HostService hostService) {
- HostId dstId = HostId.hostId(pkt.srcMac(), pkt.vlan());
+ short vlanId = pkt.packet().getQinQVID();
+ HostId dstId = HostId.hostId(pkt.srcMac(), vlanId == Ethernet.VLAN_UNTAGGED
+ ? pkt.vlan() : VlanId.vlanId(vlanId));
Host dst = hostService.getHost(dstId);
if (dst == null) {
log.warn("Cannot send {} response to host {} - does not exist in the store",