Skip to contentSkip to conversation

ip_gre.c:ipgre_tunnel_xmit() duplicated code ?

PATCH Steven Whitehouse 4 participants 15 messages Apr 21, 2003 – May 6, 2003 1 message not in the archive

Subsystems (6)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

I found some code in ip_gre.c which looks to be duplicated. Is the attached the right fix or did I miss something?

Steve.
-----------------------------------------------------------------------------

net/ipv4/ip_gre.c +0 -3
diff -Nru linux-2.5.68/net/ipv4/ip_gre.c linux/net/ipv4/ip_gre.c
@@ -777,9 +777,6 @@
 		skb->dst->ops->update_pmtu(skb->dst, mtu);
 
 	if (skb->protocol == htons(ETH_P_IP)) {
-		if (skb->dst)
-			skb->dst->ops->update_pmtu(skb->dst, mtu);
-
 		df |= (old_iph->frag_off&htons(IP_DF));
 
 		if ((old_iph->frag_off&htons(IP_DF)) &&
#2 lore raw

From: Steven Whitehouse <[email protected]>
Date: Mon, 21 Apr 2003 11:21:59 +0100 (BST)

I found some code in ip_gre.c which looks to be duplicated. Is the attached the right fix or did I miss something?

You're right, I've integrated your fix thanks.

#3 lore raw

Remains of seq_file conversion for DECnet, plus fixes

Hi,

My latest DECnet patch for 2.5 has the following features:

o Introduce kfree_release() in seq_file.c for use of DECnet and eventually IP as well (and other things...?)
o Added proc_net_fops_create() like proc_net_create() but with file_operations argument to use with seq_file code (cleans up some #ifdefs). If there are no objections, I'll send a patch for IPv4/6 shortly.
o Removed blksize from decnet device parameters - use the device mtu like we ought to.
o Removed /proc/net/decnet_route file - I don't think anybody ever used it and it was lacking a full enough description of the routes to be useful. ip -D route list is much better :-)
o Added rt_local_src entry to decnet routes so that we get the local source address right when forwarding.
o Added netfilter subdir for decnet and add the routing grabulator
o Added correct proto argument to struct flowi for routing
o MSG_MORE in sendmsg (ignored, but accepted whereas before we'd error)
o /proc/net/decnet converted to seq_file
o /proc/net/decnet_dev converted to seq_file
o /proc/net/decnet_cache converted to seq_file
o Use pskb_may_pull() and add code to linearize skbs on the input path except for those containing data.
o Fixed returned packet code (mostly - some left to do)
o update_pmtu() method for decnet dst entries (ip_gre device assumes this method exists)
o Fixed bug in forwarding to get IE bit set correctly
o Fixed compile bugs with CONFIG_DECNET_ROUTE_FWMARK pointed out by Adrian Bunk
o Fixed zero dest code to grab an address from loopback
o Fixed local routes in dn_route_output_slow()
o Fixed error case in dn_route_input/output_slow() pointed out by Rusty

Its got big again, so I've put it here, if you'd like it in bits rather than all one lump, just shout:

http://www.chygwyn.com/~steve/kpatch/decnet/decnet-2.5.68-bk10-seqfile.diff

If you've been wondering when the routing in DECnet would reach the stage where its actually likely to be useful, now is that time :-) We don't yet have full automatic routing, but all the kernel infrastructure is now in place and the rest can be done in userspace. In the mean time, iproute2 can set up manual routes.

I'm going to write some docs and post them somewhere in the next few weeks to give more detailed info on how to use the various features.

Steve.

#4 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

From: Steven Whitehouse <[email protected]>
Date: Thu, 1 May 2003 14:27:08 +0100 (BST)

Its got big again, so I've put it here, if you'd like it in bits rather than all one lump, just shout:

Please do this because it's easier for me to evaluate small patches doing one thing at a time and you're also making modifications to things outside of decnet.

About update_pmtu(). You are not required to implement this. All of these places you see dereferencing dst->update_mtu() know that they have an ipv4/ipv6 route. Or do you know some exception to this?

#5 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

Hi,

Quoted 11 lines

From: Steven Whitehouse <[email protected]>
Date: Thu, 1 May 2003 14:27:08 +0100 (BST)

Its got big again, so I've put it here, if you'd like it in bits rather than all one lump, just shout:

Please do this because it's easier for me to evaluate small patches doing one thing at a time and you're also making modifications to things outside of decnet.

Ok. I'll do that later this afternoon.

Quoted 5 lines

About update_pmtu(). You are not required to implement this. All of these places you see dereferencing dst->update_mtu() know that they have an ipv4/ipv6 route. Or do you know some exception to this?

I was thinking of that bit of code in ip_gre.c which I sent the fix for recently. Unless I've missed something it calls update_pmtu on the dst which is passed by the encapsulated protocol, although I've not actually tested that.

Thats the reason I wasn't sure about the fix which I sent... it deleted the duplicated call only for IPv4 rather than the one which appears to get called for every protocol as I wasn't sure what was intended.

Either way it seems reasonable to pass this information back to the protocol so perhaps it should say (in ipgre_tunnel_xmit()):

	if (skb->dst && skb->dst->ops->update_pmtu)
		skb->dst->ops->update_pmtu(skb->dst, mtu);

?

Steve.

#6 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

From: Steven Whitehouse <[email protected]>
Date: Thu, 1 May 2003 15:04:00 +0100 (BST)

Quoted 4 lines

About update_pmtu(). You are not required to implement this. All of these places you see dereferencing dst->update_mtu() know that they have an ipv4/ipv6 route. Or do you know some exception to this?

I was thinking of that bit of code in ip_gre.c which I sent the fix for recently. Unless I've missed something it calls update_pmtu on the dst which is passed by the encapsulated protocol, although I've not actually tested that.

Thats the reason I wasn't sure about the fix which I sent... it deleted the duplicated call only for IPv4 rather than the one which appears to get called for every protocol as I wasn't sure what was intended.

No, this must be an IPV4 or an IPV6 route.
Right Alexey?

#7 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

Hi,

I've split the patch into three. Any further splitting/changes will have to wait until next week when I'll have time to work on it again.

- Part 1. Things outside DECnet
- Part 2. seq_file & fixes for DECnet depending on part 1
- Part 3. Addition of the DECnet routing grabulator (does not depend on other patches)

Below is part 1 with the following features:

o Introduce kfree_release() in seq_file.c for use of DECnet and eventually IP as well (and other things...?)
o Added proc_net_fops_create() like proc_net_create() but with file_operations argument to use with seq_file code (cleans up some #ifdefs). If there are
no objections, I'll send a patch for IPv4/6 shortly.

Steve.

--------------------------------------------------------------------------

fs/seq_file.c +10 -0
diff -Nru linux-2.5.68-bk10/fs/seq_file.c linux/fs/seq_file.c
@@ -338,3 +338,13 @@
 	kfree(op);
 	return res;
 }
+
+int kfree_release(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq = file->private_data;
+
+	kfree(seq->private);
+	seq->private = NULL;
+	return seq_release(inode, file);
+}
+
include/linux/proc_fs.h +10 -1
diff -Nru linux-2.5.68-bk10/include/linux/proc_fs.h linux/include/linux/proc_fs.h
@@ -163,6 +163,15 @@
 	return create_proc_info_entry(name,mode,proc_net,get_info);
 }
 
+static inline struct proc_dir_entry *proc_net_fops_create(const char *name,
+	mode_t mode, struct file_operations *fops)
+{
+	struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
+	if (res)
+		res->proc_fops = fops;
+	return res;
+}
+
 static inline void proc_net_remove(const char *name)
 {
 	remove_proc_entry(name,proc_net);
@@ -171,7 +180,7 @@
 #else
 
 #define proc_root_driver NULL
-
+#define proc_net_fops_create(name,mode,fops) do {} while(0)
 static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, 
 	get_info_t *get_info) {return NULL;}
 static inline void proc_net_remove(const char *name) {}
include/linux/seq_file.h +1 -0
diff -Nru linux-2.5.68-bk10/include/linux/seq_file.h linux/include/linux/seq_file.h
@@ -60,5 +60,6 @@
 
 int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
 int single_release(struct inode *, struct file *);
+int kfree_release(struct inode *, struct file *);
 #endif
 #endif
kernel/ksyms.c +1 -0
diff -Nru linux-2.5.68-bk10/kernel/ksyms.c linux/kernel/ksyms.c
@@ -539,6 +539,7 @@
 EXPORT_SYMBOL(seq_lseek);
 EXPORT_SYMBOL(single_open);
 EXPORT_SYMBOL(single_release);
+EXPORT_SYMBOL(kfree_release);
 
 /* Program loader interfaces */
 #ifdef CONFIG_MMU
#8 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

Quoted 5 lines · Steven Whitehouse
fs/seq_file.c +0 -0
@@ -338,3 +338,13 @@
 	kfree(op);
 	return res;

fs/seq_file.c line 349

Quoted 10 lines
fs/seq_file.c +9 -0
 }
+
+int kfree_release(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq = file->private_data;
+
+	kfree(seq->private);
+	seq->private = NULL;
+	return seq_release(inode, file);
+}

The name is a bit generic for an export function. What about seq_release_kfree?

#9 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

Hi,

Quoted 12 lines · Steven Whitehouse
Quoted 10 lines
fs/seq_file.c +4 -0
@@ -338,3 +338,13 @@
 	kfree(op);
 	return res;
 }
+
+int kfree_release(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq = file->private_data;
Quoted 9 lines

fs/seq_file.c line 349

Quoted 5 lines
fs/seq_file.c +5 -0
+
+	kfree(seq->private);
+	seq->private = NULL;
+	return seq_release(inode, file);
+}

The name is a bit generic for an export function. What about seq_release_kfree?

Yes, I'd considered that and eventually settled for the non-prefixed version since it followed the pattern set by single_release() which doesn't have the seq_ prefix. I don't mind changing it though if the prefixed version is preferred,

Steve.

#10 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

From: Steven Whitehouse <[email protected]>
Date: Thu, 1 May 2003 22:35:46 +0100 (BST)

Quoted 2 lines

The name is a bit generic for an export function. What about seq_release_kfree?

Yes, I'd considered that and eventually settled for the non-prefixed version since it followed the pattern set by single_release() which doesn't have the seq_ prefix. I don't mind changing it though if the prefixed version is preferred,

I think a naming convention without a prefix is asking for trouble. I'd ask that you add the prefix, the current convention is troublesome and someone ought to clean that up.

#11 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

Em Thu, May 01, 2003 at 02:22:35PM -0700, David S. Miller escreveu:

Quoted 6 lines

From: Steven Whitehouse <[email protected]>
Date: Thu, 1 May 2003 22:35:46 +0100 (BST)

Quoted 2 lines

The name is a bit generic for an export function. What about seq_release_kfree?

Quoted 8 lines

Yes, I'd considered that and eventually settled for the non-prefixed version since it followed the pattern set by single_release() which doesn't have the seq_ prefix. I don't mind changing it though if the prefixed version is preferred,

I think a naming convention without a prefix is asking for trouble. I'd ask that you add the prefix, the current convention is troublesome and someone ought to clean that up.

Agreed, I also tought of adding it as a generic function, that is the spirit of ip_seq_release, that is already used several net/ipv4 seq_file routines and should be deleted in favour of seq_release_private, that is my preferred name, as it is more general.

- Arnaldo

#12 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

Hi,

Now that I'm back again, here is the first patch again with kfree_release renamed as suggested to seq_release_private,

Steve.
-----------------------------------------------------------------------------

fs/seq_file.c +10 -0
diff -Nru linux-2.5.68-bk12/fs/seq_file.c linux/fs/seq_file.c
@@ -338,3 +338,13 @@
 	kfree(op);
 	return res;
 }
