summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* src: fix incorrect building and parsing of the NFCTH_POLICY_SETX attributeLiping Zhang2017-03-241-12/+11
| | | | | | | | | | | | | | In nfct_helper_nlmsg_build_policy(), we always set the attribute type to NFCTH_POLICY_SET, so we cannot add more than one nfct_helper_policy to the kernel. Also: in nfct_helper_nlmsg_parse_policy(), we will increase the helper->policy_num for each nfct_helper_policy, but we mistakenly set it to the total number of nfct_helper_policy. So when the total number is more than 3, later out of bound access will happen. Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Use __EXPORTED rather than EXPORT_SYMBOLKevin Cernekee2017-01-162-53/+35
| | | | | | | | | | | | | | clang is sensitive to the ordering of __attribute__((visibility("default"))) relative to the function body. gcc is not. So if we try to re-declare an existing function with default visibility, clang prints a warning and generates a broken .so file in which nfct_helper_* are not exported to library callers. Move the attribute up into the function definition to make clang happy. Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: fix use after freeChristopher Horler2014-12-081-1/+1
| | | | | | | Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=990 Signed-off-by: Christopher Horler <cshorler@googlemail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* fix licensing termsPablo Neira Ayuso2012-06-051-2/+2
| | | | | | | | | | The licensing terms of this library were pretty inconsistent. This library is GPLv2+. Thanks to Jan Engelhardt and openSUSE legal team for spotting this. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add NFCTH_STATUS and other enhancementsPablo Neira Ayuso2012-05-132-74/+268
| | | | | | | This patch includes the modification of the snprintf interface and the completition of the expectation policy handling. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* cthelper: add NFCTH_ATTR_PRIV_DATA_LENPablo Neira Ayuso2012-02-021-0/+7
| | | | | | New attribute that is mandatory to set the size of the private data. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* initial importPablo Neira Ayuso2012-01-164-0/+690
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>