diff options
author | Ben Pfaff <blp@ovn.org> | 2018-04-11 11:24:59 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-04-16 14:51:09 -0700 |
commit | 1bb011218d046b5de765658e9f5fe45289462eea (patch) | |
tree | 01d9f25a3032d3e7f7f235cf1500c4a3189bf213 /ovsdb | |
parent | 3a974b92c28cd66c0e1e9fd4b53c4c3b8fe722cb (diff) | |
download | openvswitch-1bb011218d046b5de765658e9f5fe45289462eea.tar.gz |
socket-util: Make inet_parse_active() and inet_parse_passive() more alike.
Until now, the default_port parameters to these functions have had
different types and different behavior. There is a reason for this, since
it makes sense to listen on a kernel-selected port but it does not make
sense to connect to a kernel-selected port, but this overlooks the
possibility that a caller might want to parse a string in the format
understood by inet_parse_active() without actually using it to connect to
a remote host. This commit makes the behavior consistent and updates all
the callers to work with the new semantics.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/raft-private.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/raft-private.c b/ovsdb/raft-private.c index 36725f7e1..07996e35b 100644 --- a/ovsdb/raft-private.c +++ b/ovsdb/raft-private.c @@ -33,7 +33,7 @@ raft_address_validate(const char *address) return NULL; } else if (!strncmp(address, "ssl:", 4) || !strncmp(address, "tcp:", 4)) { struct sockaddr_storage ss; - if (!inet_parse_active(address + 4, 0, &ss)) { + if (!inet_parse_active(address + 4, -1, &ss)) { return ovsdb_error(NULL, "%s: syntax error in address", address); } return NULL; |