* (fhandler_socket::getsockname): Fix length returned for unbound
AF_LOCAL sockets. (fhandler_socket::getpeername): Ditto. * net.cc (socketpair): Don't set sun_path and peer_sun_path to make sure getsockname and getpeername return the correct values for AF_LOCAL sockets.
This commit is contained in:
@@ -2866,8 +2866,6 @@ socketpair (int family, int type, int protocol, int *sb)
|
||||
|
||||
if (sb0 >= 0 && fdsock (sb0, dev, insock))
|
||||
{
|
||||
((fhandler_socket *) sb0)->set_sun_path ("");
|
||||
((fhandler_socket *) sb0)->set_peer_sun_path ("");
|
||||
((fhandler_socket *) sb0)->set_addr_family (family);
|
||||
((fhandler_socket *) sb0)->set_socket_type (type);
|
||||
((fhandler_socket *) sb0)->connect_state (connected);
|
||||
@@ -2878,8 +2876,6 @@ socketpair (int family, int type, int protocol, int *sb)
|
||||
|
||||
if (sb1 >= 0 && fdsock (sb1, dev, outsock))
|
||||
{
|
||||
((fhandler_socket *) sb1)->set_sun_path ("");
|
||||
((fhandler_socket *) sb1)->set_peer_sun_path ("");
|
||||
((fhandler_socket *) sb1)->set_addr_family (family);
|
||||
((fhandler_socket *) sb1)->set_socket_type (type);
|
||||
((fhandler_socket *) sb1)->connect_state (connected);
|
||||
|
Reference in New Issue
Block a user