ports = (const char **)str_list_make_v3(talloc_tos(), smb_ports, NULL);
}
+ for (j = 0; ports && ports[j]; j++) {
+ unsigned port = atoi(ports[j]);
+
+ if (port == 0 || port > 0xffff) {
+ exit_server_cleanly("Invalid port in the config or on "
+ "the commandline specified!");
+ }
+ }
+
if (lp_interfaces() && lp_bind_interfaces_only()) {
/* We have been given an interfaces line, and been
told to only bind to those interfaces. Create a
for (j = 0; ports && ports[j]; j++) {
unsigned port = atoi(ports[j]);
- if (port == 0 || port > 0xffff) {
- continue;
- }
/* Keep the first port for mDNS service
* registration.
next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,"); ) {
for (j = 0; ports && ports[j]; j++) {
struct sockaddr_storage ss;
-
unsigned port = atoi(ports[j]);
- if (port == 0 || port > 0xffff) {
- continue;
- }
/* Keep the first port for mDNS service
* registration.