From be9657e4b84034acdaa01b2fc3c294ebd3e7ae25 Mon Sep 17 00:00:00 2001 From: zwjin1210 Date: Thu, 15 Dec 2022 10:58:20 +0800 Subject: [PATCH] =?UTF-8?q?routing=5Frecord=20=E5=87=BD=E6=95=B0=E5=9C=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=86=85=E5=AD=98=E6=97=B6=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E5=8A=A01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network/routing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/routing.c b/network/routing.c index 10afc4d..1d55218 100644 --- a/network/routing.c +++ b/network/routing.c @@ -69,8 +69,8 @@ void routing_record(const char *host, const char *ip) } #endif - int host_len = strlen(host); - int ip_len = strlen(ip); + int host_len = strlen(host) + 1; + int ip_len = strlen(ip) + 1; if (_routing_index >= ROUTING_TABLE_SIZE - 1) _routing_index = 0;