Skip to content

Commit

Permalink
Merge pull request #246 from pinoOgni/solveBugDelPort
Browse files Browse the repository at this point in the history
Solved bug reported in issue #243
  • Loading branch information
frisso committed Nov 28, 2019
2 parents 735f4ee + 94f17d3 commit b0f900d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/pcn-router/src/Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ void Router::delPorts(const std::string &name) {
// routing table)
port->delSecondaryipList();

remove_local_route(port->getIp(), name);
//if getIP is empty it means that you have a port with no IP address
//so you do not need to call remove_local_route
if(port->getIp().empty() == false)
remove_local_route(port->getIp(), name);

auto router_port = get_hash_table<uint16_t, r_port>("router_port");

Expand Down

0 comments on commit b0f900d

Please sign in to comment.