From: Ed Maste Date: Tue, 23 Oct 2012 13:50:10 +0000 (+0000) Subject: lib: Accomodate FreeBSD return value for ssl connection. X-Git-Tag: sliver-openvswitch-1.9.90-1~3^2~17 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=dd445b79f7862580104c4c08edb9c65d42ad314c lib: Accomodate FreeBSD return value for ssl connection. On FreeBSD I see ECONNRESET being returned from check_connection_completion in ssl_connect. This happens before entering the SSL states, which return EPROTO on failure. Signed-off-by: Ed Maste Signed-off-by: Ben Pfaff --- diff --git a/tests/test-vconn.c b/tests/test-vconn.c index 5dd38f0f8..0b2b06355 100644 --- a/tests/test-vconn.c +++ b/tests/test-vconn.c @@ -159,8 +159,15 @@ test_refuse_connection(int argc OVS_UNUSED, char *argv[]) ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)", error, strerror(error)); } + } else if (!strcmp(type, "unix")) { + CHECK_ERRNO(error, EPIPE); + } else if (!strcmp(type, "ssl")) { + if (error != EPROTO && error != ECONNRESET) { + ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)", + error, strerror(error)); + } } else { - CHECK_ERRNO(error, !strcmp(type, "unix") ? EPIPE : EPROTO); + ovs_fatal(0, "invalid connection type %s", type); } vconn_close(vconn);