commit | 83439a35f38d274958e9c59f0a692de54310d58e | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Tue Oct 24 15:21:16 2017 -0700 |
committer | Charles Chan <charles@opennetworking.org> | Tue Oct 31 00:11:27 2017 +0000 |
tree | 78c129a844d69b60822bb4a0d4dacc7d90408caf | |
parent | 178b0f574275e53686f9ded2813673626ee8d0ff [diff] |
Reflect DiffServ/TrafficClass when constructing ICMP/ICMP6 reply Change-Id: I0c440a9270e5d560a23552514bcb89dc7dcbecb0
diff --git a/utils/misc/src/main/java/org/onlab/packet/ICMP.java b/utils/misc/src/main/java/org/onlab/packet/ICMP.java index d1afcb6..92b61ba 100644 --- a/utils/misc/src/main/java/org/onlab/packet/ICMP.java +++ b/utils/misc/src/main/java/org/onlab/packet/ICMP.java
@@ -236,6 +236,7 @@ ipReply.setDestinationAddress(ipRequest.getSourceAddress()); ipReply.setSourceAddress(destAddress); ipReply.setTtl((byte) 64); + ipReply.setDiffServ(ipRequest.getDiffServ()); ipReply.setChecksum((short) 0); ipReply.setProtocol(IPv4.PROTOCOL_ICMP);
diff --git a/utils/misc/src/main/java/org/onlab/packet/ICMP6.java b/utils/misc/src/main/java/org/onlab/packet/ICMP6.java index dcde6b2..0bcf129 100644 --- a/utils/misc/src/main/java/org/onlab/packet/ICMP6.java +++ b/utils/misc/src/main/java/org/onlab/packet/ICMP6.java
@@ -375,6 +375,7 @@ ipv6Reply.setDestinationAddress(ipv6Request.getSourceAddress()); ipv6Reply.setSourceAddress(destAddress); ipv6Reply.setHopLimit((byte) 64); + ipv6Reply.setTrafficClass(ipv6Request.getTrafficClass()); ipv6Reply.setNextHeader(IPv6.PROTOCOL_ICMP6); ICMP6 icmpv6Reply = new ICMP6();