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
/
ipcomp.c
diff --git
a/net/ipv4/ipcomp.c
b/net/ipv4/ipcomp.c
index
1a23c52
..
d64e2ec
100644
(file)
--- a/
net/ipv4/ipcomp.c
+++ b/
net/ipv4/ipcomp.c
@@
-28,6
+28,7
@@
#include <net/xfrm.h>
#include <net/icmp.h>
#include <net/ipcomp.h>
#include <net/xfrm.h>
#include <net/icmp.h>
#include <net/ipcomp.h>
+#include <net/protocol.h>
struct ipcomp_tfms {
struct list_head list;
struct ipcomp_tfms {
struct list_head list;
@@
-214,8
+215,8
@@
static void ipcomp4_err(struct sk_buff *skb, u32 info)
spi, IPPROTO_COMP, AF_INET);
if (!x)
return;
spi, IPPROTO_COMP, AF_INET);
if (!x)
return;
- NETDEBUG(
printk(
KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/%u.%u.%u.%u\n",
-
spi, NIPQUAD(iph->daddr)
));
+ NETDEBUG(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/%u.%u.%u.%u\n",
+
spi, NIPQUAD(iph->daddr
));
xfrm_state_put(x);
}
xfrm_state_put(x);
}
@@
-236,15
+237,10
@@
static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x)
t->props.mode = 1;
t->props.saddr.a4 = x->props.saddr.a4;
t->props.flags = x->props.flags;
t->props.mode = 1;
t->props.saddr.a4 = x->props.saddr.a4;
t->props.flags = x->props.flags;
-
- t->type = xfrm_get_type(IPPROTO_IPIP, t->props.family);
- if (t->type == NULL)
- goto error;
-
- if (t->type->init_state(t, NULL))
+
+ if (xfrm_init_state(t))
goto error;
goto error;
- t->km.state = XFRM_STATE_VALID;
atomic_set(&t->tunnel_users, 1);
out:
return t;
atomic_set(&t->tunnel_users, 1);
out:
return t;
@@
-350,8
+346,7
@@
static void ipcomp_free_tfms(struct crypto_tfm **tfms)
for_each_cpu(cpu) {
struct crypto_tfm *tfm = *per_cpu_ptr(tfms, cpu);
for_each_cpu(cpu) {
struct crypto_tfm *tfm = *per_cpu_ptr(tfms, cpu);
- if (tfm)
- crypto_free_tfm(tfm);
+ crypto_free_tfm(tfm);
}
free_percpu(tfms);
}
}
free_percpu(tfms);
}
@@
-363,7
+358,7
@@
static struct crypto_tfm **ipcomp_alloc_tfms(const char *alg_name)
int cpu;
/* This can be any valid CPU ID so we don't need locking. */
int cpu;
/* This can be any valid CPU ID so we don't need locking. */
- cpu = smp_processor_id();
+ cpu =
raw_
smp_processor_id();
list_for_each_entry(pos, &ipcomp_tfms_list, list) {
struct crypto_tfm *tfm;
list_for_each_entry(pos, &ipcomp_tfms_list, list) {
struct crypto_tfm *tfm;
@@
-422,7
+417,7
@@
static void ipcomp_destroy(struct xfrm_state *x)
kfree(ipcd);
}
kfree(ipcd);
}
-static int ipcomp_init_state(struct xfrm_state *x
, void *args
)
+static int ipcomp_init_state(struct xfrm_state *x)
{
int err;
struct ipcomp_data *ipcd;
{
int err;
struct ipcomp_data *ipcd;