Fix duplicated MAC in advanced search of nodes

Fixed condition on end_time in SQL join with iplog.