int ret = 0;
LogFileCtx* file_ctx = NULL;
OutputCtx* output_ctx = NULL;
+ ConfNode *xff_node = NULL;
file_ctx = LogFileNewCtx();
if (file_ctx == NULL) {
output_ctx->DeInit = Unified2AlertDeInitCtx;
- ConfNode *xff_node = ConfNodeLookupChild(conf, "xff");
+ if (conf != NULL)
+ xff_node = ConfNodeLookupChild(conf, "xff");
if (xff_node != NULL && ConfNodeChildValueIsTrue(xff_node, "enabled")) {
const char *xff_mode = ConfNodeLookupChildValue(xff_node, "mode");
void *data = NULL;
OutputCtx *oc;
LogFileCtx *lf;
+ Unified2AlertFileCtx *uaf = NULL;
Signature s;
uint8_t raw_ipv4_tcp[] = {
if (oc == NULL) {
goto end;
}
- lf = (LogFileCtx *)oc->data;
+ uaf = oc->data;
+ if (uaf == NULL)
+ return 0;
+ lf = uaf->file_ctx;
if(lf == NULL) {
goto end;
}
void *data = NULL;
OutputCtx *oc;
LogFileCtx *lf;
+ Unified2AlertFileCtx *uaf = NULL;
Signature s;
uint8_t raw_ipv6_tcp[] = {
if (oc == NULL) {
goto end;
}
- lf = (LogFileCtx *)oc->data;
+ uaf = oc->data;
+ if (uaf == NULL)
+ return 0;
+ lf = uaf->file_ctx;
if(lf == NULL) {
goto end;
}
void *data = NULL;
OutputCtx *oc;
LogFileCtx *lf;
+ Unified2AlertFileCtx *uaf = NULL;
Signature s;
uint8_t raw_gre[] = {
if (oc == NULL) {
goto end;
}
- lf = (LogFileCtx *)oc->data;
+ uaf = oc->data;
+ if (uaf == NULL)
+ return 0;
+ lf = uaf->file_ctx;
if(lf == NULL) {
goto end;
}
void *data = NULL;
OutputCtx *oc;
LogFileCtx *lf;
+ Unified2AlertFileCtx *uaf = NULL;
Signature s;
uint8_t raw_ppp[] = {
if (oc == NULL) {
goto end;
}
- lf = (LogFileCtx *)oc->data;
+ uaf = oc->data;
+ if (uaf == NULL)
+ return 0;
+ lf = uaf->file_ctx;
if(lf == NULL) {
goto end;
}
void *data = NULL;
OutputCtx *oc;
LogFileCtx *lf;
+ Unified2AlertFileCtx *uaf = NULL;
Signature s;
uint8_t raw_ipv4_tcp[] = {
if (oc == NULL) {
goto end;
}
- lf = (LogFileCtx *)oc->data;
+ uaf = oc->data;
+ if (uaf == NULL)
+ return 0;
+ lf = uaf->file_ctx;
if(lf == NULL) {
goto end;
}
ThreadVars tv;
OutputCtx *oc;
LogFileCtx *lf;
+ Unified2AlertFileCtx *uaf = NULL;
void *data = NULL;
char *filename = NULL;
oc = Unified2AlertInitCtx(NULL);
if (oc == NULL)
return 0;
- lf = (LogFileCtx *)oc->data;
+ uaf = oc->data;
+ if (uaf == NULL)
+ return 0;
+ lf = uaf->file_ctx;
if (lf == NULL)
return 0;
filename = SCStrdup(lf->filename);