summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-06-07 21:36:39 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-07 21:37:12 +0200
commit01a4c0925c455723cbb7f026614c91a9bc8bf62a (patch)
treec0686036f891400f50e4ab0a5fabb4e4c6fd2fa3
parent140bde424c1381353f37ebc3395305f2acfcf546 (diff)
downloadconntrack-tools-01a4c0925c455723cbb7f026614c91a9bc8bf62a.tar.gz
conntrack-tools-01a4c0925c455723cbb7f026614c91a9bc8bf62a.zip
cthelper: helpers may not use private information area
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/cthelper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cthelper.c b/src/cthelper.c
index f333625..5a8a92a 100644
--- a/src/cthelper.c
+++ b/src/cthelper.c
@@ -165,9 +165,11 @@ pkt_verdict_issue(struct ctd_helper_instance *cur, struct myct *myct,
nlh = nfq_hdr_put(buf, NFQNL_MSG_VERDICT, queue_num);
- /* save private data and send it back to kernel-space. */
- nfct_set_attr_l(myct->ct, ATTR_HELPER_INFO, myct->priv_data,
- cur->helper->priv_data_len);
+ /* save private data and send it back to kernel-space, if any. */
+ if (myct->priv_data) {
+ nfct_set_attr_l(myct->ct, ATTR_HELPER_INFO, myct->priv_data,
+ cur->helper->priv_data_len);
+ }
nfq_nlmsg_verdict_put(nlh, id, verdict);
if (pktb_mangled(pktb))