David Brownell <david-b@pacbell.net>:
OpenOCD doesn't actually *need* to be keeping all TCP ports active ... creating security issues in some network configs. Instead, let config file specify e.g. "tcl_port 0" (or gdb_port, telnet_port) to disable that particular remote access method. git-svn-id: svn://svn.berlios.de/openocd/trunk@2240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -34,7 +34,7 @@ typedef struct tcl_connection_s {
|
||||
int tc_outerror; /* flag an output error */
|
||||
} tcl_connection_t;
|
||||
|
||||
static unsigned short tcl_port = 0;
|
||||
static unsigned short tcl_port = 6666;
|
||||
|
||||
/* commands */
|
||||
static int handle_tcl_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
|
||||
@@ -165,8 +165,8 @@ int tcl_init(void)
|
||||
|
||||
if (tcl_port == 0)
|
||||
{
|
||||
LOG_DEBUG("no tcl port specified, using default port 6666");
|
||||
tcl_port = 6666;
|
||||
LOG_INFO("tcl port disabled");
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
retval = add_service("tcl", CONNECTION_TCP, tcl_port, 1, tcl_new_connection, tcl_input, tcl_closed, NULL);
|
||||
|
||||
Reference in New Issue
Block a user