Skip to content

Commit

Permalink
server: fix nic path update
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Mar 2, 2020
1 parent b26592e commit 173fb51
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions api/server/graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,11 @@ void Graph::LinkSniffer(const app::Nic &nic, Graph::BrickShrPtr n_sniffer) {

if (nic.bypass_filtering) {
unlink(g_nic->vhost);
g_nic->head = n_sniffer;
link(n_sniffer, g_nic->vhost);
link(vtep_, g_nic->head);
link(vtep_, n_sniffer);
add_vni(vtep_, g_nic->head, nic.vni);
} else {
unlink_edge(g_nic->antispoof, g_nic->vhost);
g_nic->head = n_sniffer;
link(g_nic->antispoof, n_sniffer);
link(n_sniffer, g_nic->vhost);
}
Expand Down Expand Up @@ -1066,7 +1064,12 @@ void Graph::NicConfigPacketTracePath(const app::Nic &nic,
Graph::GraphNic *g_nic = FindNic(nic);
FILE *n_pcap_file;
std::string name;
if (nic.packet_trace_path == update_path) {
std::string upath;
size_t found;

found = update_path.find_last_of("/");
upath = update_path.substr(0,found);
if (nic.packet_trace_path == upath) {
LOG_INFO_("packet trace path %s is already exist",
update_path.c_str());
return;
Expand Down

0 comments on commit 173fb51

Please sign in to comment.