aboutsummaryrefslogtreecommitdiff
path: root/src/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/connect.c')
-rw-r--r--src/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connect.c b/src/connect.c
index 20322c0b..5d04b3fa 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -122,7 +122,7 @@ void ssh_sock_set_blocking(socket_t sock) {
#endif /* _WIN32 */
#ifdef HAVE_REGCOMP
-#define IPEXPR "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$"
+#define IPEXPR "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
static regex_t *ip_regex = NULL;