Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
ca6307c
)
ipsec: fix buffer alloc
17/26417/3
author
Filip Tehlar
<
[email protected]
>
Fri, 3 Apr 2020 12:14:29 +0000
(12:14 +0000)
committer
Damjan Marion
<
[email protected]
>
Tue, 28 Apr 2020 21:09:14 +0000
(21:09 +0000)
Type: fix
Change-Id: I0f12c19b79df19b692f18ac13d6c32341853b764
Signed-off-by: Filip Tehlar <
[email protected]
>
src/vnet/ipsec/esp_decrypt.c
patch
|
blob
|
history
diff --git
a/src/vnet/ipsec/esp_decrypt.c
b/src/vnet/ipsec/esp_decrypt.c
index
80b3246
..
0d14fe5
100644
(file)
--- a/
src/vnet/ipsec/esp_decrypt.c
+++ b/
src/vnet/ipsec/esp_decrypt.c
@@
-527,7
+527,13
@@
esp_decrypt_inline (vlib_main_t * vm,
{
/* no space, need to allocate new buffer */
u32 tmp_bi = 0;
- vlib_buffer_alloc (vm, &tmp_bi, 1);
+ if (1 != vlib_buffer_alloc (vm, &tmp_bi, 1))
+ {
+ b[0]->error = node->errors
+ [ESP_DECRYPT_ERROR_NO_BUFFERS];
+ next[0] = ESP_DECRYPT_NEXT_DROP;
+ goto next;
+ }
tmp_b = vlib_get_buffer (vm, tmp_bi);
esn = tmp_b->data;
pd->free_buffer_index = tmp_bi;