]> git.droids-corp.org - dpdk.git/blobdiff - examples/ipsec-secgw/esp.c
examples/ipsec-secgw: support SHA256 HMAC
[dpdk.git] / examples / ipsec-secgw / esp.c
index 9715ea9bd558257c542b770ee36dd033027487af..e77afa0e1d0c6ed2b6efa0ebad0f75ce8dc5ca85 100644 (file)
@@ -122,6 +122,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,
        switch (sa->auth_algo) {
        case RTE_CRYPTO_AUTH_NULL:
        case RTE_CRYPTO_AUTH_SHA1_HMAC:
+       case RTE_CRYPTO_AUTH_SHA256_HMAC:
                sym_cop->auth.data.offset = ip_hdr_len;
                sym_cop->auth.data.length = sizeof(struct esp_hdr) +
                        sa->iv_len + payload_len;
@@ -354,6 +355,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,
        switch (sa->auth_algo) {
        case RTE_CRYPTO_AUTH_NULL:
        case RTE_CRYPTO_AUTH_SHA1_HMAC:
+       case RTE_CRYPTO_AUTH_SHA256_HMAC:
                sym_cop->auth.data.offset = ip_hdr_len;
                sym_cop->auth.data.length = sizeof(struct esp_hdr) +
                        sa->iv_len + pad_payload_len;