Commit:     2772b495efe341a02c867bc3a03d7362bd336832
Parent:     d99fa42963a5ae394cf1df9d5bb739eb378a189b
Author:     Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 14:24:30 2007 +0900
Committer:  Vlad Yasevich <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 13:55:20 2007 -0400

    SCTP: Pick the correct port when binding to 0.
    sctp_bindx() allows the use of unspecified port.  The problem is
    that every address we bind to ends up selecting a new port if
    the user specified port 0.  This patch allows re-use of the
    already selected port when the port from bindx was 0.
    Signed-off-by: Vlad Yasevich <[EMAIL PROTECTED]>
 net/sctp/socket.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 01c6364..de79212 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -353,6 +353,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union 
sctp_addr *addr, int len)
         * The function sctp_get_port_local() does duplicate address
         * detection.
+       addr->v4.sin_port = htons(snum);
        if ((ret = sctp_get_port_local(sk, addr))) {
                if (ret == (long) sk) {
                        /* This endpoint has a conflicting address. */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to