summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-08-09 22:33:40 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-09 22:34:54 -0700
commitaf90e68623c729d0e3b06a1e838c5584d2d8b7c2 (patch)
tree7e575a45207e23b8958be013158e566d89ebf9ea /pkg/abi/linux
parentf2762e8c60b0a83f976c9eedd4a8c08e32cb6856 (diff)
netlink: return an error in nlmsgerr
Now if a process sends an unsupported netlink requests, an error is returned from the send system call. The linux kernel works differently in this case. It returns errors in the nlmsgerr netlink message. Reported-by: syzbot+571d99510c6f935202da@syzkaller.appspotmail.com PiperOrigin-RevId: 262690453
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r--pkg/abi/linux/netlink.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/abi/linux/netlink.go b/pkg/abi/linux/netlink.go
index e8b6544b4..0ba086c76 100644
--- a/pkg/abi/linux/netlink.go
+++ b/pkg/abi/linux/netlink.go
@@ -122,3 +122,9 @@ const (
NETLINK_EXT_ACK = 11
NETLINK_DUMP_STRICT_CHK = 12
)
+
+// NetlinkErrorMessage is struct nlmsgerr, from uapi/linux/netlink.h.
+type NetlinkErrorMessage struct {
+ Error int32
+ Header NetlinkMessageHeader
+}