[PATCH] Re: libipq questions
James Morris
jmorris@intercode.com.au
Mon, 19 Jun 2000 22:34:48 +1000 (EST)
On Fri, 16 Jun 2000, Sebastian Zander wrote:
> > > My second question is: struct ipq_packet_msg contains a mark field. So
> > > i thought this mark value could be set with the iptables mark target. But
> > > setting mark to any value and queuing up the packet from the mangle table
> > > always results in ipq_packet_msg mark beeing 0 in userspace. Is this a bug
> > > or am i just too clueless.
> > >
Thanks for the report, fix below and in cvs.
(I'm not sure if it was always like this or if the line of code fell out
somewhere along the way).
- James
--
James Morris
<jmorris@intercode.com.au>
diff -urN linux-2.4.0test1-ac21.orig/net/ipv4/netfilter/ip_queue.c linux/net/ipv4/netfilter/ip_queue.c
--- linux-2.4.0test1-ac21.orig/net/ipv4/netfilter/ip_queue.c Mon Jun 19 21:39:03 2000
+++ linux/net/ipv4/netfilter/ip_queue.c Mon Jun 19 21:57:51 2000
@@ -6,6 +6,8 @@
*
* 2000-03-27: Simplified code (thanks to Andi Kleen for clues). (JM)
* 2000-05-20: Fixed notifier problems (following Miguel Freitas' report). (JM)
+ * 2000-06-19: Fixed so nfmark is copied to metadata (reported by Sebastian
+ * Zander). (JM)
*
*/
#include <linux/module.h>
@@ -391,6 +393,7 @@
pm->data_len = data_len;
pm->timestamp_sec = e->skb->stamp.tv_sec;
pm->timestamp_usec = e->skb->stamp.tv_usec;
+ pm->mark = e->skb->nfmark;
pm->hook = e->info->hook;
if (e->info->indev) strcpy(pm->indev_name, e->info->indev->name);
else pm->indev_name[0] = '\0';