From: Huang Lei <lhua...@ebay.com>

Bad port number erro is ignored in parse_sockaddr_components(),
if port number is invalid, it ouputs a error log and set port
to 0.

Signed-off-by: Huang Lei <lhua...@ebay.com>
---
 lib/socket-util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/socket-util.c b/lib/socket-util.c
index 5463c93..5a36f3b 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -359,6 +359,7 @@ parse_sockaddr_components(struct sockaddr_storage *ss,
     if (port_s && port_s[0]) {
         if (!str_to_int(port_s, 10, &port) || port < 0 || port > 65535) {
             VLOG_ERR("%s: bad port number \"%s\"", s, port_s);
+            goto exit;
         }
     } else {
         port = default_port;
--
1.9.1



_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to