diff options
Diffstat (limited to 'net/sctp/bind_addr.c')
-rw-r--r-- | net/sctp/bind_addr.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 83e3011c19c..4ece451c8d2 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -430,7 +430,7 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | |||
430 | list_for_each_entry(laddr, &bp->address_list, list) { | 430 | list_for_each_entry(laddr, &bp->address_list, list) { |
431 | addr_buf = (union sctp_addr *)addrs; | 431 | addr_buf = (union sctp_addr *)addrs; |
432 | for (i = 0; i < addrcnt; i++) { | 432 | for (i = 0; i < addrcnt; i++) { |
433 | addr = (union sctp_addr *)addr_buf; | 433 | addr = addr_buf; |
434 | af = sctp_get_af_specific(addr->v4.sin_family); | 434 | af = sctp_get_af_specific(addr->v4.sin_family); |
435 | if (!af) | 435 | if (!af) |
436 | break; | 436 | break; |
@@ -534,6 +534,21 @@ int sctp_in_scope(const union sctp_addr *addr, sctp_scope_t scope) | |||
534 | return 0; | 534 | return 0; |
535 | } | 535 | } |
536 | 536 | ||
537 | int sctp_is_ep_boundall(struct sock *sk) | ||
538 | { | ||
539 | struct sctp_bind_addr *bp; | ||
540 | struct sctp_sockaddr_entry *addr; | ||
541 | |||
542 | bp = &sctp_sk(sk)->ep->base.bind_addr; | ||
543 | if (sctp_list_single_entry(&bp->address_list)) { | ||
544 | addr = list_entry(bp->address_list.next, | ||
545 | struct sctp_sockaddr_entry, list); | ||
546 | if (sctp_is_any(sk, &addr->a)) | ||
547 | return 1; | ||
548 | } | ||
549 | return 0; | ||
550 | } | ||
551 | |||
537 | /******************************************************************** | 552 | /******************************************************************** |
538 | * 3rd Level Abstractions | 553 | * 3rd Level Abstractions |
539 | ********************************************************************/ | 554 | ********************************************************************/ |