aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-02-27 10:58:45 -0800
committerBen Pfaff <blp@nicira.com>2012-03-07 16:40:19 -0800
commit4ce07c787650c63abd50da8aeb04045c01c4b8cd (patch)
treeabf7bfcfac0a2c7fd270ef46e037c93f44cbfe22
parentc1ba7cee855c98244bb283f6cf3a458d30119640 (diff)
socket-util: Unlink Unix domain sockets that bind but fail to connect.
The error handling path here failed to clean up bound sockets, by removing them. This fixes the problem. It was easy to observe this bug by running "ovs-vsctl" without "ovsdb-server" running. Bug #9811. Bug #9769. Reported-by: Michael <mhu@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--lib/socket-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/socket-util.c b/lib/socket-util.c
index 219433fb..94ff391b 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -458,7 +458,7 @@ error:
error = EPROTO;
}
if (bind_path) {
- fatal_signal_remove_file_to_unlink(bind_path);
+ fatal_signal_unlink_file_now(bind_path);
}
close(fd);
return -error;