Skip to content

Commit d09c297

Browse files
bors[bot]leoleoasd
andauthored
Merge #1752
1752: Add missing DontRoute SockOpt r=asomers a=leoleoasd I'm not sure, but according to [unix standard](https://pubs.opengroup.org/onlinepubs/7908799/xns/setsockopt.html), SO_DONTROUTE should appear in all unix systems. Does this need a test? Co-authored-by: Leo Lu <[email protected]>
2 parents c8ffe26 + 790960c commit d09c297

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2121
(#[1697](https://github.com/nix-rust/nix/pull/1697))
2222
- Added `getrusage` and helper types `UsageWho` and `Usage`
2323
(#[1747](https://github.com/nix-rust/nix/pull/1747))
24+
- Added the `DontRoute` SockOpt
25+
(#[1752](https://github.com/nix-rust/nix/pull/1752))
2426

2527
### Changed
2628

src/sys/socket/sockopt.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ sockopt_impl!(
352352
sockopt_impl!(
353353
/// Get and clear the pending socket error.
354354
SocketError, GetOnly, libc::SOL_SOCKET, libc::SO_ERROR, i32);
355+
sockopt_impl!(
356+
/// Set or get the don't route flag.
357+
DontRoute, Both, libc::SOL_SOCKET, libc::SO_DONTROUTE, bool);
355358
sockopt_impl!(
356359
/// Enable sending of keep-alive messages on connection-oriented sockets.
357360
KeepAlive, Both, libc::SOL_SOCKET, libc::SO_KEEPALIVE, bool);

0 commit comments

Comments
 (0)