freebsd-dev/share/man
Alexander V. Chernikov f4d3aa7490 netlink: suppress sending NLMSG_ERROR if NLMSG_DONE is already sent
Netlink has a confirmation/error reporting mechanism for the sent
messages. Kernel explicitly acks each messages if requested (NLM_F_ACK)
 or if message processing results in an error.
Similarly, for multipart messages - typically dumps, where each message
 represents a single object like an interface or a route - another
 message, NLMSG_DONE is used to indicate the end of dump and the
 resulting status.
As a result, successfull dump ends with both NLMSG_DONE and NLMSG_ERROR
 messages.
RFC 3549 does not say anything specific about such case.
Linux adopted an optimisation which suppresses NLMSG_ERROR message
 when NLMSG_DONE is already sent. Certain libraries/applications like
 libnl depends on such behavior.

Suppress sending NLMSG_ERROR if NLMSG_DONE is already sent, by
 setting newly-added 'suppress_ack' flag in the writer and checking
 this flag when generating ack.

This change restores libnl compatibility.

Before:
```
~ nl-link-list
Error: Unable to allocate link cache: Message sequence number mismatch
````

After:
```
~ nl-link-list
vtnet0 ether 52:54:00:14:e3:19 <broadcast,multicast,up,running>
lo0 ieee1394 <loopback,multicast,up,running>
```

Reviewed by:	bapt,pauamma
Tested by:	bapt
Differential Revision: https://reviews.freebsd.org/D37565
2022-11-30 13:24:38 +00:00
..
man1 pkgbase: move man pages from runtime-manual to runtime 2019-07-19 15:12:20 +00:00
man3 intro.3: Document 'libstdthreads' (the ISO C11 '<threads.h>' library). 2022-11-07 11:34:00 +01:00
man3lua flua: Add a libjail module 2020-10-24 17:08:59 +00:00
man4 netlink: suppress sending NLMSG_ERROR if NLMSG_DONE is already sent 2022-11-30 13:24:38 +00:00
man5 pf: allow scrub rules without fragment reassemble 2022-11-28 20:19:05 +01:00
man6 pkgbase: move man pages from runtime-manual to runtime 2019-07-19 15:12:20 +00:00
man7 Fix igor and mandoc -T lint low-hanging fruit in hier(7) 2022-11-23 22:40:16 +01:00
man8 rc: add a manual entry for ${name}_setup 2022-11-11 22:21:39 +01:00
man9 man9: add vm_map_unwire link 2022-11-17 10:17:52 -05:00
Makefile flua: Add a libjail module 2020-10-24 17:08:59 +00:00