瀏覽代碼

fix mistake

Roman Dmitriev 2 年之前
父節點
當前提交
0208734b4a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/eyelib/mysql.pm

+ 1 - 1
scripts/eyelib/mysql.pm

@@ -850,7 +850,7 @@ sub find_mac_in_subnet {
     my $ip = shift;
     my $ip = shift;
     my $mac = shift;
     my $mac = shift;
     if (!$ip or !$mac) { return; }
     if (!$ip or !$mac) { return; }
-    $ip_subnet = get_ip_subnet($db, $ip);
+    my $ip_subnet = get_ip_subnet($db, $ip);
     if (!$ip_subnet) { return; }
     if (!$ip_subnet) { return; }
     my @t_auth = get_records_sql($db, "SELECT id,mac,user_id FROM User_auth WHERE ip_int>=" . $ip_subnet->{'ip_int_start'} . " and ip_int<=" . $ip_subnet->{'ip_int_stop'} . " and mac='" . $mac . "' and deleted=0 ORDER BY id");
     my @t_auth = get_records_sql($db, "SELECT id,mac,user_id FROM User_auth WHERE ip_int>=" . $ip_subnet->{'ip_int_start'} . " and ip_int<=" . $ip_subnet->{'ip_int_stop'} . " and mac='" . $mac . "' and deleted=0 ORDER BY id");
     my $auth_count = 0;
     my $auth_count = 0;