From a03a402b831b82329ab0d8fae18fd23d0d414708 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 21 Oct 2011 12:01:49 +0200 Subject: [PATCH] unified2: set datalink to correct value. The value of datalink could have been modified if the logging of segment was attempted. This patch restore it to a correct value. --- src/alert-unified2-alert.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/alert-unified2-alert.c b/src/alert-unified2-alert.c index e5f0a9c90c..36d054f0ff 100644 --- a/src/alert-unified2-alert.c +++ b/src/alert-unified2-alert.c @@ -690,6 +690,8 @@ int Unified2PacketTypeAlert (Unified2AlertThread *aun, Packet *p, void *stream, len += GET_PKT_LEN(p); aun->length = len; + /* Unified 2 packet header is the one of the packet. */ + phdr->linktype = htonl(p->datalink); #ifdef HAVE_OLD_BARNYARD2 /* Fake datalink to avoid bug with old barnyard2 */ if (PKT_IS_IPV6(p) && (!p->ethh)) {