php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64765
Patch snmp-ipv6-patch revision 2013-05-03 00:53 UTC by gmcgraw at udel dot edu
revision 2013-05-02 22:47 UTC by gmcgraw at udel dot edu

Patch snmp-ipv6-patch for SNMP related Bug #64765

Patch version 2013-05-03 00:53 UTC

Return to Bug #64765 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2013-05-03 00:53 UTC | 2013-05-02 22:47 UTC

Developer: gmcgraw@udel.edu


 *** php-5.4.9/ext/snmp/snmp.c	Wed Nov 21 05:12:20 2012
 --- php-5.4.9-r2/ext/snmp/snmp.c	Thu May  2 21:56:03 2013
 *** php-5.4.1/ext/snmp/snmp.c	Tue Apr 24 16:47:33 2012
 --- php-5.4.1-r2/ext/snmp/snmp.c	Thu May  2 22:51:56 2013
  ***************
  *** 1161,1167 ****
    			continue;
    		}


  ! 		sprintf(pptr, ":%d", session->remote_port);
    	}
    
    	php_network_freeaddresses(psal);
 --- 1191,1201 ----
 --- 1191,1205 ----
    	/* put back non-standard SNMP port */
    	if (session->remote_port != SNMP_PORT) {
    		pptr = session->peername + strlen(session->peername);
 ! 		sprintf(pptr, "]:%d", session->remote_port);
 ! 		if ((*res)->sa_family == AF_INET6) { 
 ! 			sprintf(pptr, "]:%d", session->remote_port);
 ! 		} else {
 ! 			sprintf(pptr, ":%d", session->remote_port);
 ! 		}
  ! 	} else if ((*res)->sa_family == AF_INET6) { 
  ! 		/* Properly end the ipv6 address, just like net-SNMP likes it */
  ! 		pptr = session->peername + strlen(session->peername);
  ! 		sprintf(pptr, "]");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC