vhost: fix packed ring index wrapping
[dpdk.git] / examples / ipsec-secgw / ipsec-secgw.c
index 59971dc..f252d34 100644 (file)
@@ -426,7 +426,7 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
                        return;
                }
 
-               switch (iph6->proto) {
+               switch (next_proto) {
                case IPPROTO_ESP:
                        t->ipsec.pkts[(t->ipsec.num)++] = pkt;
                        break;
@@ -3076,6 +3076,9 @@ main(int32_t argc, char **argv)
                rte_eth_dev_close(portid);
                printf(" Done\n");
        }
+
+       /* clean up the EAL */
+       rte_eal_cleanup();
        printf("Bye...\n");
 
        return 0;