Grokbase Groups PHP php-cvs May 2013
FAQ
Commit: 3828f6227b188bd0c8d829a375ebf51faf67c448
Author: Boris Lytochkin <lytboris@php.net> Fri, 3 May 2013 12:13:50 +0400
Parents: 5af2c5d20244a7cb3c9345ef4cf8c81997eb0984
Branches: PHP-5.4 PHP-5.5 master

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3828f6227b188bd0c8d829a375ebf51faf67c448

Log:
Fix bug #64765 (enclose IPv6 address into square brackets)

Bugs:
https://bugs.php.net/64765

Changed paths:
M ext/snmp/snmp.c


Diff:
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 0ae140f..fad5d05 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -1162,9 +1162,10 @@ static int netsnmp_session_init(php_snmp_session **session_p, int version, char
continue;
}
if ((*res)->sa_family == AF_INET6) {
- strcpy(session->peername, "udp6:");
+ strcpy(session->peername, "udp6:[");
pptr = session->peername + strlen(session->peername);
inet_ntop((*res)->sa_family, &(((struct sockaddr_in6*)(*res))->sin6_addr), pptr, MAX_NAME_LEN);
+ strcat(pptr, "]");
} else if ((*res)->sa_family == AF_INET) {
inet_ntop((*res)->sa_family, &(((struct sockaddr_in*)(*res))->sin_addr), pptr, MAX_NAME_LEN);
} else {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupphp-cvs @
categoriesphp
postedMay 3, '13 at 8:42a
activeMay 3, '13 at 8:42a
posts1
users1
websitephp.net

1 user in discussion

Boris Lytochkin: 1 post

People

Translate

site design / logo © 2019 Grokbase