git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
[safe/jmp/linux-2.6]
/
net
/
ipv6
/
netfilter
/
ip6_queue.c
diff --git
a/net/ipv6/netfilter/ip6_queue.c
b/net/ipv6/netfilter/ip6_queue.c
index
2eff3ae
..
db4d572
100644
(file)
--- a/
net/ipv6/netfilter/ip6_queue.c
+++ b/
net/ipv6/netfilter/ip6_queue.c
@@
-159,7
+159,6
@@
ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
case IPQ_COPY_META:
case IPQ_COPY_NONE:
size = NLMSG_SPACE(sizeof(*pmsg));
case IPQ_COPY_META:
case IPQ_COPY_NONE:
size = NLMSG_SPACE(sizeof(*pmsg));
- data_len = 0;
break;
case IPQ_COPY_PACKET:
break;
case IPQ_COPY_PACKET:
@@
-226,8
+225,6
@@
ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
return skb;
nlmsg_failure:
return skb;
nlmsg_failure:
- if (skb)
- kfree_skb(skb);
*errp = -EINVAL;
printk(KERN_ERR "ip6_queue: error creating packet message\n");
return NULL;
*errp = -EINVAL;
printk(KERN_ERR "ip6_queue: error creating packet message\n");
return NULL;
@@
-483,7
+480,7
@@
ipq_rcv_dev_event(struct notifier_block *this,
{
struct net_device *dev = ptr;
{
struct net_device *dev = ptr;
- if (
dev_net(dev) != &init_net
)
+ if (
!net_eq(dev_net(dev), &init_net)
)
return NOTIFY_DONE;
/* Drop any packets associated with the downed device */
return NOTIFY_DONE;
/* Drop any packets associated with the downed device */
@@
-502,10
+499,9
@@
ipq_rcv_nl_event(struct notifier_block *this,
{
struct netlink_notify *n = ptr;
{
struct netlink_notify *n = ptr;
- if (event == NETLINK_URELEASE &&
- n->protocol == NETLINK_IP6_FW && n->pid) {
+ if (event == NETLINK_URELEASE && n->protocol == NETLINK_IP6_FW) {
write_lock_bh(&queue_lock);
write_lock_bh(&queue_lock);
- if ((n
->net == &init_net
) && (n->pid == peer_pid))
+ if ((n
et_eq(n->net, &init_net)
) && (n->pid == peer_pid))
__ipq_reset();
write_unlock_bh(&queue_lock);
}
__ipq_reset();
write_unlock_bh(&queue_lock);
}
@@
-601,7
+597,7
@@
static int __init ip6_queue_init(void)
#ifdef CONFIG_SYSCTL
ipq_sysctl_header = register_sysctl_paths(net_ipv6_ctl_path, ipq_table);
#endif
#ifdef CONFIG_SYSCTL
ipq_sysctl_header = register_sysctl_paths(net_ipv6_ctl_path, ipq_table);
#endif
- status = nf_register_queue_handler(
PF_INET
6, &nfqh);
+ status = nf_register_queue_handler(
NFPROTO_IPV
6, &nfqh);
if (status < 0) {
printk(KERN_ERR "ip6_queue: failed to register queue handler\n");
goto cleanup_sysctl;
if (status < 0) {
printk(KERN_ERR "ip6_queue: failed to register queue handler\n");
goto cleanup_sysctl;
@@
-628,7
+624,7
@@
cleanup_netlink_notifier:
static void __exit ip6_queue_fini(void)
{
nf_unregister_queue_handlers(&nfqh);
static void __exit ip6_queue_fini(void)
{
nf_unregister_queue_handlers(&nfqh);
- synchronize_net();
+
ipq_flush(NULL, 0);
#ifdef CONFIG_SYSCTL
ipq_flush(NULL, 0);
#ifdef CONFIG_SYSCTL
@@
-646,6
+642,7
@@
static void __exit ip6_queue_fini(void)
MODULE_DESCRIPTION("IPv6 packet queue handler");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("IPv6 packet queue handler");
MODULE_LICENSE("GPL");
+MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_IP6_FW);
module_init(ip6_queue_init);
module_exit(ip6_queue_fini);
module_init(ip6_queue_init);
module_exit(ip6_queue_fini);