Skip to content

Commit b0f900d

Browse files
authored
Merge pull request #246 from pinoOgni/solveBugDelPort
Solved bug reported in issue #243
2 parents 735f4ee + 94f17d3 commit b0f900d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/services/pcn-router/src/Router.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ void Router::delPorts(const std::string &name) {
149149
// routing table)
150150
port->delSecondaryipList();
151151

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

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

0 commit comments

Comments
 (0)