commit | ae0f5dccee7300445ae51b9920e068f96286dd3d | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Mon Oct 09 11:07:25 2017 -0400 |
committer | Thomas Vachuska <tom@opennetworking.org> | Tue Oct 10 08:36:13 2017 +0000 |
tree | 18e54fb6060ccd3d32a1ea61d196082da8ba5dca | |
parent | 4260dd58b1f5685292b66a8dc8897a40ff5c717d [diff] |
[CORD-2055] Set hop limit to 64 when relaying DHCPv6 Change-Id: Ic8189eaff52fe2fb743e9fdef6a96609081dce16
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java index d903cd4..daa7037 100644 --- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java +++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
@@ -586,6 +586,7 @@ udpPacket.setSourcePort(UDP.DHCP_SERVER_PORT); udpPacket.setDestinationPort(UDP.DHCP_SERVER_PORT); ipv4Packet.setPayload(udpPacket); + ipv4Packet.setTtl((byte) 64); etherReply.setPayload(ipv4Packet); return etherReply; }
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java index a934ad8..69ba51b 100644 --- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java +++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java
@@ -896,11 +896,10 @@ log.debug("interfaceId write srcMac {} portString {}", HexString.toHexString(clientSoureMacBytes, ":"), inPortString); dhcp6Relay.setOptions(options); - //dhcp6Packet.setPayload(dhcp6Relay); - //udpPacket.setPayload(dhcp6Packet); udpPacket.setPayload(dhcp6Relay); udpPacket.resetChecksum(); ipv6Packet.setPayload(udpPacket); + ipv6Packet.setHopLimit((byte) 64); etherReply.setPayload(ipv6Packet);