aboutsummaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/socket.c b/socket.c
index cf4ddb6..dbf65a1 100644
--- a/socket.c
+++ b/socket.c
@@ -212,12 +212,11 @@ getaddr (unsigned int flags,
++n;
ASSERT (n >= 2);
- msg (D_RESOLVE_ERRORS, "RESOLVE: NOTE: %s resolves to %d addresses, choosing one by random",
+ msg (D_RESOLVE_ERRORS, "RESOLVE: NOTE: %s resolves to %d addresses, choosing the first resolved IP address",
hostname,
n);
- /* choose address randomly, for basic load-balancing capability */
- ia.s_addr = *(in_addr_t *) (h->h_addr_list[get_random () % n]);
+ ia.s_addr = *(in_addr_t *) (h->h_addr_list[0]);
}
}
@@ -1864,7 +1863,7 @@ stream_buf_added (struct stream_buf *sb,
if (sb->len < 1 || sb->len > sb->maxlen)
{
- msg (M_WARN, "WARNING: Bad encapsulated packet length from peer (%d), which must be > 0 and <= %d -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attemping restart...]", sb->len, sb->maxlen);
+ msg (M_WARN, "WARNING: Bad encapsulated packet length from peer (%d), which must be > 0 and <= %d -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attempting restart...]", sb->len, sb->maxlen);
stream_buf_reset (sb);
sb->error = true;
return false;