summaryrefslogtreecommitdiff
path: root/ovn/northd
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-04-11 11:24:59 -0700
committerBen Pfaff <blp@ovn.org>2018-04-16 14:51:09 -0700
commit1bb011218d046b5de765658e9f5fe45289462eea (patch)
tree01d9f25a3032d3e7f7f235cf1500c4a3189bf213 /ovn/northd
parent3a974b92c28cd66c0e1e9fd4b53c4c3b8fe722cb (diff)
downloadopenvswitch-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 'ovn/northd')
-rw-r--r--ovn/northd/ovn-northd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 6ffebde12..ce472a536 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2942,7 +2942,7 @@ ip_address_and_port_from_lb_key(const char *key, char **ip_address,
uint16_t *port, int *addr_family)
{
struct sockaddr_storage ss;
- if (!inet_parse_active(key, 0, &ss)) {
+ if (!inet_parse_active(key, -1, &ss)) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
VLOG_WARN_RL(&rl, "bad ip address or port for load balancer key %s",
key);