mods[i].mod->evhand(NULL, MOD_UNLOAD, mods[i].mod->priv);
}
}
-/*--- end of module bindinghelper functions ---*/
+/*--- end of module binding helper functions ---*/
/*---
* Control hooks:
* - the hook names change between macros (NF_IP*) and enum NF_INET_*
*
* - the second argument to the netfilter hook is
- * struct sk_buff ** in kernels <= 2.6.22
- * struct sk_buff * in kernels > 2.6.22
+ * struct sk_buff ** in kernels <= 2.6.22
+ * struct sk_buff * in kernels > 2.6.22
*
* - NF_STOP is not defined before 2.6 so we remap it to NF_ACCEPT
*
* - the packet descriptor passed to the queue handler is
- * struct nf_info in kernels <= 2.6.24
- * struct nf_queue_entry in kernels <= 2.6.24
+ * struct nf_info in kernels <= 2.6.24
+ * struct nf_queue_entry in kernels <= 2.6.24
*
* - the arguments to the queue handler also change;
*/
-
+
/*
* declare hook to grab packets from the netfilter interface.
* The NF_* names change in different versions of linux, in some
*
* The chain is the following
* sk_buff* sock* socket* file*
- * skb -> sk ->sk_socket->file ->f_owner ->pid
- * skb -> sk ->sk_socket->file ->f_uid (direct)
- * skb -> sk ->sk_socket->file ->f_cred->fsuid (2.6.29+)
+ * skb -> sk ->sk_socket->file ->f_owner ->pid
+ * skb -> sk ->sk_socket->file ->f_uid (direct)
+ * skb -> sk ->sk_socket->file ->f_cred->fsuid (2.6.29+)
*
* Related headers:
- * linux/skbuff.h struct skbuff
- * net/sock.h struct sock
- * linux/net.h struct socket
- * linux/fs.h struct file
+ * linux/skbuff.h struct skbuff
+ * net/sock.h struct sock
+ * linux/net.h struct socket
+ * linux/fs.h struct file
*
* With vserver we may have sk->sk_xid and sk->sk_nid that
* which we store in fw_groups[1] (matches O_JAIL) and fw_groups[2]
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
/* there is no dev_net() on 2.6.25 */
#define _OPT_NET_ARG (skb->dev->nd_net),
-#else /* 2.6.26 and above */
+#else /* 2.6.26 and above */
#define _OPT_NET_ARG dev_net(skb->dev),
#endif
#endif
#endif
ret = 1;
}
- if (1 && !skb->sk) /* the reference came from the lookup */
+ if (1 || !skb->sk) /* the reference came from the lookup */
sock_put(sk);
#undef _CURR_UID
#undef _CURR_GID