Commit Graph

5 Commits

Author SHA1 Message Date
Rob Murray 084abd93d3 Add ErrDumpInterrupted
Add a specific error to report that a netlink response had
NLM_F_DUMP_INTR set, indicating that the set of results may be
incomplete or inconsistent.

unix.EINTR was previously returned (with no results) when the
NLM_F_DUMP_INTR flag was set. Now, errors.Is(err, unix.EINTR) will
still work. But, this will be a breaking change for any code that's
checking for equality with unix.EINTR.

Return results with ErrDumpInterrupted. Results may be incomplete
or inconsistent, but give the caller the option of using them.

Look for NLM_F_DUMP_INTR in more places:
- linkSubscribeAt, neighSubscribeAt, routeSubscribeAt
  - can do an initial dump, which may report inconsistent results
  -> if there's an error callback, call it with ErrDumpInterrupted
- socketDiagXDPExecutor
  - makes an NLM_F_DUMP request, without using Execute()
  -> give it the same behaviour as functions that do use Execute()

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-09-22 00:00:40 -07:00
feng a01829657b Fix FouList attribute body truncated error with kernel 5.2+
fou module added a bunch of new attributes in commit
1713cb37bf

which caused the old parsing logic failed, fix and add support for these attrributes.
2024-09-09 10:36:41 -07:00
callmehollow 91b013f9ed code simplification 2018-11-19 16:40:56 -08:00
Alessandro Boch fad79cbcae Fix go build issue for fou code
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-27 11:05:30 -08:00
Reinier Schoof bdf753e87c added support for Foo-over-UDP netlink calls
Signed-off-by: Reinier Schoof <reinier@skoef.nl>
2017-11-13 12:13:59 -08:00