git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
net
/
ipv4
/
ip_fragment.c
diff --git
a/net/ipv4/ip_fragment.c
b/net/ipv4/ip_fragment.c
index
da734c4
..
8ce00d3
100644
(file)
--- a/
net/ipv4/ip_fragment.c
+++ b/
net/ipv4/ip_fragment.c
@@
-23,7
+23,6
@@
*/
#include <linux/compiler.h>
*/
#include <linux/compiler.h>
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/mm.h>
@@
-55,15
+54,15
@@
* even the most extreme cases without allowing an attacker to measurably
* harm machine performance.
*/
* even the most extreme cases without allowing an attacker to measurably
* harm machine performance.
*/
-int sysctl_ipfrag_high_thresh = 256*1024;
-int sysctl_ipfrag_low_thresh = 192*1024;
+int sysctl_ipfrag_high_thresh
__read_mostly
= 256*1024;
+int sysctl_ipfrag_low_thresh
__read_mostly
= 192*1024;
-int sysctl_ipfrag_max_dist = 64;
+int sysctl_ipfrag_max_dist
__read_mostly
= 64;
/* Important NOTE! Fragment queue must be destroyed before MSL expires.
* RFC791 is wrong proposing to prolongate timer each fragment arrival by TTL.
*/
/* Important NOTE! Fragment queue must be destroyed before MSL expires.
* RFC791 is wrong proposing to prolongate timer each fragment arrival by TTL.
*/
-int sysctl_ipfrag_time = IP_FRAG_TIME;
+int sysctl_ipfrag_time
__read_mostly
= IP_FRAG_TIME;
struct ipfrag_skb_cb
{
struct ipfrag_skb_cb
{
@@
-78,9
+77,9
@@
struct ipq {
struct hlist_node list;
struct list_head lru_list; /* lru list member */
u32 user;
struct hlist_node list;
struct list_head lru_list; /* lru list member */
u32 user;
-
u32
saddr;
-
u32
daddr;
-
u16
id;
+
__be32
saddr;
+
__be32
daddr;
+
__be16
id;
u8 protocol;
u8 last_in;
#define COMPLETE 4
u8 protocol;
u8 last_in;
#define COMPLETE 4
@@
-124,14
+123,15
@@
static __inline__ void ipq_unlink(struct ipq *ipq)
write_unlock(&ipfrag_lock);
}
write_unlock(&ipfrag_lock);
}
-static unsigned int ipqhashfn(
u16 id, u32 saddr, u
32 daddr, u8 prot)
+static unsigned int ipqhashfn(
__be16 id, __be32 saddr, __be
32 daddr, u8 prot)
{
{
- return jhash_3words((u32)id << 16 | prot, saddr, daddr,
+ return jhash_3words((__force u32)id << 16 | prot,
+ (__force u32)saddr, (__force u32)daddr,
ipfrag_hash_rnd) & (IPQ_HASHSZ - 1);
}
static struct timer_list ipfrag_secret_timer;
ipfrag_hash_rnd) & (IPQ_HASHSZ - 1);
}
static struct timer_list ipfrag_secret_timer;
-int sysctl_ipfrag_secret_interval = 10 * 60 * HZ;
+int sysctl_ipfrag_secret_interval
__read_mostly
= 10 * 60 * HZ;
static void ipfrag_secret_rebuild(unsigned long dummy)
{
static void ipfrag_secret_rebuild(unsigned long dummy)
{
@@
-388,8
+388,8
@@
out_nomem:
static inline struct ipq *ip_find(struct iphdr *iph, u32 user)
{
__be16 id = iph->id;
static inline struct ipq *ip_find(struct iphdr *iph, u32 user)
{
__be16 id = iph->id;
- __
u
32 saddr = iph->saddr;
- __
u
32 daddr = iph->daddr;
+ __
be
32 saddr = iph->saddr;
+ __
be
32 daddr = iph->daddr;
__u8 protocol = iph->protocol;
unsigned int hash;
struct ipq *qp;
__u8 protocol = iph->protocol;
unsigned int hash;
struct ipq *qp;
@@
-565,7
+565,7
@@
static void ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
} else {
struct sk_buff *free_it = next;
} else {
struct sk_buff *free_it = next;
- /* Old fragm
ne
t is completely overridden with
+ /* Old fragm
en
t is completely overridden with
* new one drop it.
*/
next = next->next;
* new one drop it.
*/
next = next->next;
@@
-666,7
+666,7
@@
static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
head->len += fp->len;
if (head->ip_summed != fp->ip_summed)
head->ip_summed = CHECKSUM_NONE;
head->len += fp->len;
if (head->ip_summed != fp->ip_summed)
head->ip_summed = CHECKSUM_NONE;
- else if (head->ip_summed == CHECKSUM_
HW
)
+ else if (head->ip_summed == CHECKSUM_
COMPLETE
)
head->csum = csum_add(head->csum, fp->csum);
head->truesize += fp->truesize;
atomic_sub(fp->truesize, &ip_frag_mem);
head->csum = csum_add(head->csum, fp->csum);
head->truesize += fp->truesize;
atomic_sub(fp->truesize, &ip_frag_mem);