]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not write all zeros device_type
authorJouni Malinen <j@w1.fi>
Thu, 24 Nov 2011 20:22:16 +0000 (22:22 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 24 Nov 2011 20:22:16 +0000 (22:22 +0200)
This is the default value if device_type is not set, so do not
write it to the wpa_supplicant configuration file when saving
updated configuration.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/config_file.c

index ee8b45150e8d89c7f1fb602131a41c0e0b020ddb..d87bd0d4b5408e5036b594b85f3022a9a010ce25 100644 (file)
@@ -649,7 +649,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
                char _buf[WPS_DEV_TYPE_BUFSIZE], *buf;
                buf = wps_dev_type_bin2str(config->device_type,
                                           _buf, sizeof(_buf));
-               fprintf(f, "device_type=%s\n", buf);
+               if (os_strcmp(buf, "0-00000000-0") != 0)
+                       fprintf(f, "device_type=%s\n", buf);
        }
        if (WPA_GET_BE32(config->os_version))
                fprintf(f, "os_version=%08x\n",