OSDN Git Service

Fix pfilter module.
[ultramonkey-l7/ultramonkey-l7-v2.git] / module / protocol / protomod_pfilter.c
index 0490f5f..c285193 100644 (file)
@@ -93,7 +93,7 @@ static struct l7vs_protomod pfilter_protomod = {
        NULL,           /* handle */
        "pfilter",          /* modname */
        0,              /* refcnt */
-       0,              /* fast schedule */
+       1,              /* fast schedule */
        create,         /* create function */
        compare,        /* compare function */
        select_dest,    /* select_dest function */
@@ -455,7 +455,6 @@ select_dest(struct l7vs_service *srv, struct l7vs_conn *conn,
        struct l7vs_pfilter_service *pfilter_service;
        int ret;
        int return_value = 0;
-    std::string packet_data;
 
        /*-------- DEBUG LOG --------*/
        if (pfilter_protomod.get_log_level != NULL &&
@@ -663,7 +662,9 @@ analyze_cldata(struct l7vs_service *srv, struct l7vs_conn *conn,
 #else
        if ( boost::regex_search(packet_data, pfilter_service->regex) ) {
 #endif
-               return_value = -1;
+               PUT_LOG_INFO(pfilter_protomod, LOG_CAT_L7VSD_PROTOCOL, 20,
+                   "Connection reset by packet filter module");
+               conn->ciom->status = iomux_conn_disconnected;
                goto analyze_cldata_out;
        }