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 kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
net
/
xfrm
/
xfrm_input.c
diff --git
a/net/xfrm/xfrm_input.c
b/net/xfrm/xfrm_input.c
index
abe2e67
..
891a609
100644
(file)
--- a/
net/xfrm/xfrm_input.c
+++ b/
net/xfrm/xfrm_input.c
@@
-8,18
+8,20
@@
*/
#include <linux/slab.h>
*/
#include <linux/slab.h>
+#include <linux/module.h>
#include <net/ip.h>
#include <net/xfrm.h>
#include <net/ip.h>
#include <net/xfrm.h>
-static kmem_cache_t *secpath_cachep;
+static kmem_cache_t *secpath_cachep
__read_mostly
;
void __secpath_destroy(struct sec_path *sp)
{
int i;
for (i = 0; i < sp->len; i++)
void __secpath_destroy(struct sec_path *sp)
{
int i;
for (i = 0; i < sp->len; i++)
- xfrm_state_put(sp->x
[i].xvec
);
+ xfrm_state_put(sp->x
vec[i]
);
kmem_cache_free(secpath_cachep, sp);
}
kmem_cache_free(secpath_cachep, sp);
}
+EXPORT_SYMBOL(__secpath_destroy);
struct sec_path *secpath_dup(struct sec_path *src)
{
struct sec_path *secpath_dup(struct sec_path *src)
{
@@
-35,11
+37,12
@@
struct sec_path *secpath_dup(struct sec_path *src)
memcpy(sp, src, sizeof(*sp));
for (i = 0; i < sp->len; i++)
memcpy(sp, src, sizeof(*sp));
for (i = 0; i < sp->len; i++)
- xfrm_state_hold(sp->x
[i].xvec
);
+ xfrm_state_hold(sp->x
vec[i]
);
}
atomic_set(&sp->refcnt, 1);
return sp;
}
}
atomic_set(&sp->refcnt, 1);
return sp;
}
+EXPORT_SYMBOL(secpath_dup);
/* Fetch spi and seq from ipsec header */
/* Fetch spi and seq from ipsec header */
@@
-59,7
+62,7
@@
int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq)
case IPPROTO_COMP:
if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr)))
return -EINVAL;
case IPPROTO_COMP:
if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr)))
return -EINVAL;
- *spi =
ntoh
l(ntohs(*(u16*)(skb->h.raw + 2)));
+ *spi =
hton
l(ntohs(*(u16*)(skb->h.raw + 2)));
*seq = 0;
return 0;
default:
*seq = 0;
return 0;
default:
@@
-73,6
+76,7
@@
int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq)
*seq = *(u32*)(skb->h.raw + offset_seq);
return 0;
}
*seq = *(u32*)(skb->h.raw + offset_seq);
return 0;
}
+EXPORT_SYMBOL(xfrm_parse_spi);
void __init xfrm_input_init(void)
{
void __init xfrm_input_init(void)
{