[openib-general] Re: [CMA][PATCH] port byte order fix

Or Gerlitz ogerlitz at voltaire.com
Thu Jan 19 01:02:37 PST 2006


 >> The CMA appears to assume that a struct sockaddr_in's sin_port value
 >> will be in host byte order. This is incorrect.

Sean Hefty wrote:
> Thanks - I'm fairly certain that the CMA will need some updates before 
> final acceptance into the kernel.  I'll add this in beforehand.

Sean, when you commit this change please change ulp/iser/iser_socket.c
since this code indeed sets it for the CMA in host order (it is htons
on something which is network order... confusing, anyway you will
delete it).

Or.

Index: iser_socket.c
===================================================================
--- iser_socket.c       (revision 5070)
+++ iser_socket.c       (working copy)
@@ -165,7 +165,6 @@ int iser_sock_connect(struct socket *soc
                  dst_addr->sin_addr.s_addr, NIPQUAD(dst_addr->sin_addr),
                  dst_addr->sin_port, dst_addr->sin_port);

-       dst_addr->sin_port = htons(dst_addr->sin_port);

         iser_err("ip = %d.%d.%d.%d, port = %d\n",
         NIPQUAD(dst_addr->sin_addr), dst_addr->sin_port);








More information about the general mailing list