+
+int seq_release_private(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq = file->private_data;
+
+	kfree(seq->private);
+	seq->private = NULL;
+	return seq_release(inode, file);
+}
+
include/linux/proc_fs.h +10 -1
diff -Nru linux-2.5.68-bk12/include/linux/proc_fs.h linux/include/linux/proc_fs.h
@@ -163,6 +163,15 @@
 	return create_proc_info_entry(name,mode,proc_net,get_info);
 }
 
+static inline struct proc_dir_entry *proc_net_fops_create(const char *name,
+	mode_t mode, struct file_operations *fops)
+{
+	struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
+	if (res)
+		res->proc_fops = fops;
+	return res;
+}
+
 static inline void proc_net_remove(const char *name)
 {
 	remove_proc_entry(name,proc_net);
@@ -171,7 +180,7 @@
 #else
 
 #define proc_root_driver NULL
-
+#define proc_net_fops_create(name,mode,fops) do {} while(0)
 static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, 
 	get_info_t *get_info) {return NULL;}
 static inline void proc_net_remove(const char *name) {}
include/linux/seq_file.h +1 -0
diff -Nru linux-2.5.68-bk12/include/linux/seq_file.h linux/include/linux/seq_file.h
@@ -60,5 +60,6 @@
 
 int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
 int single_release(struct inode *, struct file *);
