]> xenbits.xensource.com Git - libvirt.git/commitdiff
fix handling of PORT_PROFILE_RESPONSE_INPROGRESS netlink message
authorGerhard Stenzel <gerhard.stenzel@de.ibm.com>
Wed, 28 Jul 2010 14:17:21 +0000 (16:17 +0200)
committerDaniel Veillard <veillard@redhat.com>
Wed, 28 Jul 2010 14:17:21 +0000 (16:17 +0200)
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.

- src/util/macvtap.c: fix getPortProfileStatus() to return 0 in that
  case and also fix an indentation problem

src/util/macvtap.c

index 635458d336374056c2f3c09f9c062296e48b80c1..79a540524ad84e741ce134162a78fa658538a3df 100644 (file)
@@ -1020,15 +1020,16 @@ getPortProfileStatus(struct nlattr **tb, int32_t vf,
 
     if (tb_port[IFLA_PORT_RESPONSE]) {
         *status = *(uint16_t *)RTA_DATA(tb_port[IFLA_PORT_RESPONSE]);
-         rc = 0;
+        rc = 0;
     } else {
-         if (is8021Qbg) {
-             /* no in-progress here; may be missing */
-             *status = PORT_PROFILE_RESPONSE_INPROGRESS;
-         } else {
-             msg = _("no IFLA_PORT_RESPONSE found in netlink message");
-             goto err_exit;
-         }
+        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;
+        }
     }
 
 err_exit: