Navigation


Changeset 1540:407e0a889c7e in freeDiameter for libfdcore/config.c


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/config.c

    r1415 r1540  
    148148        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "          - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"), return NULL);
    149149        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "          - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"), return NULL);
     150        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "          - Client bind .. : %s\n", fd_g_config->cnf_flags.no_bind ? "DISABLED" : "Enabled"), return NULL);
    150151       
    151152        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "  TLS :   - Certificate .. : %s\n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)"), return NULL);
     
    352353       
    353354        /* Validate local endpoints */
    354         if ((!FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) && (fd_g_config->cnf_flags.no_ip4 || fd_g_config->cnf_flags.no_ip6)) {
     355        fd_g_config->cnf_flags.no_bind = FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints);
     356        if ((!fd_g_config->cnf_flags.no_bind) && (fd_g_config->cnf_flags.no_ip4 || fd_g_config->cnf_flags.no_ip6)) {
    355357                struct fd_list * li;
    356358                for ( li = fd_g_config->cnf_endpoints.next; li != &fd_g_config->cnf_endpoints; li = li->next) {
Note: See TracChangeset for help on using the changeset viewer.