diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-09-07 00:03:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 00:03:59 +0000 |
commit | 2142ec3c27f1c6a275aecc502b7fd3ee3bdaf08a (patch) | |
tree | 55ede431ffe91cb0d00f9fd23da908142ddace4a /src/sys/socket/addr.rs | |
parent | aaec2143867b64b4164985284ca21be54781e835 (diff) | |
parent | d23e7c7575f331fd2263f2f80b7698c49abe7907 (diff) | |
download | nix-2142ec3c27f1c6a275aecc502b7fd3ee3bdaf08a.zip |
Merge #1514
1514: Add support for IP_RECVERR r=asomers a=cemeyer
This pull request adds support for setting the `IP_RECVERR` (and corresponding `IPV6_RECVERR`) sockopt, and then decoding the resulting control messages from `recvmsg()`. It is a Linux-specific API.
This PR extends #1161 by:
* Making the address associated with a `IpvXRecvErr` control message optional (`recvmsg` documentation claims it is not provided for some kinds of error), per `@WGH-.`
* Adding basic tests for both IPv4 and IPv6 (blat a UDP packet at a hopefully-unoccupied port on localhost and observe ICMP port unreachable).
* Adding a Changelog entry.
I added some trivial doc comments on the `ControlMessageOwned` variants, but I'm not sure exactly what documentation you had in mind earlier on #1161.
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
Diffstat (limited to 'src/sys/socket/addr.rs')
0 files changed, 0 insertions, 0 deletions