summaryrefslogtreecommitdiffstats
path: root/src/trex_port_attr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trex_port_attr.cpp')
-rw-r--r--src/trex_port_attr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/trex_port_attr.cpp b/src/trex_port_attr.cpp
index 0ecbc2c4..2a68fcb9 100644
--- a/src/trex_port_attr.cpp
+++ b/src/trex_port_attr.cpp
@@ -99,7 +99,14 @@ TRexPortAttr::get_src_mac() const {
return CGlobalInfo::m_options.get_src_mac_addr(m_port_id);
}
-
+void
+TRexPortAttr::set_src_ipv4(uint32_t addr) {
+ m_src_ipv4 = addr;
+
+ /* when IP source changes - consider this as link down */
+ m_dest.on_link_down();
+}
+
std::string
TRexPortAttr::get_rx_filter_mode() const {
switch (m_rx_filter_mode) {