]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix segfault when enabling pf plug-ins
authorsvimik <svimik@mail.ru>
Thu, 29 Sep 2011 11:41:34 +0000 (13:41 +0200)
committerDavid Sommerseth <davids@redhat.com>
Mon, 6 May 2013 15:09:12 +0000 (17:09 +0200)
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>
src/openvpn/pf.c

index aafe9ff096571ae57efa6afa583b094a547bd779..461beed75e435eb4fc522f792c075b6fe6d76b8e 100644 (file)
@@ -417,7 +417,7 @@ lookup_cn_rule (struct hash *h, const char *cn, const uint32_t cn_hash)
 bool
 pf_cn_test (struct pf_set *pfs, const struct tls_multi *tm, const int type, const char *prefix)
 {
-  if (!pfs->kill)
+  if (pfs && !pfs->kill)
     {
       const char *cn;
       uint32_t cn_hash;