if (called)
{
if (should_bind)
- sockaddr_set_data (sa, &ip, 0);
+ sockaddr_set_data (sa, &ip, opt.bind_port);
return should_bind;
}
called = true;
ip = *address_list_address_at (al, 0);
address_list_release (al);
- sockaddr_set_data (sa, &ip, 0);
+ sockaddr_set_data (sa, &ip, opt.bind_port);
should_bind = true;
return true;
}
{ "backups", &opt.backups, cmd_number },
{ "base", &opt.base_href, cmd_string },
{ "bindaddress", &opt.bind_address, cmd_string },
+ { "bindport", &opt.bind_port, cmd_number },
{ "bodydata", &opt.body_data, cmd_string },
{ "bodyfile", &opt.body_file, cmd_string },
#ifdef HAVE_SSL
{ "backups", 0, OPT_BOOLEAN, "backups", -1 },
{ "base", 'B', OPT_VALUE, "base", -1 },
{ "bind-address", 0, OPT_VALUE, "bindaddress", -1 },
+ { "bind-port", 0, OPT_VALUE, "bindport", -1 },
{ "body-data", 0, OPT_VALUE, "bodydata", -1 },
{ "body-file", 0, OPT_VALUE, "bodyfile", -1 },
{ IF_SSL ("ca-certificate"), 0, OPT_VALUE, "cacertificate", -1 },
bool page_requisites; /* Whether we need to download all files
necessary to display a page properly. */
char *bind_address; /* What local IP address to bind to. */
+ int bind_port; /* What local port to bind to. */
#ifdef HAVE_SSL
enum {