UltraMonkey-L7 branches for my development
リビジョン | 430058fa334a763c3b272e99770a12ff95066bdc (tree) |
---|---|
日時 | 2010-07-20 14:18:13 |
作者 | TATEISHI Katsuyuki <kt@whee...> |
コミッター | TATEISHI Katsuyuki |
Merge remote branch 'origin/port-limit-check' into maint
@@ -2319,6 +2319,14 @@ parse_endpoint(struct sockaddr_in *addr, const char *endpoint_str, int allow_ina | ||
2319 | 2319 | } |
2320 | 2320 | *t++ = '\0'; |
2321 | 2321 | |
2322 | + if (atoi(t) > 65535) { | |
2323 | + LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSADM_PARSE,8, | |
2324 | + "Port number is invalid."); | |
2325 | + fprintf(stderr, "PARSE ERROR : " | |
2326 | + "Cannot specify port number greater than 65536.\n"); | |
2327 | + } | |
2328 | + | |
2329 | + | |
2322 | 2330 | memset(&hints, 0, sizeof(hints)); |
2323 | 2331 | hints.ai_family = PF_INET; /* inet only. no support for inet6 (yet) */ |
2324 | 2332 | hints.ai_socktype = SOCK_STREAM; |