]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve.flow: log original and expected app_protocols
authorVictor Julien <victor@inliniac.net>
Fri, 5 May 2017 08:54:06 +0000 (10:54 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 8 May 2017 11:29:50 +0000 (13:29 +0200)
Log protocols if they are available.

src/output-json-flow.c

index 5df87d842f7190ee89202c716a7e4dcccc029258..19f94bab3c99d35d497c63ad5763ce1739e4813b 100644 (file)
@@ -198,6 +198,14 @@ static void JsonFlowLogJSON(JsonFlowLogThread *aft, json_t *js, Flow *f)
         json_object_set_new(js, "app_proto_tc",
                 json_string(AppProtoToString(f->alproto_tc)));
     }
+    if (f->alproto_orig != f->alproto && f->alproto_orig != ALPROTO_UNKNOWN) {
+        json_object_set_new(js, "app_proto_orig",
+                json_string(AppProtoToString(f->alproto_orig)));
+    }
+    if (f->alproto_expect != f->alproto && f->alproto_expect != ALPROTO_UNKNOWN) {
+        json_object_set_new(js, "app_proto_expected",
+                json_string(AppProtoToString(f->alproto_expect)));
+    }
 
     json_object_set_new(hjs, "pkts_toserver",
             json_integer(f->todstpktcnt));