Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tero Saarni
OpenLDAP
Commits
b46547ad
Commit
b46547ad
authored
Mar 08, 2012
by
Howard Chu
Committed by
Quanah Gibson-Mount
Mar 09, 2012
Browse files
ITS
#7194
fix IPv6 URL detection
parent
19d11606
Changes
3
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/tls_g.c
View file @
b46547ad
...
...
@@ -651,12 +651,8 @@ tlsg_session_chkhost( LDAP *ld, tls_session *session, const char *name_in )
}
#ifdef LDAP_PF_INET6
if
(
name
[
0
]
==
'['
&&
strchr
(
name
,
']'
))
{
char
*
n2
=
ldap_strdup
(
name
+
1
);
*
strchr
(
n2
,
']'
)
=
0
;
if
(
inet_pton
(
AF_INET6
,
n2
,
&
addr
))
ntype
=
IS_IP6
;
LDAP_FREE
(
n2
);
if
(
inet_pton
(
AF_INET6
,
name
,
&
addr
))
{
ntype
=
IS_IP6
;
}
else
#endif
if
((
ptr
=
strrchr
(
name
,
'.'
))
&&
isdigit
((
unsigned
char
)
ptr
[
1
]))
{
...
...
libraries/libldap/tls_m.c
View file @
b46547ad
...
...
@@ -2694,12 +2694,8 @@ tlsm_session_chkhost( LDAP *ld, tls_session *session, const char *name_in )
}
#ifdef LDAP_PF_INET6
if
(
name
[
0
]
==
'['
&&
strchr
(
name
,
']'
))
{
char
*
n2
=
ldap_strdup
(
name
+
1
);
*
strchr
(
n2
,
']'
)
=
0
;
if
(
inet_pton
(
AF_INET6
,
n2
,
&
addr
))
ntype
=
IS_IP6
;
LDAP_FREE
(
n2
);
if
(
inet_pton
(
AF_INET6
,
name
,
&
addr
))
{
ntype
=
IS_IP6
;
}
else
#endif
if
((
ptr
=
strrchr
(
name
,
'.'
))
&&
isdigit
((
unsigned
char
)
ptr
[
1
]))
{
...
...
libraries/libldap/tls_o.c
View file @
b46547ad
...
...
@@ -501,12 +501,8 @@ tlso_session_chkhost( LDAP *ld, tls_session *sess, const char *name_in )
}
#ifdef LDAP_PF_INET6
if
(
name
[
0
]
==
'['
&&
strchr
(
name
,
']'
))
{
char
*
n2
=
ldap_strdup
(
name
+
1
);
*
strchr
(
n2
,
']'
)
=
0
;
if
(
inet_pton
(
AF_INET6
,
n2
,
&
addr
))
ntype
=
IS_IP6
;
LDAP_FREE
(
n2
);
if
(
inet_pton
(
AF_INET6
,
name
,
&
addr
))
{
ntype
=
IS_IP6
;
}
else
#endif
if
((
ptr
=
strrchr
(
name
,
'.'
))
&&
isdigit
((
unsigned
char
)
ptr
[
1
]))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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