Committed by
Gerrit Code Review
fixing dhcp serialization problem
Change-Id: Ie049f9c1e464ca9a2b651df74f7b979628d0d745
Showing
4 changed files
with
7 additions
and
3 deletions
... | @@ -104,7 +104,7 @@ public final class DefaultOpenFlowPacketContext implements OpenFlowPacketContext | ... | @@ -104,7 +104,7 @@ public final class DefaultOpenFlowPacketContext implements OpenFlowPacketContext |
104 | } catch (BufferUnderflowException | NullPointerException | | 104 | } catch (BufferUnderflowException | NullPointerException | |
105 | DeserializationException e) { | 105 | DeserializationException e) { |
106 | Logger log = LoggerFactory.getLogger(getClass()); | 106 | Logger log = LoggerFactory.getLogger(getClass()); |
107 | - log.warn("packet deserialization problem"); | 107 | + log.warn("packet deserialization problem : {}", e.getMessage()); |
108 | return null; | 108 | return null; |
109 | } | 109 | } |
110 | } | 110 | } | ... | ... |
... | @@ -628,6 +628,9 @@ public class DHCP extends BasePacket { | ... | @@ -628,6 +628,9 @@ public class DHCP extends BasePacket { |
628 | } | 628 | } |
629 | } | 629 | } |
630 | } else if (code == 255) { | 630 | } else if (code == 255) { |
631 | + DHCPOption end = new DHCPOption(); | ||
632 | + end.setCode((byte) 255); | ||
633 | + dhcp.options.add(end); | ||
631 | // remaining bytes are supposed to be 0, but ignore them just in | 634 | // remaining bytes are supposed to be 0, but ignore them just in |
632 | // case | 635 | // case |
633 | foundEndOptionsMarker = true; | 636 | foundEndOptionsMarker = true; | ... | ... |
... | @@ -271,7 +271,8 @@ public class IGMP extends BasePacket { | ... | @@ -271,7 +271,8 @@ public class IGMP extends BasePacket { |
271 | break; | 271 | break; |
272 | 272 | ||
273 | default: | 273 | default: |
274 | - msg = "IGMP message type: " + igmp.igmpType + " is not recodnized"; | 274 | + msg = "IGMP message type: " + igmp.igmpType + " is not recognized"; |
275 | + igmp.unsupportTypeData = bb.array(); | ||
275 | igmp.log.debug(msg); | 276 | igmp.log.debug(msg); |
276 | break; | 277 | break; |
277 | } | 278 | } | ... | ... |
... | @@ -130,7 +130,7 @@ public class DhcpTest { | ... | @@ -130,7 +130,7 @@ public class DhcpTest { |
130 | 130 | ||
131 | assertEquals(serverName, dhcp.serverName); | 131 | assertEquals(serverName, dhcp.serverName); |
132 | assertEquals(bootFileName, dhcp.bootFileName); | 132 | assertEquals(bootFileName, dhcp.bootFileName); |
133 | - assertEquals(1, dhcp.options.size()); | 133 | + assertEquals(2, dhcp.options.size()); |
134 | assertEquals(hostNameOption, dhcp.options.get(0)); | 134 | assertEquals(hostNameOption, dhcp.options.get(0)); |
135 | } | 135 | } |
136 | 136 | ... | ... |
-
Please register or login to post a comment