UltraMonkey-L7 V2(single-thread implementation)
リビジョン | 946d2ce25d62d101d3c27a3b343cdaf1788dd2b6 (tree) |
---|---|
日時 | 2010-06-08 01:42:51 |
作者 | Kohei TANUMA <tanuma@user...> |
コミッター | Kohei TANUMA |
Fix pfilter module.
@@ -93,7 +93,7 @@ static struct l7vs_protomod pfilter_protomod = { | ||
93 | 93 | NULL, /* handle */ |
94 | 94 | "pfilter", /* modname */ |
95 | 95 | 0, /* refcnt */ |
96 | - 0, /* fast schedule */ | |
96 | + 1, /* fast schedule */ | |
97 | 97 | create, /* create function */ |
98 | 98 | compare, /* compare function */ |
99 | 99 | select_dest, /* select_dest function */ |
@@ -455,7 +455,6 @@ select_dest(struct l7vs_service *srv, struct l7vs_conn *conn, | ||
455 | 455 | struct l7vs_pfilter_service *pfilter_service; |
456 | 456 | int ret; |
457 | 457 | int return_value = 0; |
458 | - std::string packet_data; | |
459 | 458 | |
460 | 459 | /*-------- DEBUG LOG --------*/ |
461 | 460 | if (pfilter_protomod.get_log_level != NULL && |
@@ -663,7 +662,9 @@ analyze_cldata(struct l7vs_service *srv, struct l7vs_conn *conn, | ||
663 | 662 | #else |
664 | 663 | if ( boost::regex_search(packet_data, pfilter_service->regex) ) { |
665 | 664 | #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; | |
667 | 668 | goto analyze_cldata_out; |
668 | 669 | } |
669 | 670 |
@@ -931,6 +931,12 @@ l7vs_conn_client_receiving(struct l7vs_iomux *iom) | ||
931 | 931 | } |
932 | 932 | l7vs_conn_QoS_recvsize_register( conn, conn->cldata_len, QOS_UP ); |
933 | 933 | 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; | |
934 | 940 | default: |
935 | 941 | //invalid status |
936 | 942 | LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_PROGRAM,34, "error / invalid status(%d)", iom->status); |