Opened 6 years ago

Last modified 5 years ago

#12313 new Bugs

sockaddr_storage_type doesn't have a member named ss_len

Reported by: Takatoshi Kondo <redboltz@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

If the configuration macro BOOST_ASIO_HAS_GETADDRINFO is not defined, compile error is occurred the following line: https://github.com/boostorg/asio/blob/boost-1.61.0/include/boost/asio/detail/impl/socket_ops.ipp#L3318

Because the class sockaddr_storage_type doen't have a member variable ss_len.

See: https://github.com/boostorg/asio/blob/boost-1.61.0/include/boost/asio/detail/socket_types.hpp#L111

Change History (1)

comment:1 by piotr.nowinski, 5 years ago

Hi, We have just bump into the same issue. We don't want to use getaddrinfo on fedora linux because it's extremely slow when multiple addresses are added to the same interface (e.g. 30k).

Problem seems to be very simple, we just remove: line 338 (tmp_addr.ss_len = addrlen) in socket_ops.ipp. I hope someone will fix the issue in next release.

Note: See TracTickets for help on using tickets.