I also got this issue while running sctp test and confirm this patch fixed the
problem. Please push this patch to the repo.

Thanks
Hangbin

2015-06-22 23:31 GMT+08:00 Alexey Kodanev <alexey.koda...@oracle.com>:
> Test always fails with TBROK because inner loop will reset all the
> previous set values if we use else branch.
>
> Fixes 7cfe1586b8ed ("sctp: sctputil.c: make 'found' a static array")
>
> Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com>
> ---
>  utils/sctp/testlib/sctputil.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
> index c678072..564925c 100644
> --- a/utils/sctp/testlib/sctputil.c
> +++ b/utils/sctp/testlib/sctputil.c
> @@ -371,6 +371,7 @@ int test_peer_addr(int sk, sctp_assoc_t asoc, 
> sockaddr_storage_t *peers, int cou
>         socklen_t addrs_size = 0;
>         void *addrbuf;
>         char found[count];
> +       memset(found, 0, count);
>
>         error = sctp_getpaddrs(sk, asoc, &addrs);
>         if (-1 == error) {
> @@ -404,8 +405,6 @@ int test_peer_addr(int sk, sctp_assoc_t asoc, 
> sockaddr_storage_t *peers, int cou
>                         if (cmp_addr((sockaddr_storage_t *)sa_addr,
>                                      &peers[j]) == 0) {
>                                 found[j] = 1;
> -                       } else {
> -                               found[j] = 0;
>                         }
>                 }
>         }
> --
> 1.7.1
>
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to