Navigation


Changeset 1540:407e0a889c7e in freeDiameter for tests


Ignore:
Timestamp:
May 1, 2020, 5:20:33 PM (4 years ago)
Author:
Luke Mewburn <luke@mewburn.net>
Branch:
default
Phase:
public
Message:

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.

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/testcnx.c

    r1399 r1540  
    675675                case IPPROTO_SCTP:
    676676                        {
    677                                 cnx = fd_cnx_cli_connect_sctp(0, TEST_PORT, &eps);
     677                                cnx = fd_cnx_cli_connect_sctp(0, TEST_PORT, &eps, NULL);
    678678                                CHECK( 1, (cnx ? 1 : 0) ^ cf->expect_failure );
    679679                        }
  • tests/testsctp.c

    r1235 r1540  
    9999       
    100100        /* 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 ));
    102102       
    103103        /* Accept this connection */
Note: See TracChangeset for help on using the changeset viewer.