Re: [nox-dev] FW: Checksum calculation bug?

2011-08-25 Thread ibrahim mun
don't receive any erroneous packets. Is this my special casa or maybe a python issue?Thanks, Ibrahim Subject: Re: [nox-dev] FW: Checksum calculation bug? From: jam...@nau.edu Date: Wed, 24 Aug 2011 04:35:20 -0700 CC: nox-dev@noxrepo.org To: ibrahim.me...@alumnos.upm.es Do you have any reason

[nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread ibrahim mun
Hi, I think we have a bug in packet_utils.checksum, please check it: = def checksum(data, start, skip_word = 0): if len(data) % 2 != 0: arr = array.array('H', data[:-1]) else: arr = array.array('H', data) if skip_word: for i

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread Murphy McCauley
Do you have any reason to suspect that it isn't functioning correctly? It seems like you are assuming that arr is an array of bytes. However, if you look at the top of the function, you'll see that it's actually an array.array of H values, which are unsigned two-byte values. -- Murphy On Aug

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread ibrahim mun
a python issue?Thanks, Ibrahim Subject: Re: [nox-dev] FW: Checksum calculation bug? From: jam...@nau.edu Date: Wed, 24 Aug 2011 04:35:20 -0700 CC: nox-dev@noxrepo.org To: ibrahim.me...@alumnos.upm.es Do you have any reason to suspect that it isn't functioning correctly? It seems like you

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread ibrahim mun
so I'm not sure if it's a bug or the modified code only works for my home made packets and will result in errors once some other component uses it! Thanks,Ibrahim Date: Wed, 24 Aug 2011 13:20:17 -0700 Subject: Re: [nox-dev] FW: Checksum calculation bug? From: rob.sherw...@bigswitch.com

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread Murphy McCauley
Subject: Re: [nox-dev] FW: Checksum calculation bug? From: jam...@nau.edu Date: Wed, 24 Aug 2011 04:35:20 -0700 CC: nox-dev@noxrepo.org To: ibrahim.me...@alumnos.upm.es Do you have any reason to suspect that it isn't functioning correctly? It seems like you are assuming that arr