An Overlay-based
Virtual Network Substrate
SpoVNet

Changeset 7040 for source


Ignore:
Timestamp:
Dec 8, 2009, 6:18:14 PM (9 years ago)
Author:
mies
Message:

fixed v4/v6 bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/transport/tcpip/protlib/tp_over_tcp.cpp

    r7038 r7040  
    211211
    212212    struct sockaddr_in6 own_address;
    213     socklen_t own_address_len= sizeof(own_address);
    214         getsockname(new_socket, reinterpret_cast<struct sockaddr*>(&own_address), &own_address_len);
     213        if (v4_mode) {
     214                struct sockaddr_in own_address_v4;
     215                socklen_t own_address_len_v4 = sizeof(own_address_v4);
     216                getsockname(new_socket, reinterpret_cast<struct sockaddr*>(&own_address_v4), &own_address_len_v4);
     217                v4_to_v6(&own_address_v4, &own_address);
     218        } else {
     219                socklen_t own_address_len= sizeof(own_address);
     220                getsockname(new_socket, reinterpret_cast<struct sockaddr*>(&own_address), &own_address_len);
     221        }
    215222
    216223    Log(DEBUG_LOG,LOG_UNIMP, tpparam.name,">>--Connect-->> to " << addr.get_ip_str() << " port #" << addr.get_port()
Note: See TracChangeset for help on using the changeset viewer.