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

loewis at users.sourceforge.net loewis at users.sourceforge.net
Tue Aug 5 00:26:48 EDT 2003


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

Modified Files:
      Tag: release23-maint
	socketmodule.c 
Log Message:
Patch #781722: Reject AF_INET6 if IPv6 is disabled.


Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.271
retrieving revision 1.271.6.1
diff -C2 -d -r1.271 -r1.271.6.1
*** socketmodule.c	17 Jul 2003 16:58:48 -0000	1.271
--- socketmodule.c	5 Aug 2003 06:26:46 -0000	1.271.6.1
***************
*** 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