Skip to content

Commit

Permalink
Add check for null mac
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Oct 25, 2024
1 parent edd48b7 commit 9cf8d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void Flow::deferredInitialization() {

Mac *srv_mac = srv_host->getMac();
/* Add client gateway */
if (srv_mac && (!srv_host->isLocalHost())) {
if (srv_mac && !srv_mac->isNull() && !srv_host->isLocalHost()) {
LocalHost *lh = (LocalHost *)cli_host;
lh->setRouterMac(srv_mac);
}
Expand Down

0 comments on commit 9cf8d56

Please sign in to comment.