Navigation


Changes in / [1543:9222d31123b1:1544:7bad8025e69d] in freeDiameter


Ignore:
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • contrib/debian/changelog

    r1398 r1542  
     1freediameter (UNRELEASED) UNRELEASED; urgency=low
     2
     3  * freeDiameter:
     4    - Add -g to help
     5    - Change -d and -q to control syslog level, as per stdout logging.
     6    - Syslog to LOG_DAEMON.
     7    - Actually syslog to LOG_DEBUG, now that -d/-q are used.
     8    - Add -p pidfile
     9    - SCTP client: bind to local endpoints configured with ListenOn so
     10      that the SCTP INIT only contains those local endpoint addresses,
     11      matching what is advertised in the CER.
     12  * Base dictionary: Add rules for Experimental-Result.
     13  * All extensions: Hide symbols except for fd_ext_init() and fd_ext_fini().
     14  * dbg_dict_dump.fdx: add extension to write the dictionary
     15    to the given file or to the log.
     16  * dbg_dict_dump_json.fdx: add extension to write the dictionary as JSON
     17    to the given file or stdout.
     18  * dict_dcca_3gpp.fdx: Update to 3GPP Release 15, adding many standards.
     19    This adds 96 TYPEs, 145 ENUMVALs, 791 AVPs, 52 RULEs.
     20    There are various breaking changes (documented below).
     21  * contrib/dictionary_dcca_3gpp.json: Remove non-3GPP AVPs that are
     22    actually from base IETF RFCs:
     23      - MIP6-Feature-Vector (124). IETF RFC 5447
     24      - Service-Selection (493). IETF RFC 5778
     25      - Mobile-Node-Identifier (506). IETF RFC 5779
     26      - QoS-Capability (578). IETF RFC 5777.
     27  * New API: fd_msg_add_result(): set Result-Code or Experimental-Result.
     28  * New API: log level FD_LOG_INFO.
     29  * fd_conf_dump(): fix formatting of local endpoints.
     30  * fd_msg_search_avp(): support searching avp as well as msg.
     31  * Fix compiler warnings.
     32  * Add ERRORS_ON_WARNINGS cmake boolean to enable fatal compiler warnings.
     33  * New tool: grep_fd_dict_dump: cleanup fd_dict_dump() output in logs.
     34  * New tool: csv_to_fd: convert .csv with AVP tables to freeDiameter C or JSON.
     35  * New tool: org_to_csv: convert .org files into .csv files.
     36
     37  * dict_dcca_3gpp.fdx changes per update to 3GPP Release 15 as at 2019-12:
     38    - AVP changes:
     39      - 3GPP-CG-IPv6-Address (14) renamed to 3GPP-CG-Ipv6-Address (14).
     40      - 3GPP-GGSN-IPv6-Address (16) renamed to 3GPP-GGSN-Ipv6-Address (16).
     41      - 3GPP-IPv6-DNS-Servers (17) renamed to 3GPP-Ipv6-DNS-Servers (17).
     42      - 3GPP-SGSN-IPv6-Address (15) renamed to 3GPP-SGSN-Ipv6-Address (15).
     43      - 3GPP2-BSID (9010) flag M MUST.
     44      - 3GPP2-BSID (9010) type changed from OctetString to UTF8String.
     45      - ADC-Revalidation-Time (2801) Time removed in 3GPP TS 29.212 V12.1.0 (2013-06).
     46      - ADC-Rule-Base-Name (1095) flag M MUST.
     47      - ADC-Rule-Definition (1094) flag M MUST.
     48      - ADC-Rule-Install (1092) flag M MUST.
     49      - ADC-Rule-Name (1096) flag M MUST.
     50      - ADC-Rule-Remove (1093) flag M MUST.
     51      - ADC-Rule-Report (1097) flag M MUST.
     52      - Application-Service-Type (2102) type changed from UTF8String to Enumerated.
     53      - Application–Session–Id (2103) type changed from UTF8String to Unsigned32.
     54      - Call-Barring-Infor-List (1488) renamed to Call-Barring-Info (1488).
     55      - External-Identifier (28) OctetString replaced by External-Identifier (3111) UTF8String.
     56      - LCS-Requestor-Id (1239) renamed to LCS-Requestor-ID (1239).
     57      - LCS-Requestor-Id-String (1240) renamed to LCS-Requestor-ID-String (1240).
     58      - MBMS-BMSC-SSM-IPv6-Address (919) renamed to MBMS-BMSC-SSM-Ipv6-Address (919).
     59      - MBMS-GGSN-IPv6-Address (917) renamed to MBMS-GGSN-Ipv6-Address (917).
     60      - MBMSGW-Address (2307) renamed to MBMS-GW-Address (2307).
     61      - Measurement-Period-LTE (1656) code changed to Measurement-Period-LTE (1655).
     62      - Measurement-Period-UMTS (1655) code changed to Measurement-Period-UMTS (1656).
     63      - MME-LocationInformation (1600) renamed to MME-Location-Information(1600).
     64      - PDG-Address (895) Address removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     65      - PDG-Charging-Id (896) Unsigned32 removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     66      - PDN-Connection-ID (1065) flag M MUST NOT.
     67      - PoC-User-Role-info-Units (1254) renamed to PoC-User-Role-Info-Units (1254).
     68      - PS-to-CS-Session-Continuity (1099) flag M MUST NOT.
     69      - SS-Status (1477) type changed from Grouped to OctetString.
     70      - Status (2702) renamed to Status-AS-Code (2702).
     71      - WAG-Address (890) Address removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     72      - WAG-PLMN-Id (891) OctetString removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     73      - WLAN-Information (875) Grouped removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     74      - WLAN-Radio-Container (892) Grouped removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     75      - WLAN-Session-Id (1246) UTF8String removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     76      - WLAN-Technology (893) Unsigned32 removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     77      - WLAN-UE-Local-IPAddress (894) Address removed in 3GPP TS 32.299 V12.6.0 (2014-09).
     78    - AVP renames:
     79      - Rename Call-Barring-Infor-List (1488) to Call-Barring-Info (1488).
     80      - Rename LCS-Requestor-Id (1239) to LCS-Requestor-ID (1239).
     81      - Rename LCS-Requestor-Id-String (1240) to LCS-Requestor-ID-String (1240).
     82      - Rename MBMSGW-Address (2307) to MBMS-GW-Address (2307).
     83      - Rename MME-LocationInformation (1600) to MME-Location-Information(1600).
     84      - Rename PoC-User-Role-info-Units (1254) to PoC-User-Role-Info-Units (1254).
     85      - Rename Status (2702) to Status-AS-Code (2702).
     86    - AVP name conflicts:
     87      - Time-Window (3818) in 3GPP TS 29.345 V12.1.0 (2014-12) predates
     88        Time-Window-29.154 (4204) in 3GPP TS 29.154 V13.1.0 (2016-03).
     89    - Add Enumerated(3GPP/Experimental-Result-Code). 145 values.
     90    - Update standards:
     91      - 3GPP TS 29.061 V15.5.0 (2018-12). 15 AVPs.
     92      - 3GPP TS 29.173 V15.0.0 (2018-06). 1 AVP.
     93      - 3GPP TS 29.212 V15.9.0 (2019-12). 46 AVPs.
     94      - 3GPP TS 29.214 V15.7.0 (2019-09). 27 AVPs.
     95      - 3GPP TS 29.229 V15.2.0 (2019-09). 8 AVPs.
     96      - 3GPP TS 29.272 V15.10.0 (2019-12). 44 AVPs.
     97      - 3GPP TS 29.329 V15.2.0 (2019-09). 5 AVPs.
     98      - 3GPP TS 32.299 V15.7.0 (2019-06). 154 AVPs.
     99    - Add standards:
     100      - 3GPP TS 29.109 V15.0.0 (2017-06). 21 AVPs.
     101      - 3GPP TS 29.128 V15.6.0 (2019-09). 25 AVPs.
     102      - 3GPP TS 29.153 V15.1.0 (2019-09). 2 AVPs.
     103      - 3GPP TS 29.154 V15.3.0 (2019-09). 16 AVPs.
     104      - 3GPP TS 29.172 V15.2.0 (2019-12). 66 AVPs.
     105      - 3GPP TS 29.209 V6.8.0 (2011-09). 2 AVPs.
     106      - 3GPP TS 29.215 V15.2.0 (2019-09). 9 AVPs.
     107      - 3GPP TS 29.217 V15.1.0 (2019-09). 14 AVPs.
     108      - 3GPP TS 29.219 V15.3.0 (2019-09). 7 AVPs.
     109      - 3GPP TS 29.234 V11.2.0 (2013-06). 19 AVPs.
     110      - 3GPP TS 29.273 V15.4.0 (2019-09). 40 AVPs.
     111      - 3GPP TS 29.283 V15.1.0 (2019-09). 16 AVPs.
     112      - 3GPP TS 29.336 V15.7.0 (2019-09). 79 AVPs.
     113      - 3GPP TS 29.337 V15.0.0 (2018-06). 4 AVPs.
     114      - 3GPP TS 29.338 V15.1.0 (2018-12). 34 AVPs.
     115      - 3GPP TS 29.343 V15.1.0 (2019-09). 13 AVPs.
     116      - 3GPP TS 29.344 V15.1.0 (2019-09). 7 AVPs.
     117      - 3GPP TS 29.345 V15.1.0 (2019-09). 68 AVPs.
     118      - 3GPP TS 29.368 V15.1.0 (2019-09). 12 AVPs.
     119      - 3GPP TS 29.388 V15.1.0 (2019-09). 3 AVPs.
     120      - 3GPP TS 29.389 V15.1.0 (2019-09). 3 AVPs.
     121      - 3GPP TS 29.468 V15.8.0 (2019-12). 33 AVPs.
     122      - 3GPP TS 29.561 V16.3.0 (2020-03). 9 AVPs.
     123
    1124freediameter (1.4.0) RELEASED; urgency=low
    2125
  • include/freeDiameter/libfdcore.h

    r1425 r1540  
    152152                unsigned pr_tcp : 1;    /* prefer TCP over SCTP */
    153153                unsigned tls_alg: 1;    /* TLS algorithm for initiated cnx. 0: separate port. 1: inband-security (old) */
     154                unsigned no_bind: 1;    /* disable client bind to cnf_endpoints if non configured (bind all) */
    154155        }                cnf_flags;
    155156       
  • libfdcore/cnxctx.c

    r1419 r1540  
    331331}
    332332
    333 /* Same for SCTP, accepts a list of remote addresses to connect to (see sctp_connectx for how they are used) */
    334 struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list)
     333/* Same for SCTP, accepts a list of remote addresses to connect to (see sctp_connectx for how they are used).
     334 * If src_list is not NULL and not empty, list of local addresses to connect from via sctp_bindx(). */
     335struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list)
    335336{
    336337#ifdef DISABLE_SCTP
     
    345346        sSS primary;
    346347
    347         TRACE_ENTRY("%p", list);
     348        TRACE_ENTRY("%p %p", list, src_list);
    348349        CHECK_PARAMS_DO( list && !FD_IS_LIST_EMPTY(list), return NULL );
    349350
     351        /* Log SCTP association source and destination endpoints */
     352        {
     353                char * buf = NULL;
     354                size_t len = 0, offset = 0;
     355                CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, "Connecting SCTP endpoints"), );
     356                CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, " source: "), );
     357                if (src_list && !FD_IS_LIST_EMPTY(src_list)) {
     358                        CHECK_MALLOC_DO( fd_ep_dump( &buf, &len, &offset, 0, 0, src_list ), );
     359                } else {
     360                        CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, "(ANY)"), );
     361                }
     362                CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, ", destination: "), );
     363                CHECK_MALLOC_DO( fd_ep_dump( &buf, &len, &offset, 0, 0, list ), );
     364                LOG_D("%s", buf ?: "Error determining SCTP endpoints");
     365                free(buf);
     366        }
     367
    350368        fd_sa_sdump_numeric(sa_buf, &((struct fd_endpoint *)(list->next))->sa);
    351369
     
    353371
    354372        {
    355                 int ret = fd_sctp_client( &sock, no_ip6, port, list );
     373                int ret = fd_sctp_client( &sock, no_ip6, port, list, src_list );
    356374                if (ret != 0) {
    357375                        LOG_D("SCTP connection to [%s,...] failed: %s", sa_buf, strerror(ret));
  • libfdcore/cnxctx.h

    r1421 r1540  
    118118int fd_sctp_create_bind_server( int * sock, int family, struct fd_list * list, uint16_t port );
    119119int fd_sctp_listen( int sock );
    120 int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list );
     120int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list );
    121121int fd_sctp_get_local_ep(int sock,  struct fd_list * list);
    122122int fd_sctp_get_remote_ep(int sock, struct fd_list * list);
  • 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) {
  • libfdcore/fdcore-internal.h

    r1397 r1540  
    343343struct cnxctx * fd_cnx_serv_accept(struct cnxctx * serv);
    344344struct cnxctx * fd_cnx_cli_connect_tcp(sSA * sa, socklen_t addrlen);
    345 struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list);
     345struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list);
    346346int             fd_cnx_start_clear(struct cnxctx * conn, int loop);
    347347void            fd_cnx_sethostname(struct cnxctx * conn, DiamId_t hn);
  • libfdcore/p_cnx.c

    r1203 r1540  
    262262                switch (nc->proto) {
    263263                        case IPPROTO_TCP:
     264/* TODO: use no_bind and first of cnf_endpoints of nc->ss.sa_family ? */
    264265                                cnx = fd_cnx_cli_connect_tcp((sSA *)&nc->ss, sSAlen(&nc->ss));
    265266                                break;
     
    267268                        case IPPROTO_SCTP:
    268269                                cnx = fd_cnx_cli_connect_sctp((peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP) ? 1 : fd_g_config->cnf_flags.no_ip6,
    269                                                         nc->port, &peer->p_hdr.info.pi_endpoints);
     270                                                        nc->port, &peer->p_hdr.info.pi_endpoints,
     271                                                        fd_g_config->cnf_flags.no_bind ? NULL : &fd_g_config->cnf_endpoints);
    270272                                break;
    271273#endif /* DISABLE_SCTP */
  • libfdcore/sctp.c

    r1543 r1544  
    5959#endif /* USE_DEFAULT_SCTP_RTX_PARAMS */
    6060
     61
     62DECLARE_FD_DUMP_PROTOTYPE(fd_sa_dump_array, sSA * saddrs, int saddrs_count)
     63{
     64        union {
     65                sSA     *sa;
     66                uint8_t *buf;
     67        } ptr;
     68        int i;
     69        int salen;
     70
     71        FD_DUMP_HANDLE_OFFSET();
     72
     73        ptr.sa = saddrs;
     74        for (i = 0; i < saddrs_count; i++) {
     75                salen = sSAlen(ptr.sa);
     76                if (salen == 0) {
     77                        LOG_E("fd_sa_dump_array: Unknown sockaddr family");
     78                        break;
     79                }
     80                if (i > 0) {
     81                        CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " "), return NULL);
     82                }
     83                CHECK_MALLOC_DO( fd_sa_dump( FD_DUMP_STD_PARAMS, ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV), return NULL);
     84                ptr.buf += salen;
     85        }
     86        return *buf;
     87}
     88
    6189/* Pre-binding socket options -- # streams read in config */
    6290static int fd_setsockopt_prebind(int sk)
     
    815843                        goto redo;
    816844                }
    817                
    818                 #if 0
    819                         union {
    820                                 sSA     *sa;
    821                                 uint8_t *buf;
    822                         } ptr;
    823                         int i;
    824                         ptr.sa = sar;
    825                         fd_log_debug("Calling sctp_bindx with the following address array:");
    826                         for (i = 0; i < count; i++) {
    827                                 TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
    828                                 ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6) ;
    829                         }
    830                 #endif
    831                
     845
     846                /* Debug: show bound addresses */
     847                {
     848                        char * buf = NULL;
     849                        size_t len = 0;
     850                        CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, sar, count), );
     851                        LOG_D("SCTP server binding local addresses: %s", buf);
     852                        free(buf);
     853                }
     854
    832855                /* Bind to this array */
    833856                CHECK_SYS(  sctp_bindx(*sock, sar, count, SCTP_BINDX_ADD_ADDR)  );
     
    841864       
    842865        /* Debug: show all local listening addresses */
    843         #if 0
    844                 sSA *sar;
    845                 union {
    846                         sSA     *sa;
    847                         uint8_t *buf;
    848                 } ptr;
    849                 int sz;
    850                
     866        {
     867                sSA *sar = NULL;
     868                int sz = 0;
     869                char * buf = NULL;
     870                size_t len = 0;
     871
    851872                CHECK_SYS(  sz = sctp_getladdrs(*sock, 0, &sar)  );
    852                
    853                 fd_log_debug("SCTP server bound on :");
    854                 for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) {
    855                         TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
    856                 }
     873
     874                CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, sar, sz), );
     875                LOG_D("SCTP server locally bound addresses: %s", buf);
    857876                sctp_freeladdrs(sar);
    858         #endif
     877                free(buf);
     878        }
    859879
    860880        return 0;
     
    870890
    871891/* Create a client socket and connect to remote server */
    872 int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list )
     892int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list )
    873893{
    874894        int family;
     
    880900        int count = 0;
    881901        int ret;
     902        int bind_default = 1;   /* enable ASCONF in postbind */
    882903       
    883904        sar.buf = NULL;
    884905       
    885         TRACE_ENTRY("%p %i %hu %p", sock, no_ip6, port, list);
     906        TRACE_ENTRY("%p %i %hu %p %p", sock, no_ip6, port, list, src_list);
    886907        CHECK_PARAMS( sock && list && (!FD_IS_LIST_EMPTY(list)) );
     908        CHECK_PARAMS( !src_list || (src_list && (!FD_IS_LIST_EMPTY(src_list))) );
    887909       
    888910        if (no_ip6) {
     
    900922        /* Set the socket options */
    901923        CHECK_FCT_DO( ret = fd_setsockopt_prebind(*sock), goto out );
    902        
     924
     925        /* Bind to explicit source addresses if requested */
     926        if (src_list && !FD_IS_LIST_EMPTY(src_list)) {
     927                sSA * bindsar = NULL; /* array of addresses */
     928                size_t sz = 0; /* size of the array */
     929                int sarcount = 0; /* number of sock addr in the array */
     930
     931                /* Create the array of configured addresses */
     932                CHECK_FCT_DO( ret = add_addresses_from_list_mask((void *)&bindsar, &sz, &sarcount, family, 0, src_list, EP_FL_CONF, EP_FL_CONF), goto out );
     933
     934                if (sarcount) {
     935                        char * buf = NULL;
     936                        size_t len = 0;
     937                        CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, bindsar, sarcount), goto out );
     938                        LOG_A("SCTP client binding local addresses: %s", buf);
     939                        free(buf);
     940
     941                        CHECK_SYS_DO( ret = sctp_bindx(*sock, bindsar, sarcount, SCTP_BINDX_ADD_ADDR), goto out );
     942                }
     943
     944                /* Disable ASCONF option in postbind */
     945                bind_default = 0;
     946
     947                /* We don't need bindsar anymore */
     948                free(bindsar);
     949        }
     950
    903951        /* Create the array of addresses, add first the configured addresses, then the discovered, then the other ones */
    904952        CHECK_FCT_DO( ret = add_addresses_from_list_mask(&sar.buf, &size, &count, family, htons(port), list, EP_FL_CONF,              EP_FL_CONF        ), goto out );
     
    907955       
    908956        /* Try connecting */
    909         LOG_A("Attempting SCTP connection (%d addresses attempted) ", count);
    910                
    911 #if 0
    912                 /* Dump the SAs */
    913                 union {
    914                         uint8_t *buf;
    915                         sSA     *sa;
    916                         sSA4    *sin;
    917                         sSA6    *sin6;
    918                 } ptr;
    919                 int i;
    920                 ptr.buf = sar.buf;
    921                 for (i=0; i< count; i++) {
    922                         TRACE_sSA(FD_LOG_DEBUG, FULL, "  - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
    923                         ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6);
    924                 }
    925 #endif
    926        
     957        {
     958                char * buf = NULL;
     959                size_t len = 0;
     960                CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, sar.sa, count), goto out );
     961                LOG_A("SCTP client connecting to addresses: %s", buf);
     962                free(buf);
     963        }
     964
    927965        /* Bug in some Linux kernel, the sctp_connectx is not a cancellation point. To avoid blocking freeDiameter, we allow async cancel here */
    928966        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
     
    945983       
    946984        /* Set the remaining sockopts */
    947         CHECK_FCT_DO( ret = fd_setsockopt_postbind(*sock, 1),
     985        CHECK_FCT_DO( ret = fd_setsockopt_postbind(*sock, bind_default),
    948986                {
    949987                        CHECK_SYS_DO( shutdown(*sock, SHUT_RDWR), /* continue */ );
     
    9831021#if 0
    9841022                char sa_buf[sSA_DUMP_STRLEN];
    985                 fd_sa_sdump_numeric(sa_buf, &status.sstat_primary.spinfo_address);
     1023                fd_sa_sdump_numeric(sa_buf, (sSA *)&status.sstat_primary.spinfo_address);
    9861024                fd_log_debug( "SCTP_STATUS : sstat_state                  : %i" , status.sstat_state);
    9871025                fd_log_debug( "              sstat_rwnd                   : %u" , status.sstat_rwnd);
     
    12191257        if (mhdr.msg_flags & MSG_NOTIFICATION) {
    12201258                union sctp_notification * notif = (union sctp_notification *) data;
     1259                char sa_buf[sSA_DUMP_STRLEN];
    12211260               
    12221261                TRACE_DEBUG(FULL, "Received %zdb data of notification on socket %d", datasize, conn->cc_socket);
     
    12361275                        case SCTP_PEER_ADDR_CHANGE:
    12371276                                TRACE_DEBUG(FULL, "Received SCTP_PEER_ADDR_CHANGE notification");
    1238                                 /* TRACE_sSA(FD_LOG_DEBUG, ANNOYING, "    intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" ); */
     1277                                fd_sa_sdump_numeric(sa_buf, (sSA *)&(notif->sn_paddr_change.spc_aaddr));
     1278                                TRACE_DEBUG(ANNOYING, "    intf_change : %s", sa_buf);
    12391279                                TRACE_DEBUG(ANNOYING, "          state : %d", notif->sn_paddr_change.spc_state);
    12401280                                TRACE_DEBUG(ANNOYING, "          error : %d", notif->sn_paddr_change.spc_error);
  • libfdproto/fifo.c

    r1405 r1539  
    171171{
    172172        struct fifo * q;
    173 #ifdef DEBUG
     173#ifndef NDEBUG
    174174        int loops = 0;
    175175#endif
     
    228228int fd_fifo_move ( struct fifo * old, struct fifo * new, struct fifo ** loc_update )
    229229{
    230 #ifdef DEBUG
     230#ifndef NDEBUG
    231231        int loops = 0;
    232232#endif
     
    421421                        queue->thrs_push-- ;
    422422
    423 #ifndef DEBUG
     423#ifdef NDEBUG
    424424                        (void)ret;
    425425#endif
  • libfdproto/messages.c

    r1442 r1539  
    22852285        if (msg->msg_model != NULL) {
    22862286                /* Check if this model is still valid for the message data */
    2287 #ifdef DEBUG
     2287#ifndef NDEBUG
    22882288                enum dict_object_type    dicttype;
    22892289#endif
  • 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.