Skip to content
Commit a870486d authored by Vernon Mauery's avatar Vernon Mauery
Browse files

bmcweb: remove boost::asio::local::stream_protocol::endpoint hack



With the obmc-console-server binding to the correct socket, this is not
needed.

Abstract unix sockets start with the nul-charater, but are not nul
terminated. In fact, the nul-character has no meaning in the path.
According to the man page unix(7),

abstract:  an abstract socket address is distinguished (from a pathname
           socket) by the fact that sun_path[0] is a null byte ('\0').
           The socket's address in  this  namespace is  given by the
           additional bytes in sun_path that are covered by the
           specified length of the address structure.  (Null bytes in
           the name have no special significance.)

This means that when calling bind/connect, the size of the sockaddr
structure is not sizeof(sockaddr_un), it is sizeof(sockaddr_un) -
sizeof(sun_path) + (path_len)

Change-Id: I2b19d0b9aa8e8ded9162890503c46cad95a6c7b6
Signed-off-by: default avatarVernon Mauery <vernon.mauery@linux.intel.com>
parent f6150403
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment