]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: init correctly the config structure 603/head
authorEric Leblond <eric@regit.org>
Fri, 25 Oct 2013 21:44:12 +0000 (23:44 +0200)
committerEric Leblond <eric@regit.org>
Fri, 25 Oct 2013 21:45:37 +0000 (23:45 +0200)
This fix a crash when interface is not defined in YAML.

src/runmode-af-packet.c

index 1c9d2ad3da1f836e2d33f166fecc0a7d8dfd21a0..6765d081a18e95512e2bceb499e01c4becd813dc 100644 (file)
@@ -143,6 +143,7 @@ void *ParseAFPConfig(const char *iface)
     aconf->flags = 0;
     aconf->bpf_filter = NULL;
     aconf->out_iface = NULL;
+    aconf->copy_mode = AFP_COPY_MODE_NONE;
 
     if (ConfGet("bpf-filter", &bpf_filter) == 1) {
         if (strlen(bpf_filter) > 0) {