Fix read write memory exception in extract_ip_packet