summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r--libexec/ftpd/ftpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 9f575bf..87aeb74 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -866,7 +866,7 @@ selecthost(union sockunion *su)
for (hi = hrp->hostinfo; hi != NULL; hi = hi->ai_next) {
if (memcmp(su, hi->ai_addr, hi->ai_addrlen) == 0) {
thishost = hrp;
- break;
+ goto found;
}
#ifdef INET6
/* XXX IPv4 mapped IPv6 addr consideraton */
@@ -875,12 +875,13 @@ selecthost(union sockunion *su)
&((struct sockaddr_in *)hi->ai_addr)->sin_addr,
sizeof(struct in_addr)) == 0)) {
thishost = hrp;
- break;
+ goto found;
}
#endif
}
hrp = hrp->next;
}
+found:
su->su_port = port;
/* setup static variables as appropriate */
hostname = thishost->hostname;
OpenPOWER on IntegriCloud