dhcp: Fix race condition in test-dhcp-client.
authorBen Pfaff <blp@nicira.com>
Tue, 22 Jul 2008 21:01:17 +0000 (14:01 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 23 Jul 2008 20:12:17 +0000 (13:12 -0700)
dhclient_wait() might also access dhcp state.

tests/test-dhcp-client.c

index 4bd4913ea95b238d1ec4d9fd091aa3b8139faae0..815ecfd838bfd662e465638233845d60d63c5739 100644 (file)
@@ -89,8 +89,8 @@ main(int argc, char *argv[])
         if (dhclient_changed(cli)) {
             dhclient_configure_netdev(cli);
         }
-        fatal_signal_unblock();
         dhclient_wait(cli);
+        fatal_signal_unblock();
         poll_block();
     }
 }