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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
ipv4
/
netfilter
/
ip_nat_ftp.c
diff --git
a/net/ipv4/netfilter/ip_nat_ftp.c
b/net/ipv4/netfilter/ip_nat_ftp.c
index
b8daab3
..
913960e
100644
(file)
--- a/
net/ipv4/netfilter/ip_nat_ftp.c
+++ b/
net/ipv4/netfilter/ip_nat_ftp.c
@@
-34,7
+34,7
@@
MODULE_DESCRIPTION("ftp NAT helper");
static int
mangle_rfc959_packet(struct sk_buff **pskb,
static int
mangle_rfc959_packet(struct sk_buff **pskb,
-
u_int32_t
newip,
+
__be32
newip,
u_int16_t port,
unsigned int matchoff,
unsigned int matchlen,
u_int16_t port,
unsigned int matchoff,
unsigned int matchlen,
@@
-57,7
+57,7
@@
mangle_rfc959_packet(struct sk_buff **pskb,
/* |1|132.235.1.2|6275| */
static int
mangle_eprt_packet(struct sk_buff **pskb,
/* |1|132.235.1.2|6275| */
static int
mangle_eprt_packet(struct sk_buff **pskb,
-
u_int32_t
newip,
+
__be32
newip,
u_int16_t port,
unsigned int matchoff,
unsigned int matchlen,
u_int16_t port,
unsigned int matchoff,
unsigned int matchlen,
@@
-79,7
+79,7
@@
mangle_eprt_packet(struct sk_buff **pskb,
/* |1|132.235.1.2|6275| */
static int
mangle_epsv_packet(struct sk_buff **pskb,
/* |1|132.235.1.2|6275| */
static int
mangle_epsv_packet(struct sk_buff **pskb,
-
u_int32_t
newip,
+
__be32
newip,
u_int16_t port,
unsigned int matchoff,
unsigned int matchlen,
u_int16_t port,
unsigned int matchoff,
unsigned int matchlen,
@@
-98,7
+98,7
@@
mangle_epsv_packet(struct sk_buff **pskb,
matchlen, buffer, strlen(buffer));
}
matchlen, buffer, strlen(buffer));
}
-static int (*mangle[])(struct sk_buff **,
u_int32_t
, u_int16_t,
+static int (*mangle[])(struct sk_buff **,
__be32
, u_int16_t,
unsigned int,
unsigned int,
struct ip_conntrack *,
unsigned int,
unsigned int,
struct ip_conntrack *,
@@
-120,7
+120,7
@@
static unsigned int ip_nat_ftp(struct sk_buff **pskb,
struct ip_conntrack_expect *exp,
u32 *seq)
{
struct ip_conntrack_expect *exp,
u32 *seq)
{
-
u_int32_t
newip;
+
__be32
newip;
u_int16_t port;
int dir = CTINFO2DIR(ctinfo);
struct ip_conntrack *ct = exp->master;
u_int16_t port;
int dir = CTINFO2DIR(ctinfo);
struct ip_conntrack *ct = exp->master;
@@
-154,17
+154,16
@@
static unsigned int ip_nat_ftp(struct sk_buff **pskb,
return NF_ACCEPT;
}
return NF_ACCEPT;
}
-static void __exit fini(void)
+static void __exit
ip_nat_ftp_
fini(void)
{
{
- ip_nat_ftp_hook = NULL;
- /* Make sure noone calls it, meanwhile. */
- synchronize_net();
+ rcu_assign_pointer(ip_nat_ftp_hook, NULL);
+ synchronize_rcu();
}
}
-static int __init init(void)
+static int __init i
p_nat_ftp_i
nit(void)
{
{
- BUG_ON(
ip_nat_ftp_hook
);
-
ip_nat_ftp_hook = ip_nat_ftp
;
+ BUG_ON(
rcu_dereference(ip_nat_ftp_hook)
);
+
rcu_assign_pointer(ip_nat_ftp_hook, ip_nat_ftp)
;
return 0;
}
return 0;
}
@@
-177,5
+176,5
@@
static int warn_set(const char *val, struct kernel_param *kp)
}
module_param_call(ports, warn_set, NULL, NULL, 0);
}
module_param_call(ports, warn_set, NULL, NULL, 0);
-module_init(init);
-module_exit(fini);
+module_init(i
p_nat_ftp_i
nit);
+module_exit(
ip_nat_ftp_
fini);