Blame view
net/ipv6/xfrm6_tunnel.c
9.93 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 3 4 5 6 7 |
/* * Copyright (C)2003,2004 USAGI/WIDE Project * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. |
1ab1457c4 [NET] IPV6: Fix w... |
8 |
* |
1da177e4c Linux-2.6.12-rc2 |
9 10 11 12 |
* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. |
1ab1457c4 [NET] IPV6: Fix w... |
13 |
* |
1da177e4c Linux-2.6.12-rc2 |
14 15 16 17 18 19 20 21 22 23 |
* You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors Mitsuru KANDA <mk@linux-ipv6.org> * YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> * * Based on net/ipv4/xfrm4_tunnel.c * */ |
1da177e4c Linux-2.6.12-rc2 |
24 25 |
#include <linux/module.h> #include <linux/xfrm.h> |
5a0e3ad6a include cleanup: ... |
26 |
#include <linux/slab.h> |
91cc3bb0b xfrm6_tunnel: RCU... |
27 |
#include <linux/rculist.h> |
1da177e4c Linux-2.6.12-rc2 |
28 29 30 |
#include <net/ip.h> #include <net/xfrm.h> #include <net/ipv6.h> |
1da177e4c Linux-2.6.12-rc2 |
31 32 |
#include <linux/ipv6.h> #include <linux/icmpv6.h> |
4a3e2f711 [NET] sem2mutex: ... |
33 |
#include <linux/mutex.h> |
a16647739 netns xfrm: xfrm6... |
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
#include <net/netns/generic.h> #define XFRM6_TUNNEL_SPI_BYADDR_HSIZE 256 #define XFRM6_TUNNEL_SPI_BYSPI_HSIZE 256 #define XFRM6_TUNNEL_SPI_MIN 1 #define XFRM6_TUNNEL_SPI_MAX 0xffffffff struct xfrm6_tunnel_net { struct hlist_head spi_byaddr[XFRM6_TUNNEL_SPI_BYADDR_HSIZE]; struct hlist_head spi_byspi[XFRM6_TUNNEL_SPI_BYSPI_HSIZE]; u32 spi; }; static int xfrm6_tunnel_net_id __read_mostly; static inline struct xfrm6_tunnel_net *xfrm6_tunnel_pernet(struct net *net) { return net_generic(net, xfrm6_tunnel_net_id); } |
1da177e4c Linux-2.6.12-rc2 |
53 |
|
1da177e4c Linux-2.6.12-rc2 |
54 |
/* |
1ab1457c4 [NET] IPV6: Fix w... |
55 |
* xfrm_tunnel_spi things are for allocating unique id ("spi") |
1da177e4c Linux-2.6.12-rc2 |
56 57 58 |
* per xfrm_address_t. */ struct xfrm6_tunnel_spi { |
91cc3bb0b xfrm6_tunnel: RCU... |
59 60 61 62 63 64 |
struct hlist_node list_byaddr; struct hlist_node list_byspi; xfrm_address_t addr; u32 spi; atomic_t refcnt; struct rcu_head rcu_head; |
1da177e4c Linux-2.6.12-rc2 |
65 |
}; |
91cc3bb0b xfrm6_tunnel: RCU... |
66 |
static DEFINE_SPINLOCK(xfrm6_tunnel_spi_lock); |
1da177e4c Linux-2.6.12-rc2 |
67 |
|
e18b890bb [PATCH] slab: rem... |
68 |
static struct kmem_cache *xfrm6_tunnel_spi_kmem __read_mostly; |
1da177e4c Linux-2.6.12-rc2 |
69 |
|
b71d1d426 inet: constify ip... |
70 |
static inline unsigned xfrm6_tunnel_spi_hash_byaddr(const xfrm_address_t *addr) |
1da177e4c Linux-2.6.12-rc2 |
71 72 |
{ unsigned h; |
8c689a6ea [XFRM]: misc anno... |
73 |
h = (__force u32)(addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]); |
1da177e4c Linux-2.6.12-rc2 |
74 75 76 |
h ^= h >> 16; h ^= h >> 8; h &= XFRM6_TUNNEL_SPI_BYADDR_HSIZE - 1; |
1da177e4c Linux-2.6.12-rc2 |
77 78 |
return h; } |
b6f99a211 [NET]: fix up mis... |
79 |
static inline unsigned xfrm6_tunnel_spi_hash_byspi(u32 spi) |
1da177e4c Linux-2.6.12-rc2 |
80 81 82 |
{ return spi % XFRM6_TUNNEL_SPI_BYSPI_HSIZE; } |
b71d1d426 inet: constify ip... |
83 |
static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) |
1da177e4c Linux-2.6.12-rc2 |
84 |
{ |
a16647739 netns xfrm: xfrm6... |
85 |
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); |
1da177e4c Linux-2.6.12-rc2 |
86 87 |
struct xfrm6_tunnel_spi *x6spi; struct hlist_node *pos; |
91cc3bb0b xfrm6_tunnel: RCU... |
88 |
hlist_for_each_entry_rcu(x6spi, pos, |
a16647739 netns xfrm: xfrm6... |
89 |
&xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)], |
1da177e4c Linux-2.6.12-rc2 |
90 |
list_byaddr) { |
a922ba551 [IPV6] xfrm6_tunn... |
91 |
if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) |
1da177e4c Linux-2.6.12-rc2 |
92 |
return x6spi; |
1da177e4c Linux-2.6.12-rc2 |
93 |
} |
1da177e4c Linux-2.6.12-rc2 |
94 95 |
return NULL; } |
b71d1d426 inet: constify ip... |
96 |
__be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) |
1da177e4c Linux-2.6.12-rc2 |
97 98 99 |
{ struct xfrm6_tunnel_spi *x6spi; u32 spi; |
91cc3bb0b xfrm6_tunnel: RCU... |
100 |
rcu_read_lock_bh(); |
a16647739 netns xfrm: xfrm6... |
101 |
x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); |
1da177e4c Linux-2.6.12-rc2 |
102 |
spi = x6spi ? x6spi->spi : 0; |
91cc3bb0b xfrm6_tunnel: RCU... |
103 |
rcu_read_unlock_bh(); |
5b1225454 [IPV6]: File the ... |
104 |
return htonl(spi); |
1da177e4c Linux-2.6.12-rc2 |
105 106 107 |
} EXPORT_SYMBOL(xfrm6_tunnel_spi_lookup); |
a16647739 netns xfrm: xfrm6... |
108 |
static int __xfrm6_tunnel_spi_check(struct net *net, u32 spi) |
df8ea19b5 [XFRM] IPV6: Opti... |
109 |
{ |
a16647739 netns xfrm: xfrm6... |
110 |
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); |
df8ea19b5 [XFRM] IPV6: Opti... |
111 112 113 114 115 |
struct xfrm6_tunnel_spi *x6spi; int index = xfrm6_tunnel_spi_hash_byspi(spi); struct hlist_node *pos; hlist_for_each_entry(x6spi, pos, |
a16647739 netns xfrm: xfrm6... |
116 |
&xfrm6_tn->spi_byspi[index], |
df8ea19b5 [XFRM] IPV6: Opti... |
117 118 119 120 121 122 |
list_byspi) { if (x6spi->spi == spi) return -1; } return index; } |
a16647739 netns xfrm: xfrm6... |
123 |
static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) |
1da177e4c Linux-2.6.12-rc2 |
124 |
{ |
a16647739 netns xfrm: xfrm6... |
125 |
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); |
1da177e4c Linux-2.6.12-rc2 |
126 127 |
u32 spi; struct xfrm6_tunnel_spi *x6spi; |
df8ea19b5 [XFRM] IPV6: Opti... |
128 |
int index; |
1da177e4c Linux-2.6.12-rc2 |
129 |
|
a16647739 netns xfrm: xfrm6... |
130 131 132 |
if (xfrm6_tn->spi < XFRM6_TUNNEL_SPI_MIN || xfrm6_tn->spi >= XFRM6_TUNNEL_SPI_MAX) xfrm6_tn->spi = XFRM6_TUNNEL_SPI_MIN; |
1da177e4c Linux-2.6.12-rc2 |
133 |
else |
a16647739 netns xfrm: xfrm6... |
134 |
xfrm6_tn->spi++; |
1da177e4c Linux-2.6.12-rc2 |
135 |
|
a16647739 netns xfrm: xfrm6... |
136 137 |
for (spi = xfrm6_tn->spi; spi <= XFRM6_TUNNEL_SPI_MAX; spi++) { index = __xfrm6_tunnel_spi_check(net, spi); |
df8ea19b5 [XFRM] IPV6: Opti... |
138 139 |
if (index >= 0) goto alloc_spi; |
1da177e4c Linux-2.6.12-rc2 |
140 |
} |
a16647739 netns xfrm: xfrm6... |
141 142 |
for (spi = XFRM6_TUNNEL_SPI_MIN; spi < xfrm6_tn->spi; spi++) { index = __xfrm6_tunnel_spi_check(net, spi); |
df8ea19b5 [XFRM] IPV6: Opti... |
143 144 |
if (index >= 0) goto alloc_spi; |
1da177e4c Linux-2.6.12-rc2 |
145 146 147 148 |
} spi = 0; goto out; alloc_spi: |
a16647739 netns xfrm: xfrm6... |
149 |
xfrm6_tn->spi = spi; |
54e6ecb23 [PATCH] slab: rem... |
150 |
x6spi = kmem_cache_alloc(xfrm6_tunnel_spi_kmem, GFP_ATOMIC); |
a922ba551 [IPV6] xfrm6_tunn... |
151 |
if (!x6spi) |
1da177e4c Linux-2.6.12-rc2 |
152 |
goto out; |
a922ba551 [IPV6] xfrm6_tunn... |
153 |
|
1da177e4c Linux-2.6.12-rc2 |
154 155 156 |
memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); x6spi->spi = spi; atomic_set(&x6spi->refcnt, 1); |
a16647739 netns xfrm: xfrm6... |
157 |
hlist_add_head_rcu(&x6spi->list_byspi, &xfrm6_tn->spi_byspi[index]); |
1da177e4c Linux-2.6.12-rc2 |
158 159 |
index = xfrm6_tunnel_spi_hash_byaddr(saddr); |
a16647739 netns xfrm: xfrm6... |
160 |
hlist_add_head_rcu(&x6spi->list_byaddr, &xfrm6_tn->spi_byaddr[index]); |
1da177e4c Linux-2.6.12-rc2 |
161 |
out: |
1da177e4c Linux-2.6.12-rc2 |
162 163 |
return spi; } |
a16647739 netns xfrm: xfrm6... |
164 |
__be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) |
1da177e4c Linux-2.6.12-rc2 |
165 166 167 |
{ struct xfrm6_tunnel_spi *x6spi; u32 spi; |
91cc3bb0b xfrm6_tunnel: RCU... |
168 |
spin_lock_bh(&xfrm6_tunnel_spi_lock); |
a16647739 netns xfrm: xfrm6... |
169 |
x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); |
1da177e4c Linux-2.6.12-rc2 |
170 171 172 173 |
if (x6spi) { atomic_inc(&x6spi->refcnt); spi = x6spi->spi; } else |
a16647739 netns xfrm: xfrm6... |
174 |
spi = __xfrm6_tunnel_alloc_spi(net, saddr); |
91cc3bb0b xfrm6_tunnel: RCU... |
175 |
spin_unlock_bh(&xfrm6_tunnel_spi_lock); |
1da177e4c Linux-2.6.12-rc2 |
176 |
|
5b1225454 [IPV6]: File the ... |
177 |
return htonl(spi); |
1da177e4c Linux-2.6.12-rc2 |
178 179 180 |
} EXPORT_SYMBOL(xfrm6_tunnel_alloc_spi); |
91cc3bb0b xfrm6_tunnel: RCU... |
181 182 183 184 185 |
static void x6spi_destroy_rcu(struct rcu_head *head) { kmem_cache_free(xfrm6_tunnel_spi_kmem, container_of(head, struct xfrm6_tunnel_spi, rcu_head)); } |
6f747aca5 xfrm6: make xfrm6... |
186 |
static void xfrm6_tunnel_free_spi(struct net *net, xfrm_address_t *saddr) |
1da177e4c Linux-2.6.12-rc2 |
187 |
{ |
a16647739 netns xfrm: xfrm6... |
188 |
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); |
1da177e4c Linux-2.6.12-rc2 |
189 190 |
struct xfrm6_tunnel_spi *x6spi; struct hlist_node *pos, *n; |
91cc3bb0b xfrm6_tunnel: RCU... |
191 |
spin_lock_bh(&xfrm6_tunnel_spi_lock); |
1da177e4c Linux-2.6.12-rc2 |
192 |
|
1ab1457c4 [NET] IPV6: Fix w... |
193 |
hlist_for_each_entry_safe(x6spi, pos, n, |
a16647739 netns xfrm: xfrm6... |
194 |
&xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)], |
1da177e4c Linux-2.6.12-rc2 |
195 196 197 |
list_byaddr) { if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) { |
1da177e4c Linux-2.6.12-rc2 |
198 |
if (atomic_dec_and_test(&x6spi->refcnt)) { |
91cc3bb0b xfrm6_tunnel: RCU... |
199 200 201 |
hlist_del_rcu(&x6spi->list_byaddr); hlist_del_rcu(&x6spi->list_byspi); call_rcu(&x6spi->rcu_head, x6spi_destroy_rcu); |
1da177e4c Linux-2.6.12-rc2 |
202 203 204 205 |
break; } } } |
91cc3bb0b xfrm6_tunnel: RCU... |
206 |
spin_unlock_bh(&xfrm6_tunnel_spi_lock); |
1da177e4c Linux-2.6.12-rc2 |
207 |
} |
1da177e4c Linux-2.6.12-rc2 |
208 209 |
static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) { |
7b277b1a5 [IPSEC]: Set skb-... |
210 |
skb_push(skb, -skb_network_offset(skb)); |
1da177e4c Linux-2.6.12-rc2 |
211 212 |
return 0; } |
e695633e2 [IPSEC]: Kill unu... |
213 |
static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) |
1da177e4c Linux-2.6.12-rc2 |
214 |
{ |
04663d0b8 [IPSEC]: Fix pure... |
215 |
return skb_network_header(skb)[IP6CB(skb)->nhoff]; |
1da177e4c Linux-2.6.12-rc2 |
216 |
} |
d2acc3479 [INET]: Introduce... |
217 |
static int xfrm6_tunnel_rcv(struct sk_buff *skb) |
1da177e4c Linux-2.6.12-rc2 |
218 |
{ |
a16647739 netns xfrm: xfrm6... |
219 |
struct net *net = dev_net(skb->dev); |
b71d1d426 inet: constify ip... |
220 |
const struct ipv6hdr *iph = ipv6_hdr(skb); |
a252cc237 [XFRM]: xrfm_repl... |
221 |
__be32 spi; |
1da177e4c Linux-2.6.12-rc2 |
222 |
|
b71d1d426 inet: constify ip... |
223 |
spi = xfrm6_tunnel_spi_lookup(net, (const xfrm_address_t *)&iph->saddr); |
6ac3f6649 ipv6: Fix return ... |
224 |
return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi); |
1da177e4c Linux-2.6.12-rc2 |
225 |
} |
d2acc3479 [INET]: Introduce... |
226 |
static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt, |
d5fdd6bab ipv6: Use correct... |
227 |
u8 type, u8 code, int offset, __be32 info) |
1da177e4c Linux-2.6.12-rc2 |
228 |
{ |
1da177e4c Linux-2.6.12-rc2 |
229 230 |
/* xfrm6_tunnel native err handling */ switch (type) { |
1ab1457c4 [NET] IPV6: Fix w... |
231 |
case ICMPV6_DEST_UNREACH: |
1da177e4c Linux-2.6.12-rc2 |
232 |
switch (code) { |
1ab1457c4 [NET] IPV6: Fix w... |
233 |
case ICMPV6_NOROUTE: |
1da177e4c Linux-2.6.12-rc2 |
234 235 236 237 238 |
case ICMPV6_ADM_PROHIBITED: case ICMPV6_NOT_NEIGHBOUR: case ICMPV6_ADDR_UNREACH: case ICMPV6_PORT_UNREACH: default: |
1da177e4c Linux-2.6.12-rc2 |
239 240 241 242 |
break; } break; case ICMPV6_PKT_TOOBIG: |
1da177e4c Linux-2.6.12-rc2 |
243 244 245 246 |
break; case ICMPV6_TIME_EXCEED: switch (code) { case ICMPV6_EXC_HOPLIMIT: |
1da177e4c Linux-2.6.12-rc2 |
247 248 |
break; case ICMPV6_EXC_FRAGTIME: |
1ab1457c4 [NET] IPV6: Fix w... |
249 |
default: |
1da177e4c Linux-2.6.12-rc2 |
250 251 252 253 254 255 256 257 258 259 260 261 262 |
break; } break; case ICMPV6_PARAMPROB: switch (code) { case ICMPV6_HDR_FIELD: break; case ICMPV6_UNK_NEXTHDR: break; case ICMPV6_UNK_OPTION: break; } break; default: break; } |
d2acc3479 [INET]: Introduce... |
263 264 |
return 0; |
1da177e4c Linux-2.6.12-rc2 |
265 |
} |
72cb6962a [IPSEC]: Add xfrm... |
266 |
static int xfrm6_tunnel_init_state(struct xfrm_state *x) |
1da177e4c Linux-2.6.12-rc2 |
267 |
{ |
7e49e6de3 [XFRM]: Add XFRM_... |
268 |
if (x->props.mode != XFRM_MODE_TUNNEL) |
1da177e4c Linux-2.6.12-rc2 |
269 270 271 272 273 274 275 276 277 278 279 280 |
return -EINVAL; if (x->encap) return -EINVAL; x->props.header_len = sizeof(struct ipv6hdr); return 0; } static void xfrm6_tunnel_destroy(struct xfrm_state *x) { |
a16647739 netns xfrm: xfrm6... |
281 282 283 |
struct net *net = xs_net(x); xfrm6_tunnel_free_spi(net, (xfrm_address_t *)&x->props.saddr); |
1da177e4c Linux-2.6.12-rc2 |
284 |
} |
533cb5b0a [XFRM]: constify ... |
285 |
static const struct xfrm_type xfrm6_tunnel_type = { |
1da177e4c Linux-2.6.12-rc2 |
286 287 288 289 290 291 292 293 |
.description = "IP6IP6", .owner = THIS_MODULE, .proto = IPPROTO_IPV6, .init_state = xfrm6_tunnel_init_state, .destructor = xfrm6_tunnel_destroy, .input = xfrm6_tunnel_input, .output = xfrm6_tunnel_output, }; |
3ff2cfa55 ipv6: struct xfrm... |
294 |
static struct xfrm6_tunnel xfrm6_tunnel_handler __read_mostly = { |
1da177e4c Linux-2.6.12-rc2 |
295 |
.handler = xfrm6_tunnel_rcv, |
d2acc3479 [INET]: Introduce... |
296 297 |
.err_handler = xfrm6_tunnel_err, .priority = 2, |
1da177e4c Linux-2.6.12-rc2 |
298 |
}; |
3ff2cfa55 ipv6: struct xfrm... |
299 |
static struct xfrm6_tunnel xfrm46_tunnel_handler __read_mostly = { |
73d605d1a [IPSEC]: changing... |
300 301 302 303 |
.handler = xfrm6_tunnel_rcv, .err_handler = xfrm6_tunnel_err, .priority = 2, }; |
a16647739 netns xfrm: xfrm6... |
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
static int __net_init xfrm6_tunnel_net_init(struct net *net) { struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); unsigned int i; for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++) INIT_HLIST_HEAD(&xfrm6_tn->spi_byaddr[i]); for (i = 0; i < XFRM6_TUNNEL_SPI_BYSPI_HSIZE; i++) INIT_HLIST_HEAD(&xfrm6_tn->spi_byspi[i]); xfrm6_tn->spi = 0; return 0; } static void __net_exit xfrm6_tunnel_net_exit(struct net *net) { } static struct pernet_operations xfrm6_tunnel_net_ops = { .init = xfrm6_tunnel_net_init, .exit = xfrm6_tunnel_net_exit, .id = &xfrm6_tunnel_net_id, .size = sizeof(struct xfrm6_tunnel_net), }; |
1da177e4c Linux-2.6.12-rc2 |
328 329 |
static int __init xfrm6_tunnel_init(void) { |
e924960da netns xfrm: fixup... |
330 |
int rv; |
d5aa407f5 tunnels: fix netn... |
331 332 333 334 335 336 337 338 339 |
xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi", sizeof(struct xfrm6_tunnel_spi), 0, SLAB_HWCACHE_ALIGN, NULL); if (!xfrm6_tunnel_spi_kmem) return -ENOMEM; rv = register_pernet_subsys(&xfrm6_tunnel_net_ops); if (rv < 0) goto out_pernet; |
e924960da netns xfrm: fixup... |
340 341 |
rv = xfrm_register_type(&xfrm6_tunnel_type, AF_INET6); if (rv < 0) |
d5aa407f5 tunnels: fix netn... |
342 |
goto out_type; |
e924960da netns xfrm: fixup... |
343 344 |
rv = xfrm6_tunnel_register(&xfrm6_tunnel_handler, AF_INET6); if (rv < 0) |
d5aa407f5 tunnels: fix netn... |
345 |
goto out_xfrm6; |
e924960da netns xfrm: fixup... |
346 347 |
rv = xfrm6_tunnel_register(&xfrm46_tunnel_handler, AF_INET); if (rv < 0) |
d5aa407f5 tunnels: fix netn... |
348 |
goto out_xfrm46; |
1da177e4c Linux-2.6.12-rc2 |
349 |
return 0; |
5ce1bbb97 xfrm6_tunnel: joi... |
350 |
|
d5aa407f5 tunnels: fix netn... |
351 |
out_xfrm46: |
5ce1bbb97 xfrm6_tunnel: joi... |
352 |
xfrm6_tunnel_deregister(&xfrm6_tunnel_handler, AF_INET6); |
d5aa407f5 tunnels: fix netn... |
353 |
out_xfrm6: |
5ce1bbb97 xfrm6_tunnel: joi... |
354 |
xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); |
d5aa407f5 tunnels: fix netn... |
355 356 357 358 |
out_type: unregister_pernet_subsys(&xfrm6_tunnel_net_ops); out_pernet: kmem_cache_destroy(xfrm6_tunnel_spi_kmem); |
e924960da netns xfrm: fixup... |
359 |
return rv; |
1da177e4c Linux-2.6.12-rc2 |
360 361 362 363 |
} static void __exit xfrm6_tunnel_fini(void) { |
73d605d1a [IPSEC]: changing... |
364 365 |
xfrm6_tunnel_deregister(&xfrm46_tunnel_handler, AF_INET); xfrm6_tunnel_deregister(&xfrm6_tunnel_handler, AF_INET6); |
a922ba551 [IPV6] xfrm6_tunn... |
366 |
xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); |
d5aa407f5 tunnels: fix netn... |
367 368 |
unregister_pernet_subsys(&xfrm6_tunnel_net_ops); kmem_cache_destroy(xfrm6_tunnel_spi_kmem); |
1da177e4c Linux-2.6.12-rc2 |
369 370 371 372 373 |
} module_init(xfrm6_tunnel_init); module_exit(xfrm6_tunnel_fini); MODULE_LICENSE("GPL"); |
d3d6dd3ad [XFRM]: Add modul... |
374 |
MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_IPV6); |