diff -Nurb linux-2.6.22-521/net/netfilter/xt_MARK.c linux-2.6.22-522/net/netfilter/xt_MARK.c
--- linux-2.6.22-521/net/netfilter/xt_MARK.c 2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22-522/net/netfilter/xt_MARK.c 2008-08-04 04:59:30.000000000 -0400
++++ linux-2.6.22-522/net/netfilter/xt_MARK.c 2008-08-04 16:44:16.000000000 -0400
@@ -5,13 +5,19 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
switch (markinfo->mode) {
case XT_MARK_SET:
-@@ -58,13 +180,117 @@
+@@ -58,13 +180,121 @@
case XT_MARK_OR:
mark = (*pskb)->mark | markinfo->mark;
break;
+ if (sk && hooknum==NF_IP_LOCAL_IN) {
+ mark=sk->sk_nid;
+ }
++
++ if (sk) {
++ sock_put(sk);
++ }
+ }
+ else
+ if ((*pskb)->mark>0) /* The packet is marked, it's going out */
static int
checkentry_v0(const char *tablename,
const void *entry,
-@@ -92,7 +318,8 @@
+@@ -92,7 +322,8 @@
if (markinfo->mode != XT_MARK_SET
&& markinfo->mode != XT_MARK_AND