+int seq_release_private(struct inode *, struct file *);
 #endif
 #endif
kernel/ksyms.c +1 -0
diff -Nru linux-2.5.68-bk12/kernel/ksyms.c linux/kernel/ksyms.c
@@ -540,6 +540,7 @@
 EXPORT_SYMBOL(seq_lseek);
 EXPORT_SYMBOL(single_open);
 EXPORT_SYMBOL(single_release);
+EXPORT_SYMBOL(seq_release_private);
 
 /* Program loader interfaces */
 #ifdef CONFIG_MMU
#13 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes

From: Steven Whitehouse <[email protected]>
Date: Sun, 4 May 2003 19:43:51 +0100 (BST)

Now that I'm back again, here is the first patch again with kfree_release renamed as suggested to seq_release_private,

Since there have been no objections I'll apply this and your decnet patch that makes use of the new interfaces.

Thanks.

#14 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes (part 2)

In reply to David S. Miller

Hi,

Here is part 2 (depends on part 1) with the following features:

o Removed blksize from decnet device parameters - use the device mtu like we ought to.
o Removed /proc/net/decnet_route file - I don't think anybody ever used it and it was lacking a full enough description of the routes to be useful. ip -D route list is much better :-)
o Added rt_local_src entry to decnet routes so that we get the local source address right when forwarding.
o Added correct proto argument to struct flowi for routing
o MSG_MORE in sendmsg (ignored, but accepted whereas before we'd error)
o /proc/net/decnet converted to seq_file
o /proc/net/decnet_dev converted to seq_file
o /proc/net/decnet_cache converted to seq_file
o Use pskb_may_pull() and add code to linearize skbs on the input path except for those containing data.
o Fixed returned packet code (mostly - some left to do)
o update_pmtu() method for decnet dst entries (ip_gre device assumes this method exists - well I think it does :-)
o Fixed bug in forwarding to get IE bit set correctly
o Fixed compile bugs with CONFIG_DECNET_ROUTE_FWMARK pointed out by Adrian Bunk
o Fixed zero dest code to grab an address from loopback
o Fixed local routes in dn_route_output_slow()
o Fixed error case in dn_route_input/output_slow() pointed out by Rusty

Steve.

-----------------------------------------------------------------------------

include/net/dn_dev.h +0 -1
diff -Nru linux-2.5.68-bk10/include/net/dn_dev.h linux/include/net/dn_dev.h
@@ -71,7 +71,6 @@
 #define DN_DEV_MPOINT 4
 	int state;                /* Initial state                      */
 	int forwarding;	          /* 0=EndNode, 1=L1Router, 2=L2Router  */
-	unsigned short blksize;   /* Block Size                         */
 	unsigned long t2;         /* Default value of t2                */
 	unsigned long t3;         /* Default value of t3                */
 	int priority;             /* Priority to be a router            */
include/net/dn_fib.h +3 -4
diff -Nru linux-2.5.68-bk10/include/net/dn_fib.h linux/include/net/dn_fib.h
@@ -101,10 +101,6 @@
 	int (*lookup)(struct dn_fib_table *t, const struct flowi *fl,
 			struct dn_fib_res *res);
 	int (*flush)(struct dn_fib_table *t);
-#ifdef CONFIG_PROC_FS
-	int (*get_info)(struct dn_fib_table *table, char *buf,
-			int first, int count);
-#endif /* CONFIG_PROC_FS */
 	int (*dump)(struct dn_fib_table *t, struct sk_buff *skb, struct netlink_callback *cb);
 
 	unsigned char data[0];
@@ -183,6 +179,9 @@
 extern struct dn_fib_table *dn_fib_tables[];
 
 #else /* Endnode */
+
+#define dn_fib_init() (0)
+#define dn_fib_cleanup() (0)
 
 #define dn_fib_lookup(fl, res) (-ESRCH)
 #define dn_fib_info_put(fi) do { } while(0)
include/net/dn_route.h +1 -1
diff -Nru linux-2.5.68-bk10/include/net/dn_route.h linux/include/net/dn_route.h
@@ -74,7 +74,7 @@
 	__u16 rt_saddr;
 	__u16 rt_daddr;
 	__u16 rt_gateway;
-	__u16 __padding;
+	__u16 rt_local_src;	/* Source used for forwarding packets */
 	__u16 rt_src_map;
 	__u16 rt_dst_map;
 
net/decnet/TODO +0 -8
diff -Nru linux-2.5.68-bk10/net/decnet/TODO linux/net/decnet/TODO
@@ -23,15 +23,9 @@
 
  o check MSG_CTRUNC is set where it should be.
 
- o Start to hack together user level software and add more DECnet support
-   in ifconfig for example. 
-
  o Find all the commonality between DECnet and IPv4 routing code and extract 
    it into a small library of routines. [probably a project for 2.7.xx]
 
- o Add the routing message grabbing netfilter module [written, tested,
-   awaiting merge]
-
  o Add perfect socket hashing - an idea suggested by Paul Koning. Currently
    we have a half-way house scheme which seems to work reasonably well, but
    the full scheme is still worth implementing, its not not top of my list
@@ -44,6 +38,4 @@
  o DECnet sendpages() function
 
  o AIO for DECnet
-
- o Eliminate dn_db->parms.blksize
 
net/decnet/af_decnet.c +202 -101

380 lines not on this page · raw message

net/decnet/dn_dev.c +110 -57

307 lines not on this page · raw message

net/decnet/dn_fib.c +12 -57

93 lines not on this page · raw message

net/decnet/dn_neigh.c +4 -29
diff -Nru linux-2.5.68-bk10/net/decnet/dn_neigh.c linux/net/decnet/dn_neigh.c
@@ -202,7 +202,7 @@
 	struct net_device *dev = neigh->dev;
 	char mac_addr[ETH_ALEN];
 
-	dn_dn2eth(mac_addr, rt->rt_saddr);
+	dn_dn2eth(mac_addr, rt->rt_local_src);
 	if (!dev->hard_header || dev->hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, mac_addr, skb->len) >= 0)
 		return neigh->ops->queue_xmit(skb);
 
