HomeFreeBSD

libnv: read entire datagram in nvlist_recv()

Description

libnv: read entire datagram in nvlist_recv()

When SOCK_DGRAM is used, a portion of the datagram is discarded during
the initial recv() when getting the nvlist_header.

To workaround this, use MSG_PEEK for the initial recv() when using a
datagram socket.

Add tests for SOCK_DGRAM with nvlist_send()/nvlist_recv().

Differential Revision: https://reviews.freebsd.org/D32722

Details

Provenance
rewAuthored on Dec 6 2021, 6:45 PM
Differential Revision
D32722: libnv: read entire datagram in nvlist_recv()
Parents
rGdb158b9942c1: libnv: let nvlist_recv() pass flags to recv()
Branches
Unknown
Tags
Unknown