From 2cfbdba0b00cdc3cec48642ea74f043d5d027950 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 20 Jul 2015 18:29:50 +0000 Subject: [PATCH] netstat: better .ini settings parsing. git-svn-id: svn://kolibrios.org@5589 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/netstat/ipcfg.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/programs/network/netstat/ipcfg.inc b/programs/network/netstat/ipcfg.inc index 0182ef4eaa..8b9723619e 100644 --- a/programs/network/netstat/ipcfg.inc +++ b/programs/network/netstat/ipcfg.inc @@ -32,16 +32,20 @@ ipcfg: invoke ini.get_str, net_ini, str_ini_int, str_ini_ip_type, ini_buf, 16, sz_0 ; test eax, eax ; jz .disabled - cmp dword[ini_buf], 'dhcp' - jne @f + mov eax, dword[ini_buf] + or eax, 0x20202020 + cmp eax, 'stat' + je @f mov [option_ip], op_ip_auto @@: ; Read DNS type mov [option_dns], op_dns_static invoke ini.get_str, net_ini, str_ini_int, str_ini_dns_type, ini_buf, 16, sz_0 - cmp dword[ini_buf], 'dhcp' - jne @f + mov eax, dword[ini_buf] + or eax, 0x20202020 + cmp eax, 'stat' + je @f mov [option_dns], op_dns_auto @@: