Navigation


Changeset 1136:140450615773 in freeDiameter for libfdcore/server.c


Ignore:
Timestamp:
May 16, 2013, 3:56:31 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Revert changeset 1122 (ADDRESS_AVP_INCLUDE_PORT) as this will create too much interop issues. The Host-IP-Address AVP is not normally used to discover peer address, but only for validation of the addresses where a packet is received from -- which is quite useless with a connected transport connection, but anyway...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/server.c

    r1122 r1136  
    342342        int empty_conf_ep = FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints);
    343343       
    344         struct fd_list filter_list = FD_LIST_INITIALIZER(filter_list);
    345        
    346344        /* SCTP */
    347345        if (!fd_g_config->cnf_flags.no_sctp) {
     
    449447        }
    450448       
    451         /* we will filter this list and create endpoints with port information */
    452         #ifdef ADDRESS_AVP_INCLUDE_PORT
    453         fd_list_move_end(&filter_list, &fd_g_config->cnf_endpoints);
    454         while (!FD_IS_LIST_EMPTY(&filter_list)) {
    455                 struct fd_endpoint * ep = (struct fd_endpoint *)filter_list.next;
    456                 in_port_t * port = NULL;
    457                 fd_list_unlink(&ep->chain);
    458                
    459                 switch( ep->sa.sa_family ) {
    460                 case AF_INET: port = &ep->sin.sin_port; break;
    461                 case AF_INET6: port = &ep->sin6.sin6_port; break;
    462                 }
    463                
    464                 if (port) {
    465                         if (fd_g_config->cnf_port) {
    466                                 *port = htons(fd_g_config->cnf_port);
    467                                 CHECK_FCT(fd_ep_add_merge( &fd_g_config->cnf_endpoints, &ep->sa, sSAlen(&ep->sa), ep->flags ));
    468                         }
    469                         if (fd_g_config->cnf_port_tls) {
    470                                 *port = htons(fd_g_config->cnf_port_tls);
    471                                 CHECK_FCT(fd_ep_add_merge( &fd_g_config->cnf_endpoints, &ep->sa, sSAlen(&ep->sa), ep->flags ));
    472                         }
    473                 }
    474                 free(ep);
    475         }
    476         #endif /* ADDRESS_AVP_INCLUDE_PORT */
    477        
    478449        {
    479450                char * buf = NULL;
Note: See TracChangeset for help on using the changeset viewer.