summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main_dpdk.cpp4
-rwxr-xr-xsrc/tuple_gen.h10
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index 0d5b2f18..6dec3dec 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 (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<m_server_pool.size();i++) {
if (m_server_pool[i].m_name==name)
return i;
}
+ printf("ERROR invalid server pool name %s, please review your YAML file\n",(char *)name.c_str());
+ exit(-1);
return 0;
}
uint8_t get_client_pool_id(std::string name){
+ if (name=="default") {
+ return 0;
+ }
for (uint8_t i=0;i<m_client_pool.size();i++) {
if (m_client_pool[i].m_name==name)
return i;
}
+ printf("ERROR invalid client pool name %s, please review your YAML file\n",(char *)name.c_str());
+ exit(-1);
return 0;
}
};