Committed by
Gerrit Code Review
IGMP Deserialize now properly uses the offset and
length parameters to deserialize the correct area of data buffer. Change-Id: I5d8869c25d397d5d07aad014ef00d0decef22d4f
Showing
2 changed files
with
4 additions
and
4 deletions
... | @@ -111,18 +111,18 @@ public class IGMPComponent { | ... | @@ -111,18 +111,18 @@ public class IGMPComponent { |
111 | "\tingress port: " + context.inPacket().receivedFrom().toString()); | 111 | "\tingress port: " + context.inPacket().receivedFrom().toString()); |
112 | 112 | ||
113 | if (ip.getProtocol() != IPv4.PROTOCOL_IGMP) { | 113 | if (ip.getProtocol() != IPv4.PROTOCOL_IGMP) { |
114 | - log.error("IGMP Picked up a non IGMP packet."); | 114 | + log.debug("IGMP Picked up a non IGMP packet."); |
115 | return; | 115 | return; |
116 | } | 116 | } |
117 | 117 | ||
118 | IpPrefix mcast = IpPrefix.valueOf("224.0.0.0/4"); | 118 | IpPrefix mcast = IpPrefix.valueOf("224.0.0.0/4"); |
119 | if (!mcast.contains(gaddr)) { | 119 | if (!mcast.contains(gaddr)) { |
120 | - log.error("IGMP Picked up a non multicast packet."); | 120 | + log.debug("IGMP Picked up a non multicast packet."); |
121 | return; | 121 | return; |
122 | } | 122 | } |
123 | 123 | ||
124 | if (mcast.contains(saddr)) { | 124 | if (mcast.contains(saddr)) { |
125 | - log.error("IGMP Picked up a packet with a multicast source address."); | 125 | + log.debug("IGMP Picked up a packet with a multicast source address."); |
126 | return; | 126 | return; |
127 | } | 127 | } |
128 | IpPrefix spfx = IpPrefix.valueOf(saddr, 32); | 128 | IpPrefix spfx = IpPrefix.valueOf(saddr, 32); | ... | ... |
... | @@ -231,7 +231,7 @@ public class IGMP extends BasePacket { | ... | @@ -231,7 +231,7 @@ public class IGMP extends BasePacket { |
231 | 231 | ||
232 | IGMP igmp = new IGMP(); | 232 | IGMP igmp = new IGMP(); |
233 | 233 | ||
234 | - ByteBuffer bb = ByteBuffer.wrap(data); | 234 | + final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); |
235 | igmp.igmpType = bb.get(); | 235 | igmp.igmpType = bb.get(); |
236 | igmp.resField = bb.get(); | 236 | igmp.resField = bb.get(); |
237 | igmp.checksum = bb.getShort(); | 237 | igmp.checksum = bb.getShort(); | ... | ... |
-
Please register or login to post a comment