Add set_min_ttl_v4 and set_min_hopcount_v6 - #672
Conversation
|
Tests pass on both platforms this new wrapper is being added for (linux and illumos): |
|
The CI failure seems unrelated to my changes. Is there something I need to do to move past it? |
Adds linux/illumos Socket methods for setting IP_MINTTL and IPV6_MINHOPCOUNT along with associated unit tests. Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
e203734 to
ef35cff
Compare
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
It seems that both Linux and illumos only accept a value in the range 0-255, maybe we should use an u8 for this option?
You can ignore that CI failure it's unrelated to this pr. |
I went with a u32 because set_ttl_v4()/set_hoplimit_v6() accept a u32 despite their valid range being 0-255 as well. My thought was that consistency across methods would probably be more appreciated than making the signature more constrained. That said, I'm certainly open to making it a u8. What are your thoughts? |
|
That makes sense. Thanks @taspelund |
Adds linux/illumos Socket methods for setting IP_MINTTL and IPV6_MINHOPCOUNT along with associated unit tests.