All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: netfilter-devel@lists.netfilter.org
Cc: Harald Welte <laforge@netfilter.org>, PatriK McHardy <kaber@trash.net>
Subject: [1/1] OSF: netlink related changes.
Date: Sat, 10 Dec 2005 00:02:20 +0300	[thread overview]
Message-ID: <20051209210220.GA28195@2ka.mipt.ru> (raw)

Hello, developers.
Due to new interface and changed API in netlink area
several patch-o-matic modules can not be compiled.
Passive OS fingerprinting OSF modules is one of them. 
Consider for inclusion.

This patch has been done against just downloaded ipt_osf.c file from
cvs.netfilter.org.
I only read list archive and did not receive your feedback, sorry for
not answering.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

--- trunk/patch-o-matic-ng/patchlets/osf/linux-2.6/net/ipv4/netfilter/ipt_osf.c      2005-11-05 12:35:02.000000000 -0500
+++ trunk/patch-o-matic-ng/patchlets/osf/linux-2.6/net/ipv4/netfilter/ipt_osf.c       2005-11-05 12:43:54.000000000 -0500
@@ -30,6 +30,7 @@

 #include <linux/config.h>
 #include <linux/kernel.h>
+#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/smp.h>
@@ -155,7 +156,11 @@
 	memcpy(&data->ip, sk->nh.iph, sizeof(struct iphdr));
 	memcpy(&data->tcp, (struct tcphdr *)((u_int32_t *)sk->nh.iph + sk->nh.iph->ihl), sizeof(struct tcphdr));

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	NETLINK_CB(skb).dst_groups = ipt_osf_groups;
+#else
+	NETLINK_CB(skb).dst_group = ipt_osf_groups;
+#endif
 	netlink_broadcast(nts, skb, 0, ipt_osf_groups, GFP_ATOMIC);

 nlmsg_failure:
@@ -821,7 +826,11 @@
 	p->write_proc->osf_proc_write;
 	p->read_proc->osf_proc_read;

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	nts->netlink_kernel_create(NETLINK_NFLOG, NULL);
+#else
+	nts->netlink_kernel_create(NETLINK_NFLOG, 1, NULL, THIS_MODULE);
+#endif
 	if (!nts) {
 		log("netlink_kernel_create() failed\n");
 	}


-- 
	Evgeniy Polyakov

             reply	other threads:[~2005-12-09 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 21:02 Evgeniy Polyakov [this message]
2005-12-12  7:20 ` [1/1] OSF: netlink related changes Patrick McHardy
2005-12-12 12:06 ` Evgeniy Polyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051209210220.GA28195@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=kaber@trash.net \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.