pgpool2.git / summary / log / commit / refs
commit 5dd396d448ce0e9c35b4ab51f4adc316c486a3e2
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Sat Jan 09 09:15:07 2010 +0000
Fix ProcessFrontendResponse not to accept invalid frotend packet.
Patch contributed by Xavier Noguer.
pool_proto_modules.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pool_proto_modules.c b/pool_proto_modules.c
index b41352da2..bd1f319bd 100644
--- a/pool_proto_modules.c
+++ b/pool_proto_modules.c
@@ -5,7 +5,7 @@
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2009 PgPool Global Development Group
+ * Copyright (c) 2003-2010 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -1720,7 +1720,9 @@ POOL_STATUS ProcessFrontendResponse(POOL_CONNECTION *frontend,
/* fall through */
default:
- if (MAJOR(backend) == PROTO_MAJOR_V3)
+ if ((MAJOR(backend) == PROTO_MAJOR_V3) &&
+ (fkind == 'S' || fkind == 'H' || fkind == 'D' || fkind == 'f'||
+ fkind == 'C' || fkind == 'B' || fkind == 'F' || fkind == 'd' || fkind == 'c'))
{
if (MASTER_SLAVE &&
(TSTATE(backend) != 'I' || receive_extended_begin))
[parent: d7e0d340ba9e]