[PATCH - SCTP] Fix multihomed connection failures on 64-bit systems.

STALE8157d

2 messages, 2 authors, 2004-05-08 · open the first message on its own page

[PATCH - SCTP] Fix multihomed connection failures on 64-bit systems.

From: Sridhar Samudrala <hidden>
Date: 2004-05-07 21:51:02

Dave,

The following patch from Vladislav Yasevich fixes an SCTP issue with 64-bit
systems.
This applies to 2.4 tree also with a small offset.

[SCTP] Fix multihomed connection failures on 64-bit systems.

Avoid the use of sizeof() and pointer arithmetic to get to the end
of sctp_cookie structure. Instead use the last element peer_init which
is a zero-sized array as the offset.

diff -Nru a/net/sctp/associola.c b/net/sctp/associola.c
--- a/net/sctp/associola.c      Fri May  7 14:37:34 2004
+++ b/net/sctp/associola.c      Fri May  7 14:37:34 2004
@@ -1195,7 +1195,7 @@
 {
        int var_size2 = ntohs(cookie->peer_init->chunk_hdr.length);
        int var_size3 = cookie->raw_addr_list_len;
-       __u8 *raw = (__u8 *)cookie + sizeof(struct sctp_cookie) + var_size2;
+       __u8 *raw = (__u8 *)cookie->peer_init + var_size2;

        return sctp_raw_to_bind_addrs(&asoc->base.bind_addr, raw, var_size3,
                                      asoc->ep->base.bind_addr.port, gfp);

Re: [PATCH - SCTP] Fix multihomed connection failures on 64-bit systems.

From: David S. Miller <hidden>
Date: 2004-05-08 22:22:20

On Fri, 7 May 2004 14:51:02 -0700 (PDT)
Sridhar Samudrala [off-list ref] wrote:
The following patch from Vladislav Yasevich fixes an SCTP issue with 64-bit
systems.
This applies to 2.4 tree also with a small offset.
Please use attachments if your mailer is going to turn tabs
into spaces as this makes the patch not apply cleanly.

I fixed it up by hand this time.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help