netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x: include/linux/netfilter_ipv4/ipt_osf.h
net...
pluto
cvs at pld-linux.org
Sat Jun 18 14:32:06 CEST 2005
Author: pluto
Date: Sat Jun 18 14:32:02 2005
New Revision: 6134
Modified:
netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/include/linux/netfilter_ipv4/ipt_osf.h
netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/net/ipv4/netfilter/ipt_osf.c
Log:
- connector n/a in 2.6.11.x.
Modified: netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/include/linux/netfilter_ipv4/ipt_osf.h
==============================================================================
--- netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/include/linux/netfilter_ipv4/ipt_osf.h (original)
+++ netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/include/linux/netfilter_ipv4/ipt_osf.h Sat Jun 18 14:32:02 2005
@@ -29,7 +29,6 @@
#define IPT_OSF_SMART 2
#define IPT_OSF_LOG 4
#define IPT_OSF_NETLINK 8
-#define IPT_OSF_CONNECTOR 16
#define IPT_OSF_LOGLEVEL_ALL 0
#define IPT_OSF_LOGLEVEL_FIRST 1
Modified: netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/net/ipv4/netfilter/ipt_osf.c
==============================================================================
--- netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/net/ipv4/netfilter/ipt_osf.c (original)
+++ netfilter-2.6/patch-o-matic-ng/branches/patched-2.6.11.x/net/ipv4/netfilter/ipt_osf.c Sat Jun 18 14:32:02 2005
@@ -90,45 +90,6 @@
.me = THIS_MODULE
};
-
-#ifdef CONFIG_CONNECTOR
-#include <linux/connector.h>
-
-/*
- * They should live in connector.h.
- */
-#define CN_IDX_OSF 0x0001
-#define CN_VAL_OSF 0x0000
-
-static char osf_finger_buf[sizeof(struct ipt_osf_nlmsg) + sizeof(struct cn_msg)];
-static struct cb_id osf_id = {CN_IDX_OSF, CN_VAL_OSF};
-static u32 osf_seq;
-
-static void ipt_osf_send_connector(struct osf_finger *f, const struct sk_buff *sk)
-{
- struct cn_msg *m;
- struct ipt_osf_nlmsg *data;
-
- m = (struct cn_msg *)osf_finger_buf;
- data = (struct ipt_osf_nlmsg *)(m+1);
-
- memcpy(&m->id, &osf_id, sizeof(m->id));
- m->seq = osf_seq++;
- m->ack = 0;
- m->len = sizeof(*data);
-
- memcpy(&data->f, f, sizeof(struct osf_finger));
- 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));
-
- cn_netlink_send(m, m->id.idx, GFP_ATOMIC);
-}
-#else
-static void ipt_osf_send_connector(struct osf_finger *f, const struct sk_buff *sk)
-{
-}
-#endif
-
static void ipt_osf_nlsend(struct osf_finger *f, const struct sk_buff *sk)
{
unsigned int size;
@@ -136,9 +97,6 @@
struct ipt_osf_nlmsg *data;
struct nlmsghdr *nlh;
- if (!nts)
- return;
-
size = NLMSG_SPACE(sizeof(struct ipt_osf_nlmsg));
skb = alloc_skb(size, GFP_ATOMIC);
@@ -385,18 +343,13 @@
ipt_osf_nlsend(f, skb);
spin_unlock_bh(&ipt_osf_netlink_lock);
}
- if (info->flags & IPT_OSF_CONNECTOR) {
- spin_lock_bh(&ipt_osf_netlink_lock);
- ipt_osf_send_connector(f, skb);
- spin_unlock_bh(&ipt_osf_netlink_lock);
- }
if ((info->flags & IPT_OSF_LOG) &&
info->loglevel == IPT_OSF_LOGLEVEL_FIRST)
break;
}
}
}
- if (!fcount && (info->flags & (IPT_OSF_LOG | IPT_OSF_NETLINK | IPT_OSF_CONNECTOR))) {
+ if (!fcount && (info->flags & (IPT_OSF_LOG | IPT_OSF_NETLINK))) {
unsigned char opt[4 * 15 - sizeof(struct tcphdr)];
unsigned int i, optsize;
struct osf_finger fg;
@@ -427,7 +380,7 @@
NIPQUAD(ip->saddr), ntohs(tcp->source),
NIPQUAD(ip->daddr), ntohs(tcp->dest));
- if (info->flags & (IPT_OSF_NETLINK | IPT_OSF_CONNECTOR)) {
+ if (info->flags & IPT_OSF_NETLINK) {
fg.wss.val = window;
fg.ttl = ip->ttl;
fg.df = df;
@@ -435,10 +388,7 @@
strncpy(fg.genre, "Unknown", MAXGENRELEN);
spin_lock_bh(&ipt_osf_netlink_lock);
- if (info->flags & IPT_OSF_NETLINK)
- ipt_osf_nlsend(&fg, skb);
- if (info->flags & IPT_OSF_CONNECTOR)
- ipt_osf_send_connector(&fg, skb);
+ ipt_osf_nlsend(&fg, skb);
spin_unlock_bh(&ipt_osf_netlink_lock);
}
}
@@ -824,6 +774,9 @@
nts = netlink_kernel_create(NETLINK_NFLOG, NULL);
if (!nts) {
log("netlink_kernel_create() failed\n");
+ remove_proc_entry("sys/net/ipv4/osf", NULL);
+ ipt_unregister_match(&osf_match);
+ return -ENOMEM;
}
return 0;
More information about the pld-cvs-commit
mailing list