diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-12-20 17:12:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:59:24 -0500 |
commit | f57d96b2e92d209ab3991bba9a44e0d6ef7614a8 (patch) | |
tree | bfd82e031bd1842d0efc60beb893947d9ee95ccc /net/sctp/socket.c | |
parent | a08de64d074b36a56ee3bb985cd171281db78e96 (diff) |
[SCTP]: Change use_as_src into a full address state
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index dc2f9221f092..7a8650f01d08 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -390,7 +390,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) | |||
390 | /* Add the address to the bind address list. | 390 | /* Add the address to the bind address list. |
391 | * Use GFP_ATOMIC since BHs will be disabled. | 391 | * Use GFP_ATOMIC since BHs will be disabled. |
392 | */ | 392 | */ |
393 | ret = sctp_add_bind_addr(bp, addr, 1, GFP_ATOMIC); | 393 | ret = sctp_add_bind_addr(bp, addr, SCTP_ADDR_SRC, GFP_ATOMIC); |
394 | 394 | ||
395 | /* Copy back into socket for getsockname() use. */ | 395 | /* Copy back into socket for getsockname() use. */ |
396 | if (!ret) { | 396 | if (!ret) { |
@@ -585,8 +585,8 @@ static int sctp_send_asconf_add_ip(struct sock *sk, | |||
585 | addr = (union sctp_addr *)addr_buf; | 585 | addr = (union sctp_addr *)addr_buf; |
586 | af = sctp_get_af_specific(addr->v4.sin_family); | 586 | af = sctp_get_af_specific(addr->v4.sin_family); |
587 | memcpy(&saveaddr, addr, af->sockaddr_len); | 587 | memcpy(&saveaddr, addr, af->sockaddr_len); |
588 | retval = sctp_add_bind_addr(bp, &saveaddr, 0, | 588 | retval = sctp_add_bind_addr(bp, &saveaddr, |
589 | GFP_ATOMIC); | 589 | SCTP_ADDR_NEW, GFP_ATOMIC); |
590 | addr_buf += af->sockaddr_len; | 590 | addr_buf += af->sockaddr_len; |
591 | } | 591 | } |
592 | } | 592 | } |
@@ -777,7 +777,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk, | |||
777 | af = sctp_get_af_specific(laddr->v4.sin_family); | 777 | af = sctp_get_af_specific(laddr->v4.sin_family); |
778 | list_for_each_entry(saddr, &bp->address_list, list) { | 778 | list_for_each_entry(saddr, &bp->address_list, list) { |
779 | if (sctp_cmp_addr_exact(&saddr->a, laddr)) | 779 | if (sctp_cmp_addr_exact(&saddr->a, laddr)) |
780 | saddr->use_as_src = 0; | 780 | saddr->state = SCTP_ADDR_DEL; |
781 | } | 781 | } |
782 | addr_buf += af->sockaddr_len; | 782 | addr_buf += af->sockaddr_len; |
783 | } | 783 | } |