Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lukas However
OpenLDAP
Commits
8ebd0650
Commit
8ebd0650
authored
Mar 19, 2021
by
Lukas However
Committed by
Quanah Gibson-Mount
Mar 25, 2021
Browse files
ITS#8847 Print local address in connection dump
parent
c6e521fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/request.c
View file @
8ebd0650
...
...
@@ -863,6 +863,20 @@ ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all )
lc
->
lconn_server
->
lud_port
,
(
lc
->
lconn_sb
==
ld
->
ld_sb
)
?
" (default)"
:
""
);
}
if
(
lc
->
lconn_sb
!=
NULL
)
{
char
from
[
LUTIL_ADDRLEN
];
struct
berval
frombv
=
BER_BVC
(
from
);
ber_socket_t
sb
;
if
(
ber_sockbuf_ctrl
(
lc
->
lconn_sb
,
LBER_SB_OPT_GET_FD
,
&
sb
)
==
1
)
{
struct
sockaddr_in
sin
;
socklen_t
len
=
sizeof
(
sin
);
if
(
getsockname
(
sb
,
(
struct
sockaddr
*
)
&
sin
,
&
len
)
==
0
)
{
lutil_sockaddrstr
(
(
Sockaddr
*
)
&
sin
,
&
frombv
);
Debug1
(
LDAP_DEBUG_TRACE
,
"* from: %s
\n
"
,
(
from
==
NULL
)
?
"(null)"
:
from
);
}
}
}
Debug2
(
LDAP_DEBUG_TRACE
,
" refcnt: %d status: %s
\n
"
,
lc
->
lconn_refcnt
,
(
lc
->
lconn_status
==
LDAP_CONNST_NEEDSOCKET
)
?
"NeedSocket"
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment