summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples: kill the "invalid argument" error in nftc-helper-addLiping Zhang2017-03-221-0/+1
| | | | | | | | NFCTH_PRIV_DATA_LEN is a must attribute required by the kernel when creating the cthelper, add it now. Otherwise -EINVAL will be returned. Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: fix double free in nftc-helper-addLiping Zhang2017-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | After inputting the following test command, core dump happened: # ./examples/nfct-helper-add test 1 *** Error in `.../libnetfilter_cthelper/examples/.libs/lt-nfct-helper-add': double free or corruption (fasttop): 0x0000000001f3c070 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x77de5)[0x7fd9ebe88de5] /lib64/libc.so.6(+0x8022a)[0x7fd9ebe9122a] /lib64/libc.so.6(cfree+0x4c)[0x7fd9ebe9478c] [...] Because "struct nfct_helper_policy *p" had been freed by nfct_helper_free, so there's no need to invoke nfct_helper_policy_free again, otherwise double free error will happen. Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: fix nfct-helper-add examplePablo Neira Ayuso2012-05-142-4/+14
| | | | | | to adapt it to the new API Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* initial importPablo Neira Ayuso2012-01-165-0/+239
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>