I have done the following
Steps to reproduce
When linkGet() receives the data buffer from the netlink socket, it calls parseResponse() to create a list of LinkResponse objects, each of which has an interfaceIndex and a list of attributes.
The problem is that the parse function is only looking for a single message, instead of processing messages until all data is consumed.
Current behavior
For linkGet(interface: nil) get one RTM_NEWLINK for the first interface, and the data for the remaining interfaces looks like a large final attribute with type 0. Only a single LinkResult is returned.
Expected behavior
The linkGet(interface: nil) call should return a LinkResult for each interface.
Environment
- OS: 26
- Xcode: 26
- Swift: 6.2
Relevant log output
Code of Conduct