Skip to content

Commit

Permalink
Ipv4RoutingTable: Removed deleting interface specific routes when an …
Browse files Browse the repository at this point in the history
…interface goes down.

The routes must be deleted by the owner which originally added them to the routing table.
If the routes were added by a routing protocol, it is up to the routing protocol to delete them.
  • Loading branch information
levy committed Feb 8, 2024
1 parent a61fec3 commit ac2923f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/inet/networklayer/ipv4/Ipv4RoutingTable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ void Ipv4RoutingTable::receiveSignal(cComponent *source, simsignal_t signalID, c
const auto *ieChangeDetails = check_and_cast<const NetworkInterfaceChangeDetails *>(obj);
auto fieldId = ieChangeDetails->getFieldId();
if (fieldId == NetworkInterface::F_STATE || fieldId == NetworkInterface::F_CARRIER) {
const auto *entry = ieChangeDetails->getNetworkInterface();
updateNetmaskRoutes();
if (!entry->isUp() || !entry->hasCarrier())
deleteInterfaceRoutes(entry);
invalidateCache();
}
}
Expand Down

0 comments on commit ac2923f

Please sign in to comment.