diff options
author | Jason King <jason.king@joyent.com> | 2018-07-13 07:20:39 +0000 |
---|---|---|
committer | Jason King <jason.king@joyent.com> | 2018-07-13 19:08:20 +0000 |
commit | e4c684bd612282f2a2c7205cff55c477ef31ff1a (patch) | |
tree | f60f616729279b109b0c5fa19f8b28e839f88a62 /usr/src | |
parent | a14a61c954e512b21fc1be4a408e945f7f15df17 (diff) | |
download | illumos-joyent-e4c684bd612282f2a2c7205cff55c477ef31ff1a.tar.gz |
OS-7076 lx netlink msg_done only sends header
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Mike Gerdts <mike.gerdts@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/brand/lx/io/lx_netlink.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usr/src/uts/common/brand/lx/io/lx_netlink.c b/usr/src/uts/common/brand/lx/io/lx_netlink.c index bada80ffd9..76d68f5921 100644 --- a/usr/src/uts/common/brand/lx/io/lx_netlink.c +++ b/usr/src/uts/common/brand/lx/io/lx_netlink.c @@ -923,6 +923,23 @@ lx_netlink_reply_done(lx_netlink_reply_t *reply) hdr->lxnh_seq = reply->lxnr_hdr.lxnh_seq; hdr->lxnh_pid = lxsock->lxns_port; } else { + uint32_t status = 0; + + /* + * More recent versions of the iproute2 utils expect a status + * value after the header, even in the absence of errors. + */ + lx_netlink_reply_add(reply, &status, sizeof (status)); + + /* + * "done" is also the most minimal response possible. If + * lx_netlink_reply_msg() does not set lxnr_errno, we should + * be guaranteed enough room to hold this (i.e. our + * lx_netlink_reply_add() call should never end up setting + * lxnr_errno). + */ + VERIFY0(reply->lxnr_errno); + mp = reply->lxnr_mp; VERIFY(mp != NULL); reply->lxnr_mp = NULL; |