From 663edf3e03054e995dccb4fc16a2af07cea8a72e Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Sat, 8 Dec 2007 00:14:11 -0800 Subject: [PATCH] --- yaml --- r: 78375 b: refs/heads/master c: c35b7e72cd48bc7163b6900fb3689fa54b572bba h: refs/heads/master i: 78373: 4b203c8e343f17dba5a7fc7afd1d34ae86c6dd4d 78371: d0099fad6cd75d1cb5f92876a2b05ede07cb3e7d 78367: 1c146da357724912bb1dc6283c7780f6cd018159 v: v3 --- [refs] | 2 +- trunk/include/net/xfrm.h | 16 +++++++++++++--- trunk/net/ipv6/route.c | 7 +------ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 78fd42c138df..b074417a377f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 75314fb38364c81a573cd222f74d792409a7afba +refs/heads/master: c35b7e72cd48bc7163b6900fb3689fa54b572bba diff --git a/trunk/include/net/xfrm.h b/trunk/include/net/xfrm.h index 18260921eeb5..503d0d294a4c 100644 --- a/trunk/include/net/xfrm.h +++ b/trunk/include/net/xfrm.h @@ -842,7 +842,6 @@ xfrm_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x, unsigned short } #ifdef CONFIG_XFRM - extern int __xfrm_policy_check(struct sock *, int dir, struct sk_buff *skb, unsigned short family); static inline int xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, unsigned short family) @@ -1066,12 +1065,23 @@ struct xfrm6_tunnel { extern void xfrm_init(void); extern void xfrm4_init(void); -extern int xfrm6_init(void); -extern void xfrm6_fini(void); extern void xfrm_state_init(void); extern void xfrm4_state_init(void); +#ifdef CONFIG_XFRM +extern int xfrm6_init(void); +extern void xfrm6_fini(void); extern int xfrm6_state_init(void); extern void xfrm6_state_fini(void); +#else +static inline int xfrm6_init(void) +{ + return 0; +} +static inline void xfrm6_fini(void) +{ + ; +} +#endif extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *); extern struct xfrm_state *xfrm_state_alloc(void); diff --git a/trunk/net/ipv6/route.c b/trunk/net/ipv6/route.c index dbdae143ef5f..c4e890abb2d4 100644 --- a/trunk/net/ipv6/route.c +++ b/trunk/net/ipv6/route.c @@ -2522,11 +2522,10 @@ int __init ip6_route_init(void) if (ret) goto out_fib6_init; -#ifdef CONFIG_XFRM ret = xfrm6_init(); if (ret) goto out_proc_init; -#endif + #ifdef CONFIG_IPV6_MULTIPLE_TABLES ret = fib6_rules_init(); if (ret) @@ -2547,9 +2546,7 @@ int __init ip6_route_init(void) fib6_rules_cleanup(); xfrm6_init: #endif -#ifdef CONFIG_XFRM xfrm6_fini(); -#endif out_proc_init: ipv6_route_proc_fini(&init_net); out_fib6_init: @@ -2566,9 +2563,7 @@ void ip6_route_cleanup(void) fib6_rules_cleanup(); #endif ipv6_route_proc_fini(&init_net); -#ifdef CONFIG_XFRM xfrm6_fini(); -#endif rt6_ifdown(NULL); fib6_gc_cleanup(); kmem_cache_destroy(ip6_dst_ops.kmem_cachep);