File tree Expand file tree Collapse file tree
src/inet/routing/eigrp/pdms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1354,18 +1354,23 @@ void EigrpIpv4Pdm::flushMsgRequests()
13541354 // Check if interface exists
13551355 if (eigrpIft->findInterfaceById (item->getDestInterface ()) != nullptr ) {
13561356 send (item, RTP_OUTGW );
1357+ item = nullptr ;
13571358 }
13581359 }
13591360 }
13601361
13611362 // Send or delete other messages
13621363 for (auto & item : reqQueue) {
1363- // Check if interface exists
1364- if (eigrpIft->findInterfaceById (item->getDestInterface ()) == nullptr ) {
1365- delete item; // Discard request
1366- }
1367- else if (item->getOpcode () != EIGRP_QUERY_MSG ) {
1368- send (item, RTP_OUTGW );
1364+ if (item != nullptr ) {
1365+ // Check if interface exists
1366+ if (eigrpIft->findInterfaceById (item->getDestInterface ()) == nullptr ) {
1367+ delete item; // Discard request
1368+ item = nullptr ;
1369+ }
1370+ else if (item->getOpcode () != EIGRP_QUERY_MSG ) {
1371+ send (item, RTP_OUTGW );
1372+ item = nullptr ;
1373+ }
13691374 }
13701375 }
13711376
Original file line number Diff line number Diff line change @@ -1346,23 +1346,26 @@ void EigrpIpv6Pdm::flushMsgRequests()
13461346 for (auto & item : reqQueue) {
13471347 if (item->getOpcode () == EIGRP_QUERY_MSG ) {
13481348 // Check if interface exists
1349- if (eigrpIft->findInterfaceById (item->getDestInterface ()) == nullptr )
1350- continue ;
1351- else
1349+ if (eigrpIft->findInterfaceById (item->getDestInterface ()) != nullptr ) {
13521350 send (item, RTP_OUTGW );
1351+ item = nullptr ;
1352+ }
13531353 }
13541354 }
13551355
13561356 // Send other messages
13571357 for (auto & item : reqQueue) {
1358- // Check if interface exists
1359- if (eigrpIft->findInterfaceById (item->getDestInterface ()) == nullptr ) {
1360- delete item; // Discard request
1361- continue ;
1358+ if (item != nullptr ) {
1359+ // Check if interface exists
1360+ if (eigrpIft->findInterfaceById (item->getDestInterface ()) == nullptr ) {
1361+ delete item; // Discard request
1362+ item = nullptr ;
1363+ }
1364+ else if (item->getOpcode () != EIGRP_QUERY_MSG ) {
1365+ send (item, RTP_OUTGW );
1366+ item = nullptr ;
1367+ }
13621368 }
1363-
1364- if (item->getOpcode () != EIGRP_QUERY_MSG )
1365- send (item, RTP_OUTGW );
13661369 }
13671370
13681371 reqQueue.clear ();
You can’t perform that action at this time.
0 commit comments