Age | Commit message (Collapse) | Author |
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
This patch changes the errno value of mnl_cb_run[2]() in the
following two cases:
* Invalid expected portID: ESRCH.
* Invalid sequence number: EPROTO.
I didn't find any better generic errno value. EINVAL is reserved
for malformed messages, to avoid confusions.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
callback.c: In function ‘mnl_cb_run2’:
callback.c:106: warning: pointer targets in passing argument 2 of ‘mnl_nlmsg_next’ differ in signednes
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
This includes renaming get_tail() to get_payload_tail()
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
This patch changes the callback handlers to include netlink portID
checking. Thus, we avoid that any malicious process can spoof
messages.
If portid, sequence number of the message is != 0, we check if the
message is what we expect. This allows to use the same netlink channel
for dumps (portid, seq != 0) and event-based notifications (portid, seq == 0).
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
the use of unsigned int in the number of bytes affects other message
handling helper function, hold on with this.
|
|
|
|
This library is distributed under GPLv2+.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
This patch may contain errors but we can review them and fix them later,
better to have it in the tree (to allow others to contribute) to keep it
in my local tree.
|
|
|