summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2006-01-15 18:26:00 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2006-01-15 18:26:00 +0000
commit45cf69d25c897341defab1ffc7c1810f1520cec7 (patch)
tree56e936d275e8156ad7f6c4da847e698969a4f72c
parentb64b71ab1468ee02fad9a904e666e1e1fd521a75 (diff)
fix some mistakes during Harald's recent changes (Pablo Neira)
-rw-r--r--src/libnfnetlink.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
index 3f37273..756893b 100644
--- a/src/libnfnetlink.c
+++ b/src/libnfnetlink.c
@@ -16,6 +16,10 @@
*
* 2006-01-14 Harald Welte <laforge@netfilter.org>:
* introduce nfnl_subsys_handle
+ *
+ * 2006-01-15 Pablo Neira Ayuso <pablo@netfilter.org>:
+ * set missing subsys_id in nfnl_subsys_open
+ * set missing nfnlh->local.nl_pid in nfnl_open
*/
#include <stdlib.h>
@@ -152,6 +156,10 @@ struct nfnl_handle *nfnl_open(void)
goto err_close;
}
nfnlh->seq = time(NULL);
+ /*
+ * nfnl_talk checks: h->nlmsg_pid != nfnlh->local.nl_pid
+ */
+ nfnlh->local.nl_pid = getpid();
return nfnlh;
@@ -196,6 +204,7 @@ nfnl_subsys_open(struct nfnl_handle *nfnlh, u_int8_t subsys_id,
ssh->nfnlh = nfnlh;
ssh->cb_count = cb_count;
ssh->subscriptions = subscriptions;
+ ssh->subsys_id = subsys_id;
if (recalc_rebind_subscriptions(nfnlh) < 0) {
free(ssh->cb);