2 # Save networking-related options
4 require './frox-lib.pl';
6 &error_setup($text{'net_err'});
9 &save_opt_textbox($conf, "Listen", \&check_listen);
10 &save_textbox($conf, "Port", \&check_port);
11 &save_opt_textbox($conf, "BindToDevice", \&check_iface);
12 &save_yesno($conf, "FromInetd");
13 &save_exists($conf, "NoDetach");
14 &save_opt_textbox($conf, "FTPProxy", \&check_proxy);
15 &save_opt_textbox($conf, "TcpOutgoingAddr", \&check_ip);
16 &save_opt_textbox($conf, "PASVAddress", \&check_ip);
17 &save_opt_textbox($conf, "ResolvLoadHack", \&check_resolv);
19 &lock_file($config{'frox_conf'});
21 &unlock_file($config{'frox_conf'});
27 return &to_ipaddress($_[0]) ? undef : $text{'net_ehost'};
32 return $_[0] =~ /^\d+$/ ? undef : $text{'net_eport'};
37 return $_[0] =~ /^[a-z]+(\d*)(:\d+)?$/ ? undef : $text{'net_eiface'};
42 return $_[0] =~ /^(\S+):(\d+)$/ && &to_ipaddress($1) ?
43 undef : $text{'net_eproxy'};
48 return &check_ipaddress($_[0]) ? undef : $text{'net_eip'};
53 return $_[0] =~ /^[a-z0-9\.\-\_]+$/i ? undef : $text{'net_eresolv'};