From 1bb011218d046b5de765658e9f5fe45289462eea Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 11 Apr 2018 11:24:59 -0700 Subject: 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 Acked-by: Mark Michelson --- ovn/northd/ovn-northd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ovn/northd') 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); -- cgit v1.2.1