diff options
Diffstat (limited to 'framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java')
-rw-r--r-- | framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java b/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java index c4267ebb..eb3b3fd5 100644 --- a/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java +++ b/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java @@ -105,8 +105,17 @@ public class IcmpHandler { } } + /** + * Sends an ICMP reply message. + * + * Note: we assume that packets sending from the edge switches to the hosts + * have untagged VLAN. + * @param icmpRequest the original ICMP request + * @param outport the output port where the ICMP reply should be sent to + */ private void sendICMPResponse(Ethernet icmpRequest, ConnectPoint outport) { - + // Note: We assume that packets arrive at the edge switches have + // untagged VLAN. Ethernet icmpReplyEth = new Ethernet(); IPv4 icmpRequestIpv4 = (IPv4) icmpRequest.getPayload(); @@ -129,7 +138,6 @@ public class IcmpHandler { icmpReplyEth.setEtherType(Ethernet.TYPE_IPV4); icmpReplyEth.setDestinationMACAddress(icmpRequest.getSourceMACAddress()); icmpReplyEth.setSourceMACAddress(icmpRequest.getDestinationMACAddress()); - icmpReplyEth.setVlanID(icmpRequest.getVlanID()); Ip4Address destIpAddress = Ip4Address.valueOf(icmpReplyIpv4.getDestinationAddress()); Ip4Address destRouterAddress = config.getRouterIpAddressForASubnetHost(destIpAddress); |