Navigation


Changeset 22:0b3b46da2c12 in freeDiameter for freeDiameter/config.c


Ignore:
Timestamp:
Oct 19, 2009, 6:43:09 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Progress on server code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/config.c

    r20 r22  
    229229        }
    230230       
     231        /* Validate local endpoints */
     232        if ((!FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) && (fd_g_config->cnf_flags.no_ip4 || fd_g_config->cnf_flags.no_ip6)) {
     233                struct fd_list * li;
     234                for ( li = fd_g_config->cnf_endpoints.next; li != &fd_g_config->cnf_endpoints; li = li->next) {
     235                        struct fd_endpoint * ep = (struct fd_endpoint *)li;
     236                        if ( (fd_g_config->cnf_flags.no_ip4 && (ep->ss.ss_family == AF_INET))
     237                           ||(fd_g_config->cnf_flags.no_ip6 && (ep->ss.ss_family == AF_INET6)) ) {
     238                                li = li->prev;
     239                                fd_list_unlink(&ep->chain);
     240                                if (TRACE_BOOL(INFO)) {
     241                                        fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : ");
     242                                        sSA_DUMP_NODE( &ep->ss, AI_NUMERICHOST );
     243                                        fd_log_debug("\n");
     244                                }
     245                                free(ep);
     246                        }
     247                }
     248        }
     249       
    231250        /* Configure TLS default parameters */
    232251        if (! fd_g_config->cnf_sec_data.prio_string) {
     
    239258        }
    240259        if (! fd_g_config->cnf_sec_data.dh_bits) {
    241                 TRACE_DEBUG(FULL, "Generating DH parameters...");
     260                if (TRACE_BOOL(INFO)) {
     261                        fd_log_debug("Generating Diffie-Hellman parameters of size %d (this takes a few seconds)... ", GNUTLS_DEFAULT_DHBITS);
     262                }
    242263                CHECK_GNUTLS_DO( gnutls_dh_params_generate2(
    243264                                        fd_g_config->cnf_sec_data.dh_cache,
    244265                                        GNUTLS_DEFAULT_DHBITS),
    245266                                 { TRACE_DEBUG(INFO, "Error in DH bits value : %d", GNUTLS_DEFAULT_DHBITS); return EINVAL; } );
    246                 TRACE_DEBUG(FULL, "DH parameters generated.");
    247         }
    248        
     267                if (TRACE_BOOL(INFO)) {
     268                        fd_log_debug("Done!\n");
     269                }
     270        }
    249271       
    250272        return 0;
Note: See TracChangeset for help on using the changeset viewer.