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
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
ipv4
/
netfilter
/
ip_nat_proto_gre.c
diff --git
a/net/ipv4/netfilter/ip_nat_proto_gre.c
b/net/ipv4/netfilter/ip_nat_proto_gre.c
index
38acfdf
..
6c4899d
100644
(file)
--- a/
net/ipv4/netfilter/ip_nat_proto_gre.c
+++ b/
net/ipv4/netfilter/ip_nat_proto_gre.c
@@
-23,6
+23,7
@@
*
*/
*
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/ip.h>
#include <linux/netfilter_ipv4/ip_nat.h>
#include <linux/module.h>
#include <linux/ip.h>
#include <linux/netfilter_ipv4/ip_nat.h>
@@
-48,15
+49,15
@@
gre_in_range(const struct ip_conntrack_tuple *tuple,
const union ip_conntrack_manip_proto *min,
const union ip_conntrack_manip_proto *max)
{
const union ip_conntrack_manip_proto *min,
const union ip_conntrack_manip_proto *max)
{
-
__be16
key;
+
u_int32_t
key;
if (maniptype == IP_NAT_MANIP_SRC)
key = tuple->src.u.gre.key;
else
key = tuple->dst.u.gre.key;
if (maniptype == IP_NAT_MANIP_SRC)
key = tuple->src.u.gre.key;
else
key = tuple->dst.u.gre.key;
- return ntoh
s(key) >= ntohs
(min->gre.key)
- && ntoh
s(key) <= ntohs
(max->gre.key);
+ return ntoh
l(key) >= ntohl
(min->gre.key)
+ && ntoh
l(key) <= ntohl
(max->gre.key);
}
/* generate unique tuple ... */
}
/* generate unique tuple ... */
@@
-80,14
+81,14
@@
gre_unique_tuple(struct ip_conntrack_tuple *tuple,
min = 1;
range_size = 0xffff;
} else {
min = 1;
range_size = 0xffff;
} else {
- min = ntoh
s
(range->min.gre.key);
- range_size = ntoh
s
(range->max.gre.key) - min + 1;
+ min = ntoh
l
(range->min.gre.key);
+ range_size = ntoh
l
(range->max.gre.key) - min + 1;
}
DEBUGP("min = %u, range_size = %u\n", min, range_size);
for (i = 0; i < range_size; i++, key++) {
}
DEBUGP("min = %u, range_size = %u\n", min, range_size);
for (i = 0; i < range_size; i++, key++) {
- *keyptr = hton
s
(min + key % range_size);
+ *keyptr = hton
l
(min + key % range_size);
if (!ip_nat_used_tuple(tuple, conntrack))
return 1;
}
if (!ip_nat_used_tuple(tuple, conntrack))
return 1;
}