You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release v2.1.0
A round of fixes from a full audit.
- fix memory leaks: add_number allocated `new void*[sz]` (wrong size) and never
freed it - leaked on every numeric attribute (set_master/set_mtu/add_route/
join_ns/...); send() leaked the 64 KB message buffer if an attribute append
threw (both now use a local buffer / std::unique_ptr)
- fix the dead send error check: `size_t cnt = sendmsg(...)` made `cnt < 0`
always false, so sendmsg failures were swallowed (now ssize_t)
- fix prefix::netmask() shifting by 32 for a /0 (undefined behaviour) - it
returned 255.255.255.255 instead of 0.0.0.0
- fix a NULL dereference in interfaces(): getifaddrs() may return a NULL ifa_addr
- fix nl::netns fd ownership: copying shared the raw fd, risking a double close
/ fd reuse (copy and assignment now dup the descriptor)
- smaller fixes: attr::to_data() always threw; inet_pton checked < 0 instead of
<= 0; signed isdigit()/shift undefined behaviour; recv() now validates the
reply length before dereferencing the header
- update GitHub Actions (actions/checkout@v5, create/upload-asset actions @v2;
drop the unnecessary submodule step - there are no submodules)
- README: fix a typo and add a usage example
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>