Optimizing a packet transfer between two access points at a handover