From 09b2cbb3efc9a161be801e90ec2a59016ad8c582 Mon Sep 17 00:00:00 2001 From: "496148326@qq.com" <496148326@qq.com> Date: Tue, 16 May 2023 06:11:30 +0000 Subject: [PATCH] fix ip white list bug that the compare logic is not correct and will not allow ip/netmask format to login to observer --- src/share/schema/ob_schema_struct.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/schema/ob_schema_struct.cpp b/src/share/schema/ob_schema_struct.cpp index 97cb061be6..cf009c4b94 100644 --- a/src/share/schema/ob_schema_struct.cpp +++ b/src/share/schema/ob_schema_struct.cpp @@ -10627,7 +10627,7 @@ bool ObHostnameStuct::is_ip_match(const common::ObString &client_ip, common::ObS } if (is_ip_valied) { - ret_bool = (client.as_subnet(mask) == host); + ret_bool = (client.as_subnet(mask) == host.as_subnet(mask)); } return ret_bool; }