fix packet_peer_context to actually do the right thing