diff --git a/blockip/bip b/blockip/bip index 648dade..298592f 100644 Binary files a/blockip/bip and b/blockip/bip differ diff --git a/blockip/bip-static b/blockip/bip-static index b3752a6..64a29a6 100644 Binary files a/blockip/bip-static and b/blockip/bip-static differ diff --git a/blockip/src/stats.c b/blockip/src/stats.c index 3ba0c0c..0705c0b 100644 --- a/blockip/src/stats.c +++ b/blockip/src/stats.c @@ -313,6 +313,12 @@ void show_subnet_aggregation(void) { } int scattered_count = total_ipv4 - aggregated_count; + /* 如果没有任何数据 */ + if (total_ipv4 == 0 && v6_count == 0) { + printf("(暂无IP信息)\n\n"); + return; + } + /* 显示散乱IP */ if (scattered_count > 0 || (!has_output && total_ipv4 > 0)) { if (scattered_count > 0) { @@ -326,11 +332,6 @@ void show_subnet_aggregation(void) { printf(" - (IPv6 地址) (%d 个)\n", v6_count); } - /* 如果没有任何输出(无聚合、无散乱、无v6) */ - if (!has_output && scattered_count == 0 && v6_count == 0) { - printf("(暂无IP信息)\n"); - } - printf("\n"); }