From dbe44f64ec7cff8d55400327e5f6994ac1fc87bb Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Tue, 3 May 2016 16:08:45 +0300 Subject: fix trex-204 by Wenxian with minor changes --- src/main_dpdk.cpp | 4 ++-- src/tuple_gen.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 771c59b3..440cf820 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -1985,8 +1985,8 @@ void CCoreEthIF::update_mac_addr(CGenNode * node,uint8_t *p){ if ( unlikely( CGlobalInfo::m_options.preview.get_mac_ip_mapping_enable() ) ) { /* mac mapping file is configured */ - if (if (node->is_initiator_pkt() && (node->m_src_mac.inused==INUSED)) { - memcpy(p+6, &node->m_src_mac.mac, sizeof(uint8_t)*6); + if ( node->is_initiator_pkt() && (node->m_src_mac.inused==INUSED)) { + memcpy(p+6, &node->m_src_mac.mac, 6); } } else if ( unlikely( CGlobalInfo::m_options.preview.get_mac_ip_overide_enable() ) ){ /* client side */ diff --git a/src/tuple_gen.h b/src/tuple_gen.h index d34e27bc..b2f6e34a 100755 --- a/src/tuple_gen.h +++ b/src/tuple_gen.h @@ -880,18 +880,28 @@ struct CTupleGenYamlInfo { public: bool is_valid(uint32_t num_threads,bool is_plugins); uint8_t get_server_pool_id(std::string name){ + if (name=="default") { + return 0; + } for (uint8_t i=0;i