diff options
-rw-r--r-- | include/net/inet_frag.h | 2 | ||||
-rw-r--r-- | include/net/ipv6.h | 1 | ||||
-rw-r--r-- | net/ipv4/inet_fragment.c | 6 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 15 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 1 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 13 |
6 files changed, 3 insertions, 35 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 64299266a868..954def408975 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
@@ -43,8 +43,6 @@ struct inet_frags { | |||
43 | void *arg); | 43 | void *arg); |
44 | void (*destructor)(struct inet_frag_queue *); | 44 | void (*destructor)(struct inet_frag_queue *); |
45 | void (*skb_free)(struct sk_buff *); | 45 | void (*skb_free)(struct sk_buff *); |
46 | int (*equal)(struct inet_frag_queue *q1, | ||
47 | struct inet_frag_queue *q2); | ||
48 | int (*match)(struct inet_frag_queue *q, | 46 | int (*match)(struct inet_frag_queue *q, |
49 | void *arg); | 47 | void *arg); |
50 | void (*frag_expire)(unsigned long data); | 48 | void (*frag_expire)(unsigned long data); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 005853a33ef6..ae328b680ff2 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -378,7 +378,6 @@ static inline int ipv6_prefix_equal(const struct in6_addr *a1, | |||
378 | } | 378 | } |
379 | 379 | ||
380 | struct inet_frag_queue; | 380 | struct inet_frag_queue; |
381 | int ip6_frag_equal(struct inet_frag_queue *q1, struct inet_frag_queue *q2); | ||
382 | 381 | ||
383 | struct ip6_create_arg { | 382 | struct ip6_create_arg { |
384 | __be32 id; | 383 | __be32 id; |
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 6ba98ebbed93..3ed09dd93442 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -174,7 +174,7 @@ int inet_frag_evictor(struct inet_frags *f) | |||
174 | EXPORT_SYMBOL(inet_frag_evictor); | 174 | EXPORT_SYMBOL(inet_frag_evictor); |
175 | 175 | ||
176 | static struct inet_frag_queue *inet_frag_intern(struct inet_frag_queue *qp_in, | 176 | static struct inet_frag_queue *inet_frag_intern(struct inet_frag_queue *qp_in, |
177 | struct inet_frags *f, unsigned int hash) | 177 | struct inet_frags *f, unsigned int hash, void *arg) |
178 | { | 178 | { |
179 | struct inet_frag_queue *qp; | 179 | struct inet_frag_queue *qp; |
180 | #ifdef CONFIG_SMP | 180 | #ifdef CONFIG_SMP |
@@ -188,7 +188,7 @@ static struct inet_frag_queue *inet_frag_intern(struct inet_frag_queue *qp_in, | |||
188 | * promoted read lock to write lock. | 188 | * promoted read lock to write lock. |
189 | */ | 189 | */ |
190 | hlist_for_each_entry(qp, n, &f->hash[hash], list) { | 190 | hlist_for_each_entry(qp, n, &f->hash[hash], list) { |
191 | if (f->equal(qp, qp_in)) { | 191 | if (f->match(qp, arg)) { |
192 | atomic_inc(&qp->refcnt); | 192 | atomic_inc(&qp->refcnt); |
193 | write_unlock(&f->lock); | 193 | write_unlock(&f->lock); |
194 | qp_in->last_in |= COMPLETE; | 194 | qp_in->last_in |= COMPLETE; |
@@ -235,7 +235,7 @@ static struct inet_frag_queue *inet_frag_create(struct inet_frags *f, | |||
235 | if (q == NULL) | 235 | if (q == NULL) |
236 | return NULL; | 236 | return NULL; |
237 | 237 | ||
238 | return inet_frag_intern(q, f, hash); | 238 | return inet_frag_intern(q, f, hash, arg); |
239 | } | 239 | } |
240 | 240 | ||
241 | struct inet_frag_queue *inet_frag_find(struct inet_frags *f, void *key, | 241 | struct inet_frag_queue *inet_frag_find(struct inet_frags *f, void *key, |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 928259dbc0f8..314593b20506 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -128,20 +128,6 @@ static unsigned int ip4_hashfn(struct inet_frag_queue *q) | |||
128 | return ipqhashfn(ipq->id, ipq->saddr, ipq->daddr, ipq->protocol); | 128 | return ipqhashfn(ipq->id, ipq->saddr, ipq->daddr, ipq->protocol); |
129 | } | 129 | } |
130 | 130 | ||
131 | static int ip4_frag_equal(struct inet_frag_queue *q1, | ||
132 | struct inet_frag_queue *q2) | ||
133 | { | ||
134 | struct ipq *qp1, *qp2; | ||
135 | |||
136 | qp1 = container_of(q1, struct ipq, q); | ||
137 | qp2 = container_of(q2, struct ipq, q); | ||
138 | return (qp1->id == qp2->id && | ||
139 | qp1->saddr == qp2->saddr && | ||
140 | qp1->daddr == qp2->daddr && | ||
141 | qp1->protocol == qp2->protocol && | ||
142 | qp1->user == qp2->user); | ||
143 | } | ||
144 | |||
145 | static int ip4_frag_match(struct inet_frag_queue *q, void *a) | 131 | static int ip4_frag_match(struct inet_frag_queue *q, void *a) |
146 | { | 132 | { |
147 | struct ipq *qp; | 133 | struct ipq *qp; |
@@ -631,7 +617,6 @@ void __init ipfrag_init(void) | |||
631 | ip4_frags.destructor = ip4_frag_free; | 617 | ip4_frags.destructor = ip4_frag_free; |
632 | ip4_frags.skb_free = NULL; | 618 | ip4_frags.skb_free = NULL; |
633 | ip4_frags.qsize = sizeof(struct ipq); | 619 | ip4_frags.qsize = sizeof(struct ipq); |
634 | ip4_frags.equal = ip4_frag_equal; | ||
635 | ip4_frags.match = ip4_frag_match; | 620 | ip4_frags.match = ip4_frag_match; |
636 | ip4_frags.frag_expire = ip_expire; | 621 | ip4_frags.frag_expire = ip_expire; |
637 | inet_frags_init(&ip4_frags); | 622 | inet_frags_init(&ip4_frags); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index bff63d79c644..25746d31504d 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -686,7 +686,6 @@ int nf_ct_frag6_init(void) | |||
686 | nf_frags.skb_free = nf_skb_free; | 686 | nf_frags.skb_free = nf_skb_free; |
687 | nf_frags.qsize = sizeof(struct nf_ct_frag6_queue); | 687 | nf_frags.qsize = sizeof(struct nf_ct_frag6_queue); |
688 | nf_frags.match = ip6_frag_match; | 688 | nf_frags.match = ip6_frag_match; |
689 | nf_frags.equal = ip6_frag_equal; | ||
690 | nf_frags.frag_expire = nf_ct_frag6_expire; | 689 | nf_frags.frag_expire = nf_ct_frag6_expire; |
691 | inet_frags_init(&nf_frags); | 690 | inet_frags_init(&nf_frags); |
692 | 691 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 11fffe791fc4..01766bc75b6a 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -143,18 +143,6 @@ static unsigned int ip6_hashfn(struct inet_frag_queue *q) | |||
143 | return ip6qhashfn(fq->id, &fq->saddr, &fq->daddr); | 143 | return ip6qhashfn(fq->id, &fq->saddr, &fq->daddr); |
144 | } | 144 | } |
145 | 145 | ||
146 | int ip6_frag_equal(struct inet_frag_queue *q1, struct inet_frag_queue *q2) | ||
147 | { | ||
148 | struct frag_queue *fq1, *fq2; | ||
149 | |||
150 | fq1 = container_of(q1, struct frag_queue, q); | ||
151 | fq2 = container_of(q2, struct frag_queue, q); | ||
152 | return (fq1->id == fq2->id && | ||
153 | ipv6_addr_equal(&fq2->saddr, &fq1->saddr) && | ||
154 | ipv6_addr_equal(&fq2->daddr, &fq1->daddr)); | ||
155 | } | ||
156 | EXPORT_SYMBOL(ip6_frag_equal); | ||
157 | |||
158 | int ip6_frag_match(struct inet_frag_queue *q, void *a) | 146 | int ip6_frag_match(struct inet_frag_queue *q, void *a) |
159 | { | 147 | { |
160 | struct frag_queue *fq; | 148 | struct frag_queue *fq; |
@@ -661,7 +649,6 @@ void __init ipv6_frag_init(void) | |||
661 | ip6_frags.skb_free = NULL; | 649 | ip6_frags.skb_free = NULL; |
662 | ip6_frags.qsize = sizeof(struct frag_queue); | 650 | ip6_frags.qsize = sizeof(struct frag_queue); |
663 | ip6_frags.match = ip6_frag_match; | 651 | ip6_frags.match = ip6_frag_match; |
664 | ip6_frags.equal = ip6_frag_equal; | ||
665 | ip6_frags.frag_expire = ip6_frag_expire; | 652 | ip6_frags.frag_expire = ip6_frag_expire; |
666 | inet_frags_init(&ip6_frags); | 653 | inet_frags_init(&ip6_frags); |
667 | } | 654 | } |