mirror of https://github.com/vishvananda/netlink
check payload of the NLMSG_DONE nlmsg
check the payload of the NLMSG_DONE type netlink message for possible error Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
This commit is contained in:
parent
7ed9c95980
commit
5e92c072cd
|
@ -439,10 +439,7 @@ done:
|
|||
if m.Header.Pid != pid {
|
||||
continue
|
||||
}
|
||||
if m.Header.Type == unix.NLMSG_DONE {
|
||||
break done
|
||||
}
|
||||
if m.Header.Type == unix.NLMSG_ERROR {
|
||||
if m.Header.Type == unix.NLMSG_DONE || m.Header.Type == unix.NLMSG_ERROR {
|
||||
native := NativeEndian()
|
||||
error := int32(native.Uint32(m.Data[0:4]))
|
||||
if error == 0 {
|
||||
|
|
Loading…
Reference in New Issue