summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaforge <laforge>2000-08-11 09:56:42 +0000
committerlaforge <laforge>2000-08-11 09:56:42 +0000
commit9c78000a078b942d97c15d6b6bc12f102a1b9ab6 (patch)
treed199679f4014dd212aa85f644b4d7bdec04e4d99
parentde923c5f36f5244e888b616de42b6a1cbf045372 (diff)
Various fixes due to Jan Echternachs comments on the mailinglist.
-rw-r--r--kernel/ipt_ULOG.c4
-rw-r--r--ulogd/libipulog/libipulog.c6
-rw-r--r--ulogd/ulogd.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/kernel/ipt_ULOG.c b/kernel/ipt_ULOG.c
index d1b913f..8c0ae20 100644
--- a/kernel/ipt_ULOG.c
+++ b/kernel/ipt_ULOG.c
@@ -5,7 +5,7 @@
*
* Released under the terms of the GPL
*
- * $Id: ipt_ULOG.c,v 1.3 2000/07/31 11:22:25 laforge Exp laforge $
+ * $Id: ipt_ULOG.c,v 1.4 2000/07/31 11:41:06 laforge Exp $
*/
#include <linux/module.h>
@@ -73,7 +73,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb,
pm->timestamp_usec = (*pskb)->stamp.tv_usec;
pm->mark = (*pskb)->nfmark;
pm->hook = hooknum;
- if (loginfo->prefix)
+ if (loginfo->prefix[0] != '\0')
strcpy(pm->prefix, loginfo->prefix);
if (in && in->hard_header_len > 0
diff --git a/ulogd/libipulog/libipulog.c b/ulogd/libipulog/libipulog.c
index 5d111f6..e5e6d2f 100644
--- a/ulogd/libipulog/libipulog.c
+++ b/ulogd/libipulog/libipulog.c
@@ -1,5 +1,5 @@
/*
- * libipulog.c, $Revision$
+ * libipulog.c, $Revision: 1.2 $
*
* netfilter ULOG userspace library.
*
@@ -9,7 +9,7 @@
* This library is still under development, so be aware of sudden interface
* changes
*
- * $Id$
+ * $Id: libipulog.c,v 1.2 2000/07/31 14:52:46 laforge Exp $
*/
#include <stdlib.h>
@@ -146,7 +146,7 @@ struct ipulog_handle *ipulog_create_handle(unsigned int gmask)
}
memset(&h->local, 0, sizeof(struct sockaddr_nl));
h->local.nl_family = AF_NETLINK;
- h->local.nl_pid = getpid();
+ h->local.nl_pid = 0;
h->local.nl_groups = gmask;
status = bind(h->fd, (struct sockaddr *)&h->local, sizeof(h->local));
if (status == -1)
diff --git a/ulogd/ulogd.c b/ulogd/ulogd.c
index e9c4703..abee09a 100644
--- a/ulogd/ulogd.c
+++ b/ulogd/ulogd.c
@@ -1,4 +1,4 @@
-/* ulogd, Version $Revision: 1.3 $
+/* ulogd, Version $Revision: 1.4 $
*
* first try of a logging daemon for my netfilter ULOG target
* for the linux 2.4 netfilter subsystem.
@@ -7,7 +7,7 @@
*
* this code is released under the terms of GNU GPL
*
- * $Id: ulogd.c,v 1.3 2000/08/02 12:20:46 laforge Exp root $
+ * $Id: ulogd.c,v 1.4 2000/08/09 16:26:34 root Exp $
*/
#include <stdio.h>
@@ -236,7 +236,7 @@ int main(int argc, char* argv[])
* handle_packet */
while(1)
{
- len = ipulog_read(h, buf, BUFSIZ, 1);
+ len = ipulog_read(h, buf, MYBUFSIZ, 1);
upkt = ipulog_get_packet(buf);
DEBUGP("==> packet received\n");
handle_packet(upkt);