[Python-checkins] python/dist/src/Modules socketmodule.c, 1.271, 1.272

loewis at users.sourceforge.net loewis at users.sourceforge.net
Tue Aug 5 00:25:08 EDT 2003


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv5991/Modules

Modified Files:
	socketmodule.c 
Log Message:
Patch #781722: Reject AF_INET6 if IPv6 is disabled. Will backport to 2.3.


Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.271
retrieving revision 1.272
diff -C2 -d -r1.271 -r1.272
*** socketmodule.c	17 Jul 2003 16:58:48 -0000	1.271
--- socketmodule.c	5 Aug 2003 06:25:06 -0000	1.272
***************
*** 2963,2966 ****
--- 2963,2974 ----
  	}
  
+ #ifndef ENABLE_IPV6
+ 	if(af == AF_INET6) {
+ 		PyErr_SetString(socket_error,
+ 				"can't use AF_INET6, IPv6 is disabled");
+ 		return NULL;
+ 	}
+ #endif 
+ 
  	retval = inet_pton(af, ip, packed);
  	if (retval < 0) {





More information about the Python-checkins mailing list