Packet handling method