Skip to content

Commit

Permalink
(update) solved bug #350 (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinoOgni committed Jul 5, 2021
1 parent e949d5e commit 5ba31a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/services/pcn-router/src/Ports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ std::shared_ptr<PortsSecondaryip> Ports::getSecondaryip(const std::string &ip) {
if (p.getIp() == ip)
return std::make_shared<PortsSecondaryip>(p);
}
// It can happen in 3 cases: the port has no IP,
// the port has secondaryip but not the one sought, the port has 0 secondaryip
throw std::runtime_error(
"Address does not exist or it is not a secondary address or the port has no ip address");
}

std::vector<std::shared_ptr<PortsSecondaryip>> Ports::getSecondaryipList() {
Expand Down

0 comments on commit 5ba31a1

Please sign in to comment.