IB 138 then FR 572 at Madrid
Quito → Madrid → Porto
Timetable, Madrid time
11:40IB 138 from Quito at the gate
11:15FR 572 to Porto leaves the gate
23 h 35 apart on the timetable, overnight
FR 572 leaves 23 h 35 after IB 138 arrives on the timetable: more than half a day, so not a connection we count.