summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pttbbs/common/bbs/banip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pttbbs/common/bbs/banip.c b/pttbbs/common/bbs/banip.c
index 81d39a14..b5009584 100644
--- a/pttbbs/common/bbs/banip.c
+++ b/pttbbs/common/bbs/banip.c
@@ -160,7 +160,7 @@ load_banip_list(const char *filename, FILE* err) {
continue;
// process IP entries, otherwise append text.
- if (*p && isascii(*p) && isdigit(*p)) {
+ if (*p && isascii(*p) && isdigit(*p) && inet_addr(p) != INADDR_NONE) {
char *sharp = strchr(p, '#');
if (sharp) *sharp = 0;
if (!was_ip) {