jbaublitz / neli

Rust type safe netlink library
BSD 3-Clause "New" or "Revised" License
180 stars 35 forks source link

`failed to fill whole buffer` #247

Closed larseggert closed 1 month ago

larseggert commented 1 month ago

I get failed to fill whole buffer when trying to do an RTM_GETLINK in the recv call at https://github.com/mozilla/mtu/blob/3d3833cca37be85e1c33fdbae196d0aec403617f/src/linux.rs#L116-L120

How can I debug what is causing this?

larseggert commented 1 month ago

Turns out I can make this work if I send the second request over a second socket. But I don't understand why reusing the already existing socket is failing.

https://github.com/mozilla/mtu/blob/356c669b0bd9d5c94010c14b08d2e459859904fd/src/linux.rs#L96-L98

larseggert commented 1 month ago

OK, I figured out that I need to consume all responses before I can reuse the socket for another request.