summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-config.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-05-23 11:39:14 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-07-10 14:42:56 +1000
commit12abcbeb9fecf3b4107fb6f57e4e6da2d7821f8f (patch)
treecd61b0726751253be8b2a590fd114a78ea8ef645 /ui/ncurses/nc-config.c
parent735a9ed99a56df4e6bc496bdbe30a5aaa80a9685 (diff)
downloadtalos-petitboot-12abcbeb9fecf3b4107fb6f57e4e6da2d7821f8f.tar.gz
talos-petitboot-12abcbeb9fecf3b4107fb6f57e4e6da2d7821f8f.zip
ui/ncurses: Allow IPv6 addresses in address fields
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'ui/ncurses/nc-config.c')
-rw-r--r--ui/ncurses/nc-config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/ncurses/nc-config.c b/ui/ncurses/nc-config.c
index 5c0f23b..5186176 100644
--- a/ui/ncurses/nc-config.c
+++ b/ui/ncurses/nc-config.c
@@ -1029,8 +1029,8 @@ static void config_screen_setup_widgets(struct config_screen *screen,
widget_textbox_set_fixed_size(screen->widgets.ip_addr_f);
widget_textbox_set_fixed_size(screen->widgets.ip_mask_f);
- widget_textbox_set_validator_ipv4(screen->widgets.ip_addr_f);
- widget_textbox_set_validator_integer(screen->widgets.ip_mask_f, 1, 31);
+ widget_textbox_set_validator_ip(screen->widgets.ip_addr_f);
+ widget_textbox_set_validator_integer(screen->widgets.ip_mask_f, 1, 127);
screen->widgets.gateway_l = widget_new_label(set, 0, 0, _("Gateway:"));
screen->widgets.gateway_f = widget_new_textbox(set, 0, 0, 16, gw);
@@ -1038,7 +1038,7 @@ static void config_screen_setup_widgets(struct config_screen *screen,
widget_new_label(set, 0, 0, _("(eg. 192.168.0.1)"));
widget_textbox_set_fixed_size(screen->widgets.gateway_f);
- widget_textbox_set_validator_ipv4(screen->widgets.gateway_f);
+ widget_textbox_set_validator_ip(screen->widgets.gateway_f);
screen->widgets.url_l = widget_new_label(set, 0, 0, _("URL:"));
screen->widgets.url_f = widget_new_textbox(set, 0, 0, 32, url);
@@ -1059,7 +1059,7 @@ static void config_screen_setup_widgets(struct config_screen *screen,
screen->widgets.dns_help_l =
widget_new_label(set, 0, 0, _("(eg. 192.168.0.2)"));
- widget_textbox_set_validator_ipv4_multi(screen->widgets.dns_f);
+ widget_textbox_set_validator_ip_multi(screen->widgets.dns_f);
screen->widgets.dns_dhcp_help_l = widget_new_label(set, 0, 0,
_("(if not provided by DHCP server)"));
OpenPOWER on IntegriCloud