From 45cf69d25c897341defab1ffc7c1810f1520cec7 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org" Date: Sun, 15 Jan 2006 18:26:00 +0000 Subject: fix some mistakes during Harald's recent changes (Pablo Neira) --- src/libnfnetlink.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libnfnetlink.c') 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 : * introduce nfnl_subsys_handle + * + * 2006-01-15 Pablo Neira Ayuso : + * set missing subsys_id in nfnl_subsys_open + * set missing nfnlh->local.nl_pid in nfnl_open */ #include @@ -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); -- cgit v1.2.3