[libvirt] [PATCH] fix handling of PORT_PROFILE_RESPONSE_INPROGRESS netlink message

During function test of the 802.1Qbg implementation in lldpad we came across a small problem in the handling of the netlink message corresponding to PORT_PROFILE_RESPONSE_INPROGRESS. This should not result in returning the default rc=1. Signed-off-by: Gerhard Stenzel <gerhard.stenzel@de.ibm.com> diff --git a/src/util/macvtap.c b/src/util/macvtap.c index 635458d..a6d9a57 100644 --- a/src/util/macvtap.c +++ b/src/util/macvtap.c @@ -1025,6 +1025,7 @@ getPortProfileStatus(struct nlattr **tb, int32_t vf, if (is8021Qbg) { /* no in-progress here; may be missing */ *status = PORT_PROFILE_RESPONSE_INPROGRESS; + rc = 0; } else { msg = _("no IFLA_PORT_RESPONSE found in netlink message"); goto err_exit; -- Best regards, Gerhard Stenzel, ----------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

On Wed, Jul 28, 2010 at 03:17:29PM +0200, Gerhard Stenzel wrote:
During function test of the 802.1Qbg implementation in lldpad we came across a small problem in the handling of the netlink message corresponding to PORT_PROFILE_RESPONSE_INPROGRESS. This should not result in returning the default rc=1.
Signed-off-by: Gerhard Stenzel <gerhard.stenzel@de.ibm.com>
diff --git a/src/util/macvtap.c b/src/util/macvtap.c index 635458d..a6d9a57 100644 --- a/src/util/macvtap.c +++ b/src/util/macvtap.c @@ -1025,6 +1025,7 @@ getPortProfileStatus(struct nlattr **tb, int32_t vf, if (is8021Qbg) { /* no in-progress here; may be missing */ *status = PORT_PROFILE_RESPONSE_INPROGRESS; + rc = 0; } else { msg = _("no IFLA_PORT_RESPONSE found in netlink message"); goto err_exit;
ACK, looks sensible, I aslo took the opportunity to fix a small indentation problem in that block (aligned on 5 instead of 4) and pushed it, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Gerhard Stenzel