From: Ken Steele Date: Mon, 11 Nov 2013 20:54:47 +0000 (-0500) Subject: Give Suricata priority to receive packets over Linux with mPIPE. X-Git-Tag: suricata-2.0beta2~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86c6861b402bbd8ddc841bd86531fab85efc7e47;p=thirdparty%2Fsuricata.git Give Suricata priority to receive packets over Linux with mPIPE. When installing the rules to tell mPIPE to send packet to Suricata, give it a higher priority than the default used by Linux. This way if Linux also tells mPIPE to send it packets, Suricata will get them instead, as long as Suricata is running. --- diff --git a/src/source-mpipe.c b/src/source-mpipe.c index 01547391a7..969d0ea945 100644 --- a/src/source-mpipe.c +++ b/src/source-mpipe.c @@ -694,6 +694,8 @@ static int ReceiveMpipeRegisterRules(int bucket, int num_buckets) gxio_mpipe_rules_t rules; gxio_mpipe_rules_init(&rules, context); gxio_mpipe_rules_begin(&rules, bucket, num_buckets, NULL); + /* Give Suricata priority over Linux to receive packets. */ + gxio_mpipe_rules_set_priority(&rules, -100); return gxio_mpipe_rules_commit(&rules); }