• R/O
  • HTTP
  • SSH
  • HTTPS

ultramonkey-l7-v2: コミット

UltraMonkey-L7 V2(single-thread implementation)


コミットメタ情報

リビジョン946d2ce25d62d101d3c27a3b343cdaf1788dd2b6 (tree)
日時2010-06-08 01:42:51
作者Kohei TANUMA <tanuma@user...>
コミッターKohei TANUMA

ログメッセージ

Fix pfilter module.

変更サマリ

差分

--- a/module/protocol/protomod_pfilter.c
+++ b/module/protocol/protomod_pfilter.c
@@ -93,7 +93,7 @@ static struct l7vs_protomod pfilter_protomod = {
9393 NULL, /* handle */
9494 "pfilter", /* modname */
9595 0, /* refcnt */
96- 0, /* fast schedule */
96+ 1, /* fast schedule */
9797 create, /* create function */
9898 compare, /* compare function */
9999 select_dest, /* select_dest function */
@@ -455,7 +455,6 @@ select_dest(struct l7vs_service *srv, struct l7vs_conn *conn,
455455 struct l7vs_pfilter_service *pfilter_service;
456456 int ret;
457457 int return_value = 0;
458- std::string packet_data;
459458
460459 /*-------- DEBUG LOG --------*/
461460 if (pfilter_protomod.get_log_level != NULL &&
@@ -663,7 +662,9 @@ analyze_cldata(struct l7vs_service *srv, struct l7vs_conn *conn,
663662 #else
664663 if ( boost::regex_search(packet_data, pfilter_service->regex) ) {
665664 #endif
666- return_value = -1;
665+ PUT_LOG_INFO(pfilter_protomod, LOG_CAT_L7VSD_PROTOCOL, 20,
666+ "Connection reset by packet filter module");
667+ conn->ciom->status = iomux_conn_disconnected;
667668 goto analyze_cldata_out;
668669 }
669670
--- a/src/conn.c
+++ b/src/conn.c
@@ -931,6 +931,12 @@ l7vs_conn_client_receiving(struct l7vs_iomux *iom)
931931 }
932932 l7vs_conn_QoS_recvsize_register( conn, conn->cldata_len, QOS_UP );
933933 break;
934+ case iomux_conn_disconnected:
935+ /* Some protocol modules(*) analyzed client request packets,
936+ * then set iomux_conn_disconnected for destroying this connection.
937+ * (*) ex. protomod_pfilter module
938+ */
939+ break;
934940 default:
935941 //invalid status
936942 LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_PROGRAM,34, "error / invalid status(%d)", iom->status);
旧リポジトリブラウザで表示