@@ -692,48 +692,23 @@
 	goto out;
 }
 
-static int dn_seq_release(struct inode *inode, struct file *file)
-{
-	struct seq_file *seq  = (struct seq_file *)file->private_data;
-
-	kfree(seq->private);
-	seq->private = NULL;
-	return seq_release(inode, file);
-}
-
 static struct file_operations dn_neigh_seq_fops = {
 	.open		= dn_neigh_seq_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
-	.release	= dn_seq_release,
+	.release	= kfree_release,
 };
 
-static int __init dn_neigh_proc_init(void)
-{
-	int rc = 0;
-	struct proc_dir_entry *p = create_proc_entry("decnet_neigh", S_IRUGO, proc_net);
-	if (p)
-		p->proc_fops = &dn_neigh_seq_fops;
-	else
-		rc = -ENOMEM;
-	return rc;
-}
-
-#else
-static int __init dn_neigh_proc_init(void)
-{
-	return 0;
-}
 #endif
 
 void __init dn_neigh_init(void)
 {
 	neigh_table_init(&dn_neigh_table);
-
-	dn_neigh_proc_init();
+	proc_net_fops_create("decnet_neigh", S_IRUGO, &dn_neigh_seq_fops);
 }
 
 void __exit dn_neigh_cleanup(void)
 {
+	proc_net_remove("decnet_neigh");
 	neigh_table_clear(&dn_neigh_table);
 }
