mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
packet lib: sctp: correct len(sctp)
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
203e3a575e
commit
e6a4f5897f
@ -139,6 +139,13 @@ class sctp(packet_base.PacketBase):
|
||||
struct.pack_into('!I', buf, 8, self.csum)
|
||||
return str(buf)
|
||||
|
||||
def __len__(self):
|
||||
length = self._MIN_LEN
|
||||
if self.chunks is not None:
|
||||
for one in self.chunks:
|
||||
length += len(one)
|
||||
return length
|
||||
|
||||
def _checksum(self, data):
|
||||
# from RFC 3309
|
||||
crc_c = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user