Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ldragon:branches:Virtualization
libvirt
kernel_workaround.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kernel_workaround.patch of Package libvirt
diff --git a/src/util/virarptable.c b/src/util/virarptable.c index 299dddd664..54ffc41779 100644 --- a/src/util/virarptable.c +++ b/src/util/virarptable.c @@ -81,10 +81,12 @@ virArpTableGet(void) for (; NLMSG_OK(nh, msglen); nh = NLMSG_NEXT(nh, msglen)) { VIR_WARNINGS_RESET struct ndmsg *r = NLMSG_DATA(nh); - int len = nh->nlmsg_len; void *addr; - if ((len -= NLMSG_LENGTH(sizeof(*nh))) < 0) { + if (nh->nlmsg_type == NLMSG_DONE) + break; + + if (nh->nlmsg_len < NLMSG_LENGTH(sizeof(*r))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("wrong nlmsg len")); goto cleanup; @@ -98,9 +100,6 @@ virArpTableGet(void) (!(r->ndm_state == NUD_STALE || r->ndm_state == NUD_REACHABLE))) continue; - if (nh->nlmsg_type == NLMSG_DONE) - return table; - VIR_WARNINGS_NO_CAST_ALIGN parse_rtattr(tb, NDA_MAX, NDA_RTA(r), nh->nlmsg_len - NLMSG_LENGTH(sizeof(*r))); Comment 8
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor