git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
examples/ipsec-secgw: fix esp padding check
[dpdk.git]
/
examples
/
ipsec-secgw
/
esp.c
diff --git
a/examples/ipsec-secgw/esp.c
b/examples/ipsec-secgw/esp.c
index
0f6b33e
..
7dce78c
100644
(file)
--- a/
examples/ipsec-secgw/esp.c
+++ b/
examples/ipsec-secgw/esp.c
@@
-139,7
+139,7
@@
esp4_tunnel_inbound_post_crypto(struct rte_mbuf *m, struct ipsec_sa *sa,
padding = pad_len - *pad_len;
for (i = 0; i < *pad_len; i++) {
padding = pad_len - *pad_len;
for (i = 0; i < *pad_len; i++) {
- if (padding[i] != i) {
+ if (padding[i] != i
+ 1
) {
RTE_LOG(ERR, IPSEC_ESP, "invalid pad_len field\n");
return -EINVAL;
}
RTE_LOG(ERR, IPSEC_ESP, "invalid pad_len field\n");
return -EINVAL;
}