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>
... | ... |
@@ -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; |