|
Lines 166-175
ipsec_process_done(struct mbuf *m, struct ipsecreq
Link Here
|
| 166 |
* If this is a problem we'll need to introduce a queue |
166 |
* If this is a problem we'll need to introduce a queue |
| 167 |
* to set the packet on so we can unwind the stack before |
167 |
* to set the packet on so we can unwind the stack before |
| 168 |
* doing further processing. |
168 |
* doing further processing. |
| 169 |
* |
|
|
| 170 |
* If ipsec[46]_process_packet() will successfully queue |
| 171 |
* the request, we need to take additional reference to SP, |
| 172 |
* because xform callback will release reference. |
| 173 |
*/ |
169 |
*/ |
| 174 |
if (isr->next) { |
170 |
if (isr->next) { |
| 175 |
/* XXX-BZ currently only support same AF bundles. */ |
171 |
/* XXX-BZ currently only support same AF bundles. */ |
|
Lines 177-187
ipsec_process_done(struct mbuf *m, struct ipsecreq
Link Here
|
| 177 |
#ifdef INET |
173 |
#ifdef INET |
| 178 |
case AF_INET: |
174 |
case AF_INET: |
| 179 |
IPSECSTAT_INC(ips_out_bundlesa); |
175 |
IPSECSTAT_INC(ips_out_bundlesa); |
| 180 |
key_addref(isr->sp); |
176 |
return (ipsec4_process_packet(m, isr->next)); |
| 181 |
error = ipsec4_process_packet(m, isr->next); |
|
|
| 182 |
if (error != 0) |
| 183 |
KEY_FREESP(&isr->sp); |
| 184 |
return (error); |
| 185 |
/* NOTREACHED */ |
177 |
/* NOTREACHED */ |
| 186 |
#endif |
178 |
#endif |
| 187 |
#ifdef notyet |
179 |
#ifdef notyet |
|
Lines 189-199
ipsec_process_done(struct mbuf *m, struct ipsecreq
Link Here
|
| 189 |
case AF_INET6: |
181 |
case AF_INET6: |
| 190 |
/* XXX */ |
182 |
/* XXX */ |
| 191 |
IPSEC6STAT_INC(ips_out_bundlesa); |
183 |
IPSEC6STAT_INC(ips_out_bundlesa); |
| 192 |
key_addref(isr->sp); |
184 |
return (ipsec6_process_packet(m, isr->next)); |
| 193 |
error = ipsec6_process_packet(m, isr->next); |
|
|
| 194 |
if (error != 0) |
| 195 |
KEY_FREESP(&isr->sp); |
| 196 |
return (error); |
| 197 |
/* NOTREACHED */ |
185 |
/* NOTREACHED */ |
| 198 |
#endif /* INET6 */ |
186 |
#endif /* INET6 */ |
| 199 |
#endif |
187 |
#endif |