open-iscsi / target-isns

Target-isns is an iSNS client for the Linux LIO iSCSI target
GNU General Public License v2.0
16 stars 19 forks source link

Fix port number to use correct endian #2

Closed dwalkes closed 10 years ago

dwalkes commented 10 years ago

We've tested with a Windows 2008 R2 iSNS server and noticed that all targets were listed with port 0 as the port number instead of

  1. We captured a wireshark trace and compared to another iSNS target and noticed the port was little endian in our case and big endian in the working case.

I'm a little confused because based on a quick glance at RFC 4171 section 6.3.2 (http://tools.ietf.org/html/rfc4171#section-6.3.2) I would have expected a shift to be required, however we confirmed that the implementation matches the working iSNS target when implemented as above and the value passed to htonl is the one displayed in the Windows iSNS server as the port number for each target.

cvubrugier commented 10 years ago

Thanks :+1: