Print out error message if setting MTU fails when modifying interface
using netlink.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
All good, just a note (mostly to myself) on error handling and atomicity. What we do here (myself included) is sequence on priv-check & execute calls, where we stop abruptly half-way if we lack privilege for 1 out of 10 changes. The outcome (e.g. partial change) is now dependent on the block order inside the function.
What we should do instead is either try to move towards more atomicity (checking all privileges in the beginning and failing) or more overall completion (e.g. don't stop on the first failure), which is harder reporting-wise.
Generally I'd prefer the former approach. I don't think we need to change it here, I'd rather have a separate diff reshuffling error handling approach.
Also like the sound of the former approach more. I (or @saheed ?) can work on doing this if you'd like.