Skip to content

Commit dbd7ce9

Browse files
committed
restore checking hostname format on esp32 where it was checked before
1 parent 3d76aa0 commit dbd7ce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-bindings/wifi/Radio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ STATIC mp_obj_t wifi_radio_set_hostname(mp_obj_t self_in, mp_obj_t hostname_in)
8989

9090
mp_arg_validate_length_range(hostname.len, 1, 253, MP_QSTR_hostname);
9191

92-
#if 0 // ndef CONFIG_IDF_TARGET_ESP32C3
92+
#if !(defined(CONFIG_IDF_TARGET_ESP32C3) || defined(RASPBERRYPI))
9393
regex_t regex; // validate hostname according to RFC 1123
9494
regcomp(&regex,"^(([a-z0-9]|[a-z0-9][a-z0-9\\-]{0,61}[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]{0,61}[a-z0-9])$", REG_EXTENDED | REG_ICASE | REG_NOSUB);
9595
if (regexec(&regex, hostname.buf, 0, NULL, 0)) {

0 commit comments

Comments
 (0)