Skip to content

Commit fdf7de4

Browse files
committed
sessprep: fix detection of unbracketed IPv6 literals.
The centralisation I did in commit e3796cb introduced a foolish sense error, in which I was supposed to be treating an unbracketed colon in CONF_hostname as separating host name from a port-number- shaped suffix if it _was_ the only one, and instead, accidentally did so if it _wasn't_.
1 parent f433c82 commit fdf7de4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sessprep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void prepare_session(Conf *conf)
6363
* _more_ than one (un-IPv6-bracketed) colon.
6464
*/
6565
p = host_strchr(host, ':');
66-
if (p && p != host_strrchr(host, ':')) {
66+
if (p && p == host_strrchr(host, ':')) {
6767
*p = '\0';
6868
}
6969

0 commit comments

Comments
 (0)