Browse code

Fix segfault when enabling pf plug-ins

This fixes an issue where a segfault happens in pf_cn_test() if no
packet filtering rules have been parsed. See the trac ticket for
more details.

Trac: 163
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: David Sommerseth <davids@redhat.com>

svimik authored on 2011/09/29 20:41:34
Showing 1 changed files
... ...
@@ -417,7 +417,7 @@ lookup_cn_rule (struct hash *h, const char *cn, const uint32_t cn_hash)
417 417
 bool
418 418
 pf_cn_test (struct pf_set *pfs, const struct tls_multi *tm, const int type, const char *prefix)
419 419
 {
420
-  if (!pfs->kill)
420
+  if (pfs && !pfs->kill)
421 421
     {
422 422
       const char *cn;
423 423
       uint32_t cn_hash;