Mercurial > hg > freeDiameter
comparison tests/testsctp.c @ 1540:407e0a889c7e
SCTP ConnectPeer: sctp_bindx() to local endpoints
When connecting to an SCTP peer using sctp_connectx() with local
addresses configured with ListenOn, bind to the ListenOn addresses
using sctp_bindx() so that the SCTP INIT only contains the
configured local addresses, matching what is advertised in the CER,
and disable SCTP_AUTO_ASCONF.
If no local addresses are configured with ListenOn, the previous
behaviour of sctp_connectx() and enable SCTP_AUTO_ASCONF is used.
author | Luke Mewburn <luke@mewburn.net> |
---|---|
date | Fri, 01 May 2020 18:20:33 +1000 |
parents | f937feb72734 |
children | 566bb46cc73f |
comparison
equal
deleted
inserted
replaced
1539:d25ce064c667 | 1540:407e0a889c7e |
---|---|
96 | 96 |
97 /* Accept incoming clients */ | 97 /* Accept incoming clients */ |
98 CHECK( 0, fd_sctp_listen( sock )); | 98 CHECK( 0, fd_sctp_listen( sock )); |
99 | 99 |
100 /* Now, create the client socket */ | 100 /* Now, create the client socket */ |
101 CHECK( 0, fd_sctp_client( &cli.cc_socket, 0, TEST_PORT, &eps )); | 101 CHECK( 0, fd_sctp_client( &cli.cc_socket, 0, TEST_PORT, &eps, NULL )); |
102 | 102 |
103 /* Accept this connection */ | 103 /* Accept this connection */ |
104 srv.cc_socket = accept(sock, NULL, NULL); | 104 srv.cc_socket = accept(sock, NULL, NULL); |
105 | 105 |
106 /* Send a first message */ | 106 /* Send a first message */ |