proto: Fix --enable-packet-dump mode.

This was broken when we rearranged the socket code.