From: Alexander Gozman Date: Mon, 28 Jul 2014 16:22:32 +0000 (+0400) Subject: Add input interface's name to JSON log X-Git-Tag: suricata-2.1beta1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6dbf627b2e7c9d75d7ecda40e7a46357fdf88d7;p=thirdparty%2Fsuricata.git Add input interface's name to JSON log --- diff --git a/src/output-json.c b/src/output-json.c index 2bcca89d83..1c65e087ab 100644 --- a/src/output-json.c +++ b/src/output-json.c @@ -57,6 +57,7 @@ #include "util-optimize.h" #include "util-buffer.h" #include "util-logopenfile.h" +#include "util-device.h" #ifndef HAVE_LIBJANSSON @@ -245,6 +246,11 @@ json_t *CreateJSONHeader(Packet *p, int direction_sensitive, char *event_type) if (sensor_id >= 0) json_object_set_new(js, "sensor_id", json_integer(sensor_id)); + /* input interface */ + if (p->livedev) { + json_object_set_new(js, "in_iface", json_string(p->livedev->dev)); + } + /* pcap_cnt */ if (p->pcap_cnt != 0) { json_object_set_new(js, "pcap_cnt", json_integer(p->pcap_cnt));