net/decnet/dn_nsp_in.c +35 -22

120 lines not on this page · raw message

net/decnet/dn_nsp_out.c +5 -6
diff -Nru linux-2.5.68-bk10/net/decnet/dn_nsp_out.c linux/net/decnet/dn_nsp_out.c
@@ -96,6 +96,7 @@
 	fl.fld_src = dn_saddr2dn(&scp->addr);
 	fl.fld_dst = dn_saddr2dn(&scp->peer);
 	dn_sk_ports_copy(&fl, scp);
+	fl.proto = DNPROTO_NSP;
 	if (dn_route_output_sock(&sk->dst_cache, &fl, sk, 0) == 0) {
 		dst = sk_dst_get(sk);
 		sk->route_caps = dst->dev->features;
@@ -349,8 +350,7 @@
 {
 	unsigned char *ptr = skb_push(skb, len);
 
-	if (len < 5)
-		BUG();
+	BUG_ON(len < 5);
 
 	*ptr++ = msgflag;
 	*((unsigned short *)ptr) = scp->addrrem;
@@ -367,8 +367,7 @@
 	unsigned short ackcrs = scp->numoth_rcv & 0x0FFF;
 	unsigned short *ptr;
 
-	if (hlen < 9)
-		BUG();
+	BUG_ON(hlen < 9);
 
 	scp->ackxmt_dat = acknum;
 	scp->ackxmt_oth = ackcrs;
@@ -485,8 +484,8 @@
 		 * We don't expect to see acknowledgements for packets we
 		 * haven't sent yet.
 		 */
-		if (xmit_count == 0)
-			BUG();
+		WARN_ON(xmit_count == 0);
+
 		/*
 		 * If the packet has only been sent once, we can use it
 		 * to calculate the RTT and also open the window a little
net/decnet/dn_route.c +180 -63

430 lines not on this page · raw message

net/decnet/dn_table.c +0 -83

95 lines not on this page · raw message

#15 lore raw

Re: Remains of seq_file conversion for DECnet, plus fixes (part 3)

In reply to David S. Miller

Hi,

Here is part 3 (stands alone) with the following feature:

o Added netfilter subdir for decnet and add the routing grabulator

Steve.

------------------------------------------------------------------------------

net/decnet/Makefile +5 -2
diff -Nru linux-2.5.68-bk10/net/decnet/Makefile linux/net/decnet/Makefile
@@ -1,7 +1,10 @@
 
 obj-$(CONFIG_DECNET) += decnet.o
 
-decnet-y := af_decnet.o dn_nsp_in.o dn_nsp_out.o dn_route.o dn_dev.o dn_neigh.o dn_timer.o
+decnet-y := af_decnet.o dn_nsp_in.o dn_nsp_out.o \
+	    dn_route.o dn_dev.o dn_neigh.o dn_timer.o
 decnet-$(CONFIG_DECNET_ROUTER) += dn_fib.o dn_rules.o dn_table.o
-decnet-$(CONFIG_DECNET_FW) += dn_fw.o
 decnet-y += sysctl_net_decnet.o
+
+obj-$(CONFIG_NETFILTER) += netfilter/
+
net/decnet/Kconfig +4 -2
diff -Nru linux-2.5.68-bk10/net/decnet/Kconfig linux/net/decnet/Kconfig
@@ -17,11 +17,11 @@
 	depends on DECNET && EXPERIMENTAL
 	---help---
 	  Add support for turning your DECnet Endnode into a level 1 or 2
-	  router.  This is an unfinished option for developers only.  If you
+	  router.  This is an experimental, but functional option.  If you
 	  do say Y here, then make sure that you also say Y to "Kernel/User
 	  network link driver", "Routing messages" and "Network packet
 	  filtering".  The first two are required to allow configuration via
-	  rtnetlink (currently you need Alexey Kuznetsov's iproute2 package
+	  rtnetlink (you will need Alexey Kuznetsov's iproute2 package
 	  from <ftp://ftp.inr.ac.ru/>). The "Network packet filtering" option
 	  will be required for the forthcoming routing daemon to work.
 
@@ -34,4 +34,6 @@
 	  If you say Y here, you will be able to specify different routes for
 	  packets with different FWMARK ("firewalling mark") values
 	  (see ipchains(8), "-m" argument).
+
+source "net/decnet/netfilter/Kconfig"
 
net/decnet/netfilter/Kconfig +15 -0
diff -Nru linux-2.5.68-bk10/net/decnet/netfilter/Kconfig linux/net/decnet/netfilter/Kconfig
@@ -0,0 +1,15 @@
+#
+# DECnet netfilter configuration
+#
+
+menu "DECnet: Netfilter Configuration"
+	depends on DECNET && NETFILTER && EXPERIMENTAL
+
+config DECNET_NF_GRABULATOR
+	tristate "Routing message grabulator (for userland routing daemon)"
+	help
+	  Enable this module if you want to use the userland DECnet routing
+	  daemon. You will also need to enable routing support for DECnet
+	  unless you just want to monitor routing messages from other nodes.
+
+endmenu
net/decnet/netfilter/Makefile +6 -0
diff -Nru linux-2.5.68-bk10/net/decnet/netfilter/Makefile linux/net/decnet/netfilter/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for DECnet netfilter modules
+#
+
+obj-$(CONFIG_DECNET_NF_GRABULATOR) += dn_rtmsg.o
+
net/decnet/netfilter/dn_rtmsg.c +167 -0

167 lines not on this page · raw message