OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 7... Line 7...
7 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 7 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
8 --- 8 ---
Line 9... Line 9...
9   9  
10 --- a/include/linux/netfilter.h 10 --- a/include/linux/netfilter.h
11 +++ b/include/linux/netfilter.h 11 +++ b/include/linux/netfilter.h
Line 12... Line 12...
12 @@ -311,7 +311,6 @@ struct nf_queue_entry; 12 @@ -274,7 +274,6 @@ struct nf_queue_entry;
13 13
14 struct nf_afinfo { 14 struct nf_afinfo {
15 unsigned short family; 15 unsigned short family;
Line 27... Line 27...
27 }; 27 };
Line 28... Line 28...
28 28
29 static int __init ipv4_netfilter_init(void) 29 static int __init ipv4_netfilter_init(void)
30 --- a/net/ipv6/netfilter.c 30 --- a/net/ipv6/netfilter.c
31 +++ b/net/ipv6/netfilter.c 31 +++ b/net/ipv6/netfilter.c
Line 32... Line 32...
32 @@ -178,7 +178,6 @@ static const struct nf_ipv6_ops ipv6ops 32 @@ -177,7 +177,6 @@ static const struct nf_ipv6_ops ipv6ops
33 33
34 static const struct nf_afinfo nf_ip6_afinfo = { 34 static const struct nf_afinfo nf_ip6_afinfo = {
35 .family = AF_INET6, 35 .family = AF_INET6,
Line 46... Line 46...
46 +#include <linux/netfilter_ipv4.h> 46 +#include <linux/netfilter_ipv4.h>
47 +#include <linux/netfilter_ipv6.h> 47 +#include <linux/netfilter_ipv6.h>
48 #include <net/protocol.h> 48 #include <net/protocol.h>
49 #include <net/netfilter/nf_queue.h> 49 #include <net/netfilter/nf_queue.h>
50 #include <net/dst.h> 50 #include <net/dst.h>
51 @@ -145,9 +147,9 @@ static int __nf_queue(struct sk_buff *sk 51 @@ -148,9 +150,9 @@ static int __nf_queue(struct sk_buff *sk
52 { 52 {
53 int status = -ENOENT; 53 int status = -ENOENT;
54 struct nf_queue_entry *entry = NULL; 54 struct nf_queue_entry *entry = NULL;
55 - const struct nf_afinfo *afinfo; 55 - const struct nf_afinfo *afinfo;
56 const struct nf_queue_handler *qh; 56 const struct nf_queue_handler *qh;
57 struct net *net = state->net; 57 struct net *net = state->net;
58 + unsigned int route_key_size; 58 + unsigned int route_key_size;
Line 59... Line 59...
59 59
60 /* QUEUE == DROP if no one is waiting, to be safe. */ 60 /* QUEUE == DROP if no one is waiting, to be safe. */
61 qh = rcu_dereference(net->nf.queue_handler); 61 qh = rcu_dereference(net->nf.queue_handler);
62 @@ -156,11 +158,19 @@ static int __nf_queue(struct sk_buff *sk 62 @@ -159,11 +161,19 @@ static int __nf_queue(struct sk_buff *sk
63 goto err; 63 goto err;
Line 64... Line 64...
64 } 64 }
65 65
Line 81... Line 81...
81 - entry = kmalloc(sizeof(*entry) + afinfo->route_key_size, GFP_ATOMIC); 81 - entry = kmalloc(sizeof(*entry) + afinfo->route_key_size, GFP_ATOMIC);
82 + entry = kmalloc(sizeof(*entry) + route_key_size, GFP_ATOMIC); 82 + entry = kmalloc(sizeof(*entry) + route_key_size, GFP_ATOMIC);
83 if (!entry) { 83 if (!entry) {
84 status = -ENOMEM; 84 status = -ENOMEM;
85 goto err; 85 goto err;
86 @@ -170,7 +180,7 @@ static int __nf_queue(struct sk_buff *sk 86 @@ -173,7 +183,7 @@ static int __nf_queue(struct sk_buff *sk
87 .skb = skb, 87 .skb = skb,
88 .state = *state, 88 .state = *state,
89 .hook_index = index, 89 .hook_index = index,
90 - .size = sizeof(*entry) + afinfo->route_key_size, 90 - .size = sizeof(*entry) + afinfo->route_key_size,
91 + .size = sizeof(*entry) + route_key_size, 91 + .size = sizeof(*entry) + route_